@Override public Map<String, String> extract(CheckAndMutateRowRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("table_name", String.valueOf(request.getTableName())); return params.build(); } })
/** * * * <pre> * The unique name of the table to which the conditional 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 boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.CheckAndMutateRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.CheckAndMutateRowRequest other = (com.google.bigtable.v2.CheckAndMutateRowRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && getRowKey().equals(other.getRowKey()); result = result && (hasPredicateFilter() == other.hasPredicateFilter()); if (hasPredicateFilter()) { result = result && getPredicateFilter().equals(other.getPredicateFilter()); } result = result && getTrueMutationsList().equals(other.getTrueMutationsList()); result = result && getFalseMutationsList().equals(other.getFalseMutationsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
@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 (hasPredicateFilter()) { hash = (37 * hash) + PREDICATE_FILTER_FIELD_NUMBER; hash = (53 * hash) + getPredicateFilter().hashCode(); } if (getTrueMutationsCount() > 0) { hash = (37 * hash) + TRUE_MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getTrueMutationsList().hashCode(); } if (getFalseMutationsCount() > 0) { hash = (37 * hash) + FALSE_MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getFalseMutationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowRequest other) { if (other == com.google.bigtable.v2.CheckAndMutateRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged();
@Test @SuppressWarnings("all") public void checkAndMutateRowTest() { boolean predicateMatched = true; CheckAndMutateRowResponse expectedResponse = CheckAndMutateRowResponse.newBuilder().setPredicateMatched(predicateMatched).build(); mockBigtable.addResponse(expectedResponse); TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); ByteString rowKey = ByteString.copyFromUtf8("122"); RowFilter predicateFilter = RowFilter.newBuilder().build(); List<Mutation> trueMutations = new ArrayList<>(); List<Mutation> falseMutations = new ArrayList<>(); CheckAndMutateRowResponse actualResponse = client.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtable.getRequests(); Assert.assertEquals(1, actualRequests.size()); CheckAndMutateRowRequest actualRequest = (CheckAndMutateRowRequest) actualRequests.get(0); Assert.assertEquals(tableName, TableName.parse(actualRequest.getTableName())); Assert.assertEquals(rowKey, actualRequest.getRowKey()); Assert.assertEquals(predicateFilter, actualRequest.getPredicateFilter()); Assert.assertEquals(trueMutations, actualRequest.getTrueMutationsList()); Assert.assertEquals(falseMutations, actualRequest.getFalseMutationsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Override public Map<String, String> extract(CheckAndMutateRowRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("table_name", String.valueOf(request.getTableName())); return params.build(); } })
/** * <pre> * The unique name of the table to which the conditional 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; } /**
/** * * * <pre> * The unique name of the table to which the conditional 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 boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.CheckAndMutateRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.CheckAndMutateRowRequest other = (com.google.bigtable.v2.CheckAndMutateRowRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && getRowKey().equals(other.getRowKey()); result = result && (hasPredicateFilter() == other.hasPredicateFilter()); if (hasPredicateFilter()) { result = result && getPredicateFilter().equals(other.getPredicateFilter()); } result = result && getTrueMutationsList().equals(other.getTrueMutationsList()); result = result && getFalseMutationsList().equals(other.getFalseMutationsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
@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 (hasPredicateFilter()) { hash = (37 * hash) + PREDICATE_FILTER_FIELD_NUMBER; hash = (53 * hash) + getPredicateFilter().hashCode(); } if (getTrueMutationsCount() > 0) { hash = (37 * hash) + TRUE_MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getTrueMutationsList().hashCode(); } if (getFalseMutationsCount() > 0) { hash = (37 * hash) + FALSE_MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getFalseMutationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.CheckAndMutateRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.CheckAndMutateRowRequest other = (com.google.bigtable.v2.CheckAndMutateRowRequest) obj; boolean result = true; result = result && getTableName() .equals(other.getTableName()); result = result && getRowKey() .equals(other.getRowKey()); result = result && (hasPredicateFilter() == other.hasPredicateFilter()); if (hasPredicateFilter()) { result = result && getPredicateFilter() .equals(other.getPredicateFilter()); } result = result && getTrueMutationsList() .equals(other.getTrueMutationsList()); result = result && getFalseMutationsList() .equals(other.getFalseMutationsList()); return result; }
@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 (hasPredicateFilter()) { hash = (37 * hash) + PREDICATE_FILTER_FIELD_NUMBER; hash = (53 * hash) + getPredicateFilter().hashCode(); } if (getTrueMutationsCount() > 0) { hash = (37 * hash) + TRUE_MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getTrueMutationsList().hashCode(); } if (getFalseMutationsCount() > 0) { hash = (37 * hash) + FALSE_MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getFalseMutationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowRequest other) { if (other == com.google.bigtable.v2.CheckAndMutateRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged();
public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowRequest other) { if (other == com.google.bigtable.v2.CheckAndMutateRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged();
/** {@inheritDoc} */ @Override public CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return createUnaryListener(request, checkAndMutateRpc, request.getTableName()) .getBlockingResult(); }
/** {@inheritDoc} */ @Override public ListenableFuture<CheckAndMutateRowResponse> checkAndMutateRowAsync( CheckAndMutateRowRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return createUnaryListener(request, checkAndMutateRpc, request.getTableName()).getAsyncResult(); }