@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; }
/** Gets the routing policy for all read/write requests which use this app profile. */ @SuppressWarnings("WeakerAccess") public RoutingPolicy getPolicy() { if (proto.hasMultiClusterRoutingUseAny()) { return MultiClusterRoutingPolicy.of(); } else if (proto.hasSingleClusterRouting()) { return new SingleClusterRoutingPolicy(proto.getSingleClusterRouting()); } else { // Should never happen because the constructor verifies that one must exist. throw new VerifyException(); } }
@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; }
mergeSingleClusterRouting(other.getSingleClusterRouting()); break;
@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; }
/** Gets the routing policy for all read/write requests which use this app profile. */ @SuppressWarnings("WeakerAccess") public RoutingPolicy getPolicy() { if (proto.hasMultiClusterRoutingUseAny()) { return MultiClusterRoutingPolicy.of(); } else if (proto.hasSingleClusterRouting()) { return new SingleClusterRoutingPolicy(proto.getSingleClusterRouting()); } else { // Should never happen because the constructor verifies that one must exist. throw new VerifyException(); } }
@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; }
mergeSingleClusterRouting(other.getSingleClusterRouting()); break;