@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.Cluster)) { return super.equals(obj); } com.google.bigtable.admin.v2.Cluster other = (com.google.bigtable.admin.v2.Cluster) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getLocation().equals(other.getLocation()); result = result && state_ == other.state_; result = result && (getServeNodes() == other.getServeNodes()); result = result && defaultStorageType_ == other.defaultStorageType_; 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) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + SERVE_NODES_FIELD_NUMBER; hash = (53 * hash) + getServeNodes(); hash = (37 * hash) + DEFAULT_STORAGE_TYPE_FIELD_NUMBER; hash = (53 * hash) + defaultStorageType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * (`CreationOnly`) * The location where this cluster's nodes and storage reside. For best * performance, clients should be located as close as possible to this * cluster. Currently only zones are supported, so values should be of the * form `projects/<project>/locations/<zone>`. * </pre> * * <code>string location = 2;</code> */ public Builder clearLocation() { location_ = getDefaultInstance().getLocation(); onChanged(); return this; } /**
/** Get the zone where this cluster is located. */ @SuppressWarnings("WeakerAccess") public String getZone() { LocationName location = Verify.verifyNotNull(LocationName.parse(stateProto.getLocation())); //noinspection ConstantConditions return location.getLocation(); }
public Builder mergeFrom(com.google.bigtable.admin.v2.Cluster other) { if (other == com.google.bigtable.admin.v2.Cluster.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getLocation().isEmpty()) { location_ = other.location_; onChanged(); } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (other.getServeNodes() != 0) { setServeNodes(other.getServeNodes()); } if (other.defaultStorageType_ != 0) { setDefaultStorageTypeValue(other.getDefaultStorageTypeValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public static String getZoneId(Cluster cluster) { Preconditions.checkState(cluster != null, "Cluster doesn't exist"); return getZoneId(cluster.getLocation()); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.Cluster)) { return super.equals(obj); } com.google.bigtable.admin.v2.Cluster other = (com.google.bigtable.admin.v2.Cluster) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getLocation().equals(other.getLocation()); result = result && state_ == other.state_; result = result && (getServeNodes() == other.getServeNodes()); result = result && defaultStorageType_ == other.defaultStorageType_; 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.Cluster)) { return super.equals(obj); } com.google.bigtable.admin.v2.Cluster other = (com.google.bigtable.admin.v2.Cluster) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getLocation() .equals(other.getLocation()); result = result && state_ == other.state_; result = result && (getServeNodes() == other.getServeNodes()); result = result && defaultStorageType_ == other.defaultStorageType_; 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) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + SERVE_NODES_FIELD_NUMBER; hash = (53 * hash) + getServeNodes(); hash = (37 * hash) + DEFAULT_STORAGE_TYPE_FIELD_NUMBER; hash = (53 * hash) + defaultStorageType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * Gets the current configuration of the cluster as encapsulated by a {@link Cluster} object. * * @param clusterId * @param zoneId * @return the {@link Cluster} if it was set. If the cluster is not found, throw a {@link * NullPointerException}. */ public Cluster getCluster(String clusterId, String zoneId) { Cluster response = null; for (Cluster cluster : getClusters().getClustersList()) { if (cluster.getName().endsWith("/clusters/" + clusterId) && cluster.getLocation().endsWith("/locations/" + zoneId)) { if (response == null) { response = cluster; } else { throw new IllegalStateException( String.format("Got multiple clusters named %s in zone %z.", clusterId, zoneId)); } } } return Preconditions.checkNotNull(response, String.format("Cluster %s in zone %s was not found.", clusterId, zoneId)); }
@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) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + SERVE_NODES_FIELD_NUMBER; hash = (53 * hash) + getServeNodes(); hash = (37 * hash) + DEFAULT_STORAGE_TYPE_FIELD_NUMBER; hash = (53 * hash) + defaultStorageType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <pre> * (`CreationOnly`) * The location where this cluster's nodes and storage reside. For best * performance, clients should be located as close as possible to this cluster. * Currently only zones are supported, so values should be of the form * `projects/<project>/locations/<zone>`. * </pre> * * <code>string location = 2;</code> */ public Builder clearLocation() { location_ = getDefaultInstance().getLocation(); onChanged(); return this; } /**
/** * * * <pre> * (`CreationOnly`) * The location where this cluster's nodes and storage reside. For best * performance, clients should be located as close as possible to this * cluster. Currently only zones are supported, so values should be of the * form `projects/<project>/locations/<zone>`. * </pre> * * <code>string location = 2;</code> */ public Builder clearLocation() { location_ = getDefaultInstance().getLocation(); onChanged(); return this; } /**
/** Get the zone where this cluster is located. */ @SuppressWarnings("WeakerAccess") public String getZone() { LocationName location = Verify.verifyNotNull(LocationName.parse(stateProto.getLocation())); //noinspection ConstantConditions return location.getLocation(); }
public Builder mergeFrom(com.google.bigtable.admin.v2.Cluster other) { if (other == com.google.bigtable.admin.v2.Cluster.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getLocation().isEmpty()) { location_ = other.location_; onChanged(); } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (other.getServeNodes() != 0) { setServeNodes(other.getServeNodes()); } if (other.defaultStorageType_ != 0) { setDefaultStorageTypeValue(other.getDefaultStorageTypeValue()); } onChanged(); return this; }
public Builder mergeFrom(com.google.bigtable.admin.v2.Cluster other) { if (other == com.google.bigtable.admin.v2.Cluster.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getLocation().isEmpty()) { location_ = other.location_; onChanged(); } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (other.getServeNodes() != 0) { setServeNodes(other.getServeNodes()); } if (other.defaultStorageType_ != 0) { setDefaultStorageTypeValue(other.getDefaultStorageTypeValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }