@Override public Map<String, String> extract(MutateRowRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("table_name", String.valueOf(request.getTableName())); return params.build(); } })
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.MutateRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.MutateRowRequest other = (com.google.bigtable.v2.MutateRowRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && getRowKey().equals(other.getRowKey()); result = result && getMutationsList().equals(other.getMutationsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The unique name of the table to which the mutation should be applied. * Values are of the form * `projects/<project>/instances/<instance>/tables/<table>`. * </pre> * * <code>string table_name = 1;</code> */ public Builder clearTableName() { tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); hash = (37 * hash) + ROW_KEY_FIELD_NUMBER; hash = (53 * hash) + getRowKey().hashCode(); if (getMutationsCount() > 0) { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.MutateRowRequest other) { if (other == com.google.bigtable.v2.MutateRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged();
@Test @SuppressWarnings("all") public void mutateRowTest() { MutateRowResponse expectedResponse = MutateRowResponse.newBuilder().build(); mockBigtable.addResponse(expectedResponse); TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); ByteString rowKey = ByteString.copyFromUtf8("122"); List<Mutation> mutations = new ArrayList<>(); MutateRowResponse actualResponse = client.mutateRow(tableName, rowKey, mutations); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtable.getRequests(); Assert.assertEquals(1, actualRequests.size()); MutateRowRequest actualRequest = (MutateRowRequest) actualRequests.get(0); Assert.assertEquals(tableName, TableName.parse(actualRequest.getTableName())); Assert.assertEquals(rowKey, actualRequest.getRowKey()); Assert.assertEquals(mutations, actualRequest.getMutationsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Override public Map<String, String> extract(MutateRowRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("table_name", String.valueOf(request.getTableName())); return params.build(); } })
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.MutateRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.MutateRowRequest other = (com.google.bigtable.v2.MutateRowRequest) obj; boolean result = true; result = result && getTableName() .equals(other.getTableName()); result = result && getRowKey() .equals(other.getRowKey()); result = result && getMutationsList() .equals(other.getMutationsList()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.MutateRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.MutateRowRequest other = (com.google.bigtable.v2.MutateRowRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && getRowKey().equals(other.getRowKey()); result = result && getMutationsList().equals(other.getMutationsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * <pre> * The unique name of the table to which the mutation should be applied. * Values are of the form * projects/&lt;project&gt;/instances/&lt;instance&gt;/tables/&lt;table&gt; * </pre> * * <code>string table_name = 1;</code> */ public Builder clearTableName() { tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + ROW_KEY_FIELD_NUMBER; hash = (53 * hash) + getRowKey().hashCode(); if (getMutationsCount() > 0) { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The unique name of the table to which the mutation should be applied. * Values are of the form * `projects/<project>/instances/<instance>/tables/<table>`. * </pre> * * <code>string table_name = 1;</code> */ public Builder clearTableName() { tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); hash = (37 * hash) + ROW_KEY_FIELD_NUMBER; hash = (53 * hash) + getRowKey().hashCode(); if (getMutationsCount() > 0) { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.MutateRowRequest other) { if (other == com.google.bigtable.v2.MutateRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged();
public Builder mergeFrom(com.google.bigtable.v2.MutateRowRequest other) { if (other == com.google.bigtable.v2.MutateRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged();
/** {@inheritDoc} */ @Override public ListenableFuture<MutateRowResponse> mutateRowAsync(MutateRowRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return createUnaryListener(request, mutateRowRpc, request.getTableName()).getAsyncResult(); }
/** {@inheritDoc} */ @Override public MutateRowResponse mutateRow(MutateRowRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return createUnaryListener(request, mutateRowRpc, request.getTableName()).getBlockingResult(); }