@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.ListClustersResponse)) { return super.equals(obj); } com.google.bigtable.admin.v2.ListClustersResponse other = (com.google.bigtable.admin.v2.ListClustersResponse) obj; boolean result = true; result = result && getClustersList().equals(other.getClustersList()); result = result && getFailedLocationsList().equals(other.getFailedLocationsList()); result = result && getNextPageToken().equals(other.getNextPageToken()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < clusters_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); } { int dataSize = 0; for (int i = 0; i < failedLocations_.size(); i++) { dataSize += computeStringSizeNoTag(failedLocations_.getRaw(i)); } size += dataSize; size += 1 * getFailedLocationsList().size(); } if (!getNextPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@Override public List<Cluster> apply(com.google.bigtable.admin.v2.ListClustersResponse proto) { // NOTE: serverside pagination is not and will not be implemented, so remaining pages // are not fetched. However, if that assumption turns out to be wrong, fail fast to // avoid returning partial data. Verify.verify( proto.getNextPageToken().isEmpty(), "Server returned an unexpected paginated response"); ImmutableList.Builder<Cluster> clusters = ImmutableList.builder(); for (com.google.bigtable.admin.v2.Cluster cluster : proto.getClustersList()) { clusters.add(Cluster.fromProto(cluster)); } ImmutableList.Builder<String> failedZones = ImmutableList.builder(); for (String locationStr : proto.getFailedLocationsList()) { failedZones.add(NameUtil.extractZoneIdFromLocationName(locationStr)); } if (!failedZones.build().isEmpty()) { throw new PartialListClustersException(failedZones.build(), clusters.build()); } return clusters.build(); } },
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getClustersCount() > 0) { hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; hash = (53 * hash) + getClustersList().hashCode(); } if (getFailedLocationsCount() > 0) { hash = (37 * hash) + FAILED_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getFailedLocationsList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); 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.ListClustersResponse)) { return super.equals(obj); } com.google.bigtable.admin.v2.ListClustersResponse other = (com.google.bigtable.admin.v2.ListClustersResponse) obj; boolean result = true; result = result && getClustersList().equals(other.getClustersList()); result = result && getFailedLocationsList().equals(other.getFailedLocationsList()); result = result && getNextPageToken().equals(other.getNextPageToken()); 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.admin.v2.ListClustersResponse)) { return super.equals(obj); } com.google.bigtable.admin.v2.ListClustersResponse other = (com.google.bigtable.admin.v2.ListClustersResponse) obj; boolean result = true; result = result && getClustersList() .equals(other.getClustersList()); result = result && getFailedLocationsList() .equals(other.getFailedLocationsList()); result = result && getNextPageToken() .equals(other.getNextPageToken()); return result; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < clusters_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, clusters_.get(i)); } { int dataSize = 0; for (int i = 0; i < failedLocations_.size(); i++) { dataSize += computeStringSizeNoTag(failedLocations_.getRaw(i)); } size += dataSize; size += 1 * getFailedLocationsList().size(); } if (!getNextPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); } memoizedSize = size; return size; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < clusters_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); } { int dataSize = 0; for (int i = 0; i < failedLocations_.size(); i++) { dataSize += computeStringSizeNoTag(failedLocations_.getRaw(i)); } size += dataSize; size += 1 * getFailedLocationsList().size(); } if (!getNextPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@Override public List<Cluster> apply(com.google.bigtable.admin.v2.ListClustersResponse proto) { // NOTE: serverside pagination is not and will not be implemented, so remaining pages // are not fetched. However, if that assumption turns out to be wrong, fail fast to // avoid returning partial data. Verify.verify( proto.getNextPageToken().isEmpty(), "Server returned an unexpected paginated response"); ImmutableList.Builder<Cluster> clusters = ImmutableList.builder(); for (com.google.bigtable.admin.v2.Cluster cluster : proto.getClustersList()) { clusters.add(Cluster.fromProto(cluster)); } ImmutableList.Builder<String> failedZones = ImmutableList.builder(); for (String locationStr : proto.getFailedLocationsList()) { failedZones.add(NameUtil.extractZoneIdFromLocationName(locationStr)); } if (!failedZones.build().isEmpty()) { throw new PartialListClustersException(failedZones.build(), clusters.build()); } return clusters.build(); } },
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getClustersCount() > 0) { hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; hash = (53 * hash) + getClustersList().hashCode(); } if (getFailedLocationsCount() > 0) { hash = (37 * hash) + FAILED_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getFailedLocationsList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().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(); if (getClustersCount() > 0) { hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; hash = (53 * hash) + getClustersList().hashCode(); } if (getFailedLocationsCount() > 0) { hash = (37 * hash) + FAILED_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getFailedLocationsList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }