@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; hash = (53 * hash) + getClusterId().hashCode(); if (getLocationsCount() > 0) { hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getLocationsList().hashCode(); } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * Deprecated. The name of the Google Compute Engine * [zone](/compute/docs/zones#available) in which the cluster * resides. * This field has been deprecated and replaced by the name field. * </pre> * * <code>string zone = 2 [deprecated = true];</code> */ @java.lang.Deprecated public Builder clearZone() { zone_ = getDefaultInstance().getZone(); onChanged(); return this; } /**
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.container.v1.SetLocationsRequest)) { return super.equals(obj); } com.google.container.v1.SetLocationsRequest other = (com.google.container.v1.SetLocationsRequest) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && getZone().equals(other.getZone()); result = result && getClusterId().equals(other.getClusterId()); result = result && getLocationsList().equals(other.getLocationsList()); result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The name (project, location, cluster) of the cluster to set locations. * Specified in the format 'projects/*/locations/*/clusters/*'. * </pre> * * <code>string name = 6;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.container.v1.SetLocationsRequest other) { if (other == com.google.container.v1.SetLocationsRequest.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged(); if (!other.getZone().isEmpty()) { zone_ = other.zone_; onChanged(); if (!other.getClusterId().isEmpty()) { clusterId_ = other.clusterId_; onChanged(); if (!other.getName().isEmpty()) { name_ = other.name_; onChanged();
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getProjectIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); } if (!getZoneBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_); } if (!getClusterIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterId_); } { int dataSize = 0; for (int i = 0; i < locations_.size(); i++) { dataSize += computeStringSizeNoTag(locations_.getRaw(i)); } size += dataSize; size += 1 * getLocationsList().size(); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * * * <pre> * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. * </pre> * * <code>string cluster_id = 3 [deprecated = true];</code> */ @java.lang.Deprecated public Builder clearClusterId() { clusterId_ = getDefaultInstance().getClusterId(); onChanged(); return this; } /**
/** * * * <pre> * Deprecated. The Google Developers Console [project ID or project * number](https://support.google.com/cloud/answer/6158840). * This field has been deprecated and replaced by the name field. * </pre> * * <code>string project_id = 1 [deprecated = true];</code> */ @java.lang.Deprecated public Builder clearProjectId() { projectId_ = getDefaultInstance().getProjectId(); onChanged(); return this; } /**
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getProjectIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); } if (!getZoneBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_); } if (!getClusterIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterId_); } for (int i = 0; i < locations_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locations_.getRaw(i)); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); } unknownFields.writeTo(output); }
@java.lang.Override public com.google.container.v1.SetLocationsRequest getDefaultInstanceForType() { return com.google.container.v1.SetLocationsRequest.getDefaultInstance(); }
@java.lang.Override public com.google.container.v1.SetLocationsRequest buildPartial() { com.google.container.v1.SetLocationsRequest result = new com.google.container.v1.SetLocationsRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.projectId_ = projectId_; result.zone_ = zone_; result.clusterId_ = clusterId_; if (((bitField0_ & 0x00000008) == 0x00000008)) { locations_ = locations_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000008); } result.locations_ = locations_; result.name_ = name_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
SetLocationsRequest actualRequest = (SetLocationsRequest) actualRequests.get(0); Assert.assertEquals(projectId, actualRequest.getProjectId()); Assert.assertEquals(zone, actualRequest.getZone()); Assert.assertEquals(clusterId, actualRequest.getClusterId()); Assert.assertEquals(locations, actualRequest.getLocationsList()); Assert.assertTrue( channelProvider.isHeaderSent(
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.container.v1.SetLocationsRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.container.v1.SetLocationsRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
SetLocationsRequest.newBuilder() .setProjectId(projectId) .setZone(zone)