@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest other = (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getModificationsList().equals(other.getModificationsList()); 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(); if (getModificationsCount() > 0) { hash = (37 * hash) + MODIFICATIONS_FIELD_NUMBER; hash = (53 * hash) + getModificationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@Test @SuppressWarnings("all") public void modifyColumnFamiliesTest() { TableName name2 = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); Table expectedResponse = Table.newBuilder().setName(name2.toString()).build(); mockBigtableTableAdmin.addResponse(expectedResponse); TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>(); Table actualResponse = client.modifyColumnFamilies(name, modifications); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtableTableAdmin.getRequests(); Assert.assertEquals(1, actualRequests.size()); ModifyColumnFamiliesRequest actualRequest = (ModifyColumnFamiliesRequest) actualRequests.get(0); Assert.assertEquals(name, TableName.parse(actualRequest.getName())); Assert.assertEquals(modifications, actualRequest.getModificationsList()); 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.ModifyColumnFamiliesRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest other = (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getModificationsList() .equals(other.getModificationsList()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest other = (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getModificationsList().equals(other.getModificationsList()); 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(); if (getModificationsCount() > 0) { hash = (37 * hash) + MODIFICATIONS_FIELD_NUMBER; hash = (53 * hash) + getModificationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@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(); if (getModificationsCount() > 0) { hash = (37 * hash) + MODIFICATIONS_FIELD_NUMBER; hash = (53 * hash) + getModificationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }