@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 (getRulesCount() > 0) { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRowRequest other) { if (other == com.google.bigtable.v2.ReadModifyWriteRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; onChanged(); if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { setRowKey(other.getRowKey());
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.ReadModifyWriteRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.ReadModifyWriteRowRequest other = (com.google.bigtable.v2.ReadModifyWriteRowRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && getRowKey().equals(other.getRowKey()); result = result && getRulesList().equals(other.getRulesList()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The key of the row to which the read/modify/write rules should be applied. * </pre> * * <code>bytes row_key = 2;</code> */ public Builder clearRowKey() { rowKey_ = getDefaultInstance().getRowKey(); onChanged(); return this; }
@Test @SuppressWarnings("all") public void readModifyWriteRowTest() { ReadModifyWriteRowResponse expectedResponse = ReadModifyWriteRowResponse.newBuilder().build(); mockBigtable.addResponse(expectedResponse); TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); ByteString rowKey = ByteString.copyFromUtf8("122"); List<ReadModifyWriteRule> rules = new ArrayList<>(); ReadModifyWriteRowResponse actualResponse = client.readModifyWriteRow(tableName, rowKey, rules); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtable.getRequests(); Assert.assertEquals(1, actualRequests.size()); ReadModifyWriteRowRequest actualRequest = (ReadModifyWriteRowRequest) actualRequests.get(0); Assert.assertEquals(tableName, TableName.parse(actualRequest.getTableName())); Assert.assertEquals(rowKey, actualRequest.getRowKey()); Assert.assertEquals(rules, actualRequest.getRulesList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRowRequest other) { if (other == com.google.bigtable.v2.ReadModifyWriteRowRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { setRowKey(other.getRowKey());
/** {@inheritDoc} */ @Override public ListenableFuture<ReadModifyWriteRowResponse> readModifyWriteRowAsync( ReadModifyWriteRowRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return createUnaryListener(request, readWriteModifyRpc, request.getTableName()) .getAsyncResult(); }
/** * * * <pre> * The unique name of the table to which the read/modify/write rules 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; } /**
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
@Override public Map<String, String> extract(ReadModifyWriteRowRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("table_name", String.valueOf(request.getTableName())); return params.build(); } })
/** * * * <pre> * This value specifies routing for replication. If not specified, the * "default" application profile will be used. * </pre> * * <code>string app_profile_id = 4;</code> */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); onChanged(); return this; } /**
@java.lang.Override public com.google.bigtable.v2.ReadModifyWriteRowRequest getDefaultInstanceForType() { return com.google.bigtable.v2.ReadModifyWriteRowRequest.getDefaultInstance(); }
@java.lang.Override public com.google.bigtable.v2.ReadModifyWriteRowRequest buildPartial() { com.google.bigtable.v2.ReadModifyWriteRowRequest result = new com.google.bigtable.v2.ReadModifyWriteRowRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.tableName_ = tableName_; result.appProfileId_ = appProfileId_; result.rowKey_ = rowKey_; if (rulesBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008)) { rules_ = java.util.Collections.unmodifiableList(rules_); bitField0_ = (bitField0_ & ~0x00000008); } result.rules_ = rules_; } else { result.rules_ = rulesBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); 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.ReadModifyWriteRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.ReadModifyWriteRowRequest other = (com.google.bigtable.v2.ReadModifyWriteRowRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && getRowKey().equals(other.getRowKey()); result = result && getRulesList().equals(other.getRulesList()); result = result && unknownFields.equals(other.unknownFields); 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.ReadModifyWriteRowRequest)) { return super.equals(obj); } com.google.bigtable.v2.ReadModifyWriteRowRequest other = (com.google.bigtable.v2.ReadModifyWriteRowRequest) obj; boolean result = true; result = result && getTableName() .equals(other.getTableName()); result = result && getRowKey() .equals(other.getRowKey()); result = result && getRulesList() .equals(other.getRulesList()); return result; }
/** {@inheritDoc} */ @Override public ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return createUnaryListener(request, readWriteModifyRpc, request.getTableName()) .getBlockingResult(); }
/** * <pre> * The unique name of the table to which the read/modify/write rules 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 key of the row to which the read/modify/write rules should be applied. * </pre> * * <code>bytes row_key = 2;</code> */ public Builder clearRowKey() { rowKey_ = getDefaultInstance().getRowKey(); onChanged(); return this; }
public static Builder newBuilder(com.google.bigtable.v2.ReadModifyWriteRowRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }