/** * * * <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 parent 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 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) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().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.ListOperationsRequest)) { return super.equals(obj); } com.google.container.v1.ListOperationsRequest other = (com.google.container.v1.ListOperationsRequest) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && getZone().equals(other.getZone()); result = result && getParent().equals(other.getParent()); 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 (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); } unknownFields.writeTo(output); }
public Builder mergeFrom(com.google.container.v1.ListOperationsRequest other) { if (other == com.google.container.v1.ListOperationsRequest.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged(); } if (!other.getZone().isEmpty()) { zone_ = other.zone_; onChanged(); } if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * Deprecated. The name of the Google Compute Engine * [zone](/compute/docs/zones#available) to return operations for, or `-` for * all zones. This field has been deprecated and replaced by the parent field. * </pre> * * <code>string zone = 2 [deprecated = true];</code> */ @java.lang.Deprecated public Builder clearZone() { zone_ = getDefaultInstance().getZone(); onChanged(); return this; } /**
@Test @SuppressWarnings("all") public void listOperationsTest() { ListOperationsResponse expectedResponse = ListOperationsResponse.newBuilder().build(); mockClusterManager.addResponse(expectedResponse); String projectId = "projectId-1969970175"; String zone = "zone3744684"; ListOperationsResponse actualResponse = client.listOperations(projectId, zone); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockClusterManager.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListOperationsRequest actualRequest = (ListOperationsRequest) actualRequests.get(0); Assert.assertEquals(projectId, actualRequest.getProjectId()); Assert.assertEquals(zone, actualRequest.getZone()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
/** * * * <pre> * The parent (project and location) where the operations will be listed. * Specified in the format 'projects/*/locations/*'. * Location "-" matches all zones and all regions. * </pre> * * <code>string parent = 4;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
@java.lang.Override public com.google.container.v1.ListOperationsRequest getDefaultInstanceForType() { return com.google.container.v1.ListOperationsRequest.getDefaultInstance(); }
@java.lang.Override public com.google.container.v1.ListOperationsRequest buildPartial() { com.google.container.v1.ListOperationsRequest result = new com.google.container.v1.ListOperationsRequest(this); result.projectId_ = projectId_; result.zone_ = zone_; result.parent_ = parent_; 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 (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.container.v1.ListOperationsRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.container.v1.ListOperationsRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
/** * Lists all operations in a project in a specific zone or all zones. * * <p>Sample code: * * <pre><code> * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { * String projectId = ""; * String zone = ""; * ListOperationsResponse response = clusterManagerClient.listOperations(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 parent field. * @param zone Deprecated. The name of the Google Compute Engine * [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This * field has been deprecated and replaced by the parent field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListOperationsResponse listOperations(String projectId, String zone) { ListOperationsRequest request = ListOperationsRequest.newBuilder().setProjectId(projectId).setZone(zone).build(); return listOperations(request); }