@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.CheckConsistencyRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.CheckConsistencyRequest other = (com.google.bigtable.admin.v2.CheckConsistencyRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getConsistencyToken().equals(other.getConsistencyToken()); 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CONSISTENCY_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getConsistencyToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The token created using GenerateConsistencyToken for the Table. * </pre> * * <code>string consistency_token = 2;</code> */ public Builder clearConsistencyToken() { consistencyToken_ = getDefaultInstance().getConsistencyToken(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.bigtable.admin.v2.CheckConsistencyRequest other) { if (other == com.google.bigtable.admin.v2.CheckConsistencyRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getConsistencyToken().isEmpty()) { consistencyToken_ = other.consistencyToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test @SuppressWarnings("all") public void checkConsistencyTest() { boolean consistent = true; CheckConsistencyResponse expectedResponse = CheckConsistencyResponse.newBuilder().setConsistent(consistent).build(); mockBigtableTableAdmin.addResponse(expectedResponse); TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); String consistencyToken = "consistencyToken-1090516718"; CheckConsistencyResponse actualResponse = client.checkConsistency(name, consistencyToken); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtableTableAdmin.getRequests(); Assert.assertEquals(1, actualRequests.size()); CheckConsistencyRequest actualRequest = (CheckConsistencyRequest) actualRequests.get(0); Assert.assertEquals(name, TableName.parse(actualRequest.getName())); Assert.assertEquals(consistencyToken, actualRequest.getConsistencyToken()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.CheckConsistencyRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.CheckConsistencyRequest other = (com.google.bigtable.admin.v2.CheckConsistencyRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getConsistencyToken().equals(other.getConsistencyToken()); 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CONSISTENCY_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getConsistencyToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The token created using GenerateConsistencyToken for the Table. * </pre> * * <code>string consistency_token = 2;</code> */ public Builder clearConsistencyToken() { consistencyToken_ = getDefaultInstance().getConsistencyToken(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.bigtable.admin.v2.CheckConsistencyRequest other) { if (other == com.google.bigtable.admin.v2.CheckConsistencyRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getConsistencyToken().isEmpty()) { consistencyToken_ = other.consistencyToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }