/** * * * <pre> * Deprecated. The name of the Google Compute Engine * [zone](/compute/docs/zones#available) to return operations for. * 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 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@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.GetServerConfigRequest)) { return super.equals(obj); } com.google.container.v1.GetServerConfigRequest other = (com.google.container.v1.GetServerConfigRequest) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && getZone().equals(other.getZone()); result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
@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 (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); } unknownFields.writeTo(output); }
public Builder mergeFrom(com.google.container.v1.GetServerConfigRequest other) { if (other == com.google.container.v1.GetServerConfigRequest.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged(); } if (!other.getZone().isEmpty()) { zone_ = other.zone_; onChanged(); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); 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; } /**
@Test @SuppressWarnings("all") public void getServerConfigTest() { String defaultClusterVersion = "defaultClusterVersion111003029"; String defaultImageType = "defaultImageType-918225828"; ServerConfig expectedResponse = ServerConfig.newBuilder() .setDefaultClusterVersion(defaultClusterVersion) .setDefaultImageType(defaultImageType) .build(); mockClusterManager.addResponse(expectedResponse); String projectId = "projectId-1969970175"; String zone = "zone3744684"; ServerConfig actualResponse = client.getServerConfig(projectId, zone); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockClusterManager.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetServerConfigRequest actualRequest = (GetServerConfigRequest) actualRequests.get(0); Assert.assertEquals(projectId, actualRequest.getProjectId()); Assert.assertEquals(zone, actualRequest.getZone()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
/** * * * <pre> * The name (project and location) of the server config to get * Specified in the format 'projects/*/locations/*'. * </pre> * * <code>string name = 4;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@java.lang.Override public com.google.container.v1.GetServerConfigRequest getDefaultInstanceForType() { return com.google.container.v1.GetServerConfigRequest.getDefaultInstance(); }
@java.lang.Override public com.google.container.v1.GetServerConfigRequest buildPartial() { com.google.container.v1.GetServerConfigRequest result = new com.google.container.v1.GetServerConfigRequest(this); result.projectId_ = projectId_; result.zone_ = zone_; result.name_ = name_; onBuilt(); return result; }
@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 (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.container.v1.GetServerConfigRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.container.v1.GetServerConfigRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
/** * Returns configuration info about the Kubernetes Engine service. * * <p>Sample code: * * <pre><code> * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { * String projectId = ""; * String zone = ""; * ServerConfig response = clusterManagerClient.getServerConfig(projectId, zone); * } * </code></pre> * * @param projectId 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. * @param zone Deprecated. The name of the Google Compute Engine * [zone](/compute/docs/zones#available) to return operations for. This field has been * deprecated and replaced by the name field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServerConfig getServerConfig(String projectId, String zone) { GetServerConfigRequest request = GetServerConfigRequest.newBuilder().setProjectId(projectId).setZone(zone).build(); return getServerConfig(request); }