@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) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); switch (routingPolicyCase_) { case 5: hash = (37 * hash) + MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER; hash = (53 * hash) + getMultiClusterRoutingUseAny().hashCode(); break; case 6: hash = (37 * hash) + SINGLE_CLUSTER_ROUTING_FIELD_NUMBER; hash = (53 * hash) + getSingleClusterRouting().hashCode(); break; case 0: default: } 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.admin.v2.AppProfile)) { return super.equals(obj); } com.google.bigtable.admin.v2.AppProfile other = (com.google.bigtable.admin.v2.AppProfile) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getEtag().equals(other.getEtag()); result = result && getDescription().equals(other.getDescription()); result = result && getRoutingPolicyCase().equals(other.getRoutingPolicyCase()); if (!result) return false; switch (routingPolicyCase_) { case 5: result = result && getMultiClusterRoutingUseAny().equals(other.getMultiClusterRoutingUseAny()); break; case 6: result = result && getSingleClusterRouting().equals(other.getSingleClusterRouting()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
case MULTI_CLUSTER_ROUTING_USE_ANY: mergeMultiClusterRoutingUseAny(other.getMultiClusterRoutingUseAny()); break;
@Test public void testMultiClusterRouting() { CreateAppProfileRequest wrapper = CreateAppProfileRequest.of("my-instance", "my-profile") .setRoutingPolicy(MultiClusterRoutingPolicy.of()); assertThat(wrapper.toProto("my-project").getAppProfile().getMultiClusterRoutingUseAny()) .isEqualTo(MultiClusterRoutingUseAny.getDefaultInstance()); }
@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) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); switch (routingPolicyCase_) { case 5: hash = (37 * hash) + MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER; hash = (53 * hash) + getMultiClusterRoutingUseAny().hashCode(); break; case 6: hash = (37 * hash) + SINGLE_CLUSTER_ROUTING_FIELD_NUMBER; hash = (53 * hash) + getSingleClusterRouting().hashCode(); break; case 0: default: } 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.admin.v2.AppProfile)) { return super.equals(obj); } com.google.bigtable.admin.v2.AppProfile other = (com.google.bigtable.admin.v2.AppProfile) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getEtag().equals(other.getEtag()); result = result && getDescription().equals(other.getDescription()); result = result && getRoutingPolicyCase().equals(other.getRoutingPolicyCase()); if (!result) return false; switch (routingPolicyCase_) { case 5: result = result && getMultiClusterRoutingUseAny().equals(other.getMultiClusterRoutingUseAny()); break; case 6: result = result && getSingleClusterRouting().equals(other.getSingleClusterRouting()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
case MULTI_CLUSTER_ROUTING_USE_ANY: mergeMultiClusterRoutingUseAny(other.getMultiClusterRoutingUseAny()); break;