diff --git a/java-dataproc/README.md b/java-dataproc/README.md index 592f807391c1..5ae280d1b937 100644 --- a/java-dataproc/README.md +++ b/java-dataproc/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-dataproc - 4.3.0 + 4.4.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dataproc:4.3.0' +implementation 'com.google.cloud:google-cloud-dataproc:4.4.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "4.3.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "4.4.0" ``` ## Authentication diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerClient.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerClient.java new file mode 100644 index 000000000000..c00c66049e6b --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerClient.java @@ -0,0 +1,666 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataproc.v1.stub.NodeGroupControllerStub; +import com.google.cloud.dataproc.v1.stub.NodeGroupControllerStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The `NodeGroupControllerService` provides methods to manage node groups of + * Compute Engine managed instances. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+ *   NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]");
+ *   NodeGroup response = nodeGroupControllerClient.getNodeGroup(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the NodeGroupControllerClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of NodeGroupControllerSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * NodeGroupControllerSettings nodeGroupControllerSettings =
+ *     NodeGroupControllerSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * NodeGroupControllerClient nodeGroupControllerClient =
+ *     NodeGroupControllerClient.create(nodeGroupControllerSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * NodeGroupControllerSettings nodeGroupControllerSettings =
+ *     NodeGroupControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * NodeGroupControllerClient nodeGroupControllerClient =
+ *     NodeGroupControllerClient.create(nodeGroupControllerSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * NodeGroupControllerSettings nodeGroupControllerSettings =
+ *     NodeGroupControllerSettings.newHttpJsonBuilder().build();
+ * NodeGroupControllerClient nodeGroupControllerClient =
+ *     NodeGroupControllerClient.create(nodeGroupControllerSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class NodeGroupControllerClient implements BackgroundResource { + private final NodeGroupControllerSettings settings; + private final NodeGroupControllerStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of NodeGroupControllerClient with default settings. */ + public static final NodeGroupControllerClient create() throws IOException { + return create(NodeGroupControllerSettings.newBuilder().build()); + } + + /** + * Constructs an instance of NodeGroupControllerClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final NodeGroupControllerClient create(NodeGroupControllerSettings settings) + throws IOException { + return new NodeGroupControllerClient(settings); + } + + /** + * Constructs an instance of NodeGroupControllerClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(NodeGroupControllerSettings). + */ + public static final NodeGroupControllerClient create(NodeGroupControllerStub stub) { + return new NodeGroupControllerClient(stub); + } + + /** + * Constructs an instance of NodeGroupControllerClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected NodeGroupControllerClient(NodeGroupControllerSettings settings) throws IOException { + this.settings = settings; + this.stub = ((NodeGroupControllerStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected NodeGroupControllerClient(NodeGroupControllerStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final NodeGroupControllerSettings getSettings() { + return settings; + } + + public NodeGroupControllerStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   ClusterRegionName parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]");
+   *   NodeGroup nodeGroup = NodeGroup.newBuilder().build();
+   *   String nodeGroupId = "nodeGroupId1097129880";
+   *   NodeGroup response =
+   *       nodeGroupControllerClient.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this node group will be created. Format: + * `projects/{project}/regions/{region}/clusters/{cluster}` + * @param nodeGroup Required. The node group to create. + * @param nodeGroupId Optional. An optional node group ID. Generated if not specified. + *

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens + * (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 + * characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNodeGroupAsync( + ClusterRegionName parent, NodeGroup nodeGroup, String nodeGroupId) { + CreateNodeGroupRequest request = + CreateNodeGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNodeGroup(nodeGroup) + .setNodeGroupId(nodeGroupId) + .build(); + return createNodeGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   String parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString();
+   *   NodeGroup nodeGroup = NodeGroup.newBuilder().build();
+   *   String nodeGroupId = "nodeGroupId1097129880";
+   *   NodeGroup response =
+   *       nodeGroupControllerClient.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this node group will be created. Format: + * `projects/{project}/regions/{region}/clusters/{cluster}` + * @param nodeGroup Required. The node group to create. + * @param nodeGroupId Optional. An optional node group ID. Generated if not specified. + *

The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens + * (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 + * characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNodeGroupAsync( + String parent, NodeGroup nodeGroup, String nodeGroupId) { + CreateNodeGroupRequest request = + CreateNodeGroupRequest.newBuilder() + .setParent(parent) + .setNodeGroup(nodeGroup) + .setNodeGroupId(nodeGroupId) + .build(); + return createNodeGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   CreateNodeGroupRequest request =
+   *       CreateNodeGroupRequest.newBuilder()
+   *           .setParent(ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString())
+   *           .setNodeGroup(NodeGroup.newBuilder().build())
+   *           .setNodeGroupId("nodeGroupId1097129880")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   NodeGroup response = nodeGroupControllerClient.createNodeGroupAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNodeGroupAsync( + CreateNodeGroupRequest request) { + return createNodeGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   CreateNodeGroupRequest request =
+   *       CreateNodeGroupRequest.newBuilder()
+   *           .setParent(ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString())
+   *           .setNodeGroup(NodeGroup.newBuilder().build())
+   *           .setNodeGroupId("nodeGroupId1097129880")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       nodeGroupControllerClient.createNodeGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   NodeGroup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createNodeGroupOperationCallable() { + return stub.createNodeGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   CreateNodeGroupRequest request =
+   *       CreateNodeGroupRequest.newBuilder()
+   *           .setParent(ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString())
+   *           .setNodeGroup(NodeGroup.newBuilder().build())
+   *           .setNodeGroupId("nodeGroupId1097129880")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       nodeGroupControllerClient.createNodeGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createNodeGroupCallable() { + return stub.createNodeGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resizes a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   String name = "name3373707";
+   *   int size = 3530753;
+   *   NodeGroup response = nodeGroupControllerClient.resizeNodeGroupAsync(name, size).get();
+   * }
+   * }
+ * + * @param name Required. The name of the node group to resize. Format: + * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` + * @param size Required. The number of running instances for the node group to maintain. The group + * adds or removes instances to maintain the number of instances specified by this parameter. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture resizeNodeGroupAsync( + String name, int size) { + ResizeNodeGroupRequest request = + ResizeNodeGroupRequest.newBuilder().setName(name).setSize(size).build(); + return resizeNodeGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resizes a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   ResizeNodeGroupRequest request =
+   *       ResizeNodeGroupRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setSize(3530753)
+   *           .setRequestId("requestId693933066")
+   *           .setGracefulDecommissionTimeout(Duration.newBuilder().build())
+   *           .build();
+   *   NodeGroup response = nodeGroupControllerClient.resizeNodeGroupAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture resizeNodeGroupAsync( + ResizeNodeGroupRequest request) { + return resizeNodeGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resizes a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   ResizeNodeGroupRequest request =
+   *       ResizeNodeGroupRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setSize(3530753)
+   *           .setRequestId("requestId693933066")
+   *           .setGracefulDecommissionTimeout(Duration.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       nodeGroupControllerClient.resizeNodeGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   NodeGroup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + resizeNodeGroupOperationCallable() { + return stub.resizeNodeGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resizes a node group in a cluster. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] is + * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   ResizeNodeGroupRequest request =
+   *       ResizeNodeGroupRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setSize(3530753)
+   *           .setRequestId("requestId693933066")
+   *           .setGracefulDecommissionTimeout(Duration.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       nodeGroupControllerClient.resizeNodeGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable resizeNodeGroupCallable() { + return stub.resizeNodeGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the resource representation for a node group in a cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]");
+   *   NodeGroup response = nodeGroupControllerClient.getNodeGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the node group to retrieve. Format: + * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NodeGroup getNodeGroup(NodeGroupName name) { + GetNodeGroupRequest request = + GetNodeGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNodeGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the resource representation for a node group in a cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   String name =
+   *       NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString();
+   *   NodeGroup response = nodeGroupControllerClient.getNodeGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the node group to retrieve. Format: + * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NodeGroup getNodeGroup(String name) { + GetNodeGroupRequest request = GetNodeGroupRequest.newBuilder().setName(name).build(); + return getNodeGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the resource representation for a node group in a cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   GetNodeGroupRequest request =
+   *       GetNodeGroupRequest.newBuilder()
+   *           .setName(
+   *               NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString())
+   *           .build();
+   *   NodeGroup response = nodeGroupControllerClient.getNodeGroup(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NodeGroup getNodeGroup(GetNodeGroupRequest request) { + return getNodeGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the resource representation for a node group in a cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+   *   GetNodeGroupRequest request =
+   *       GetNodeGroupRequest.newBuilder()
+   *           .setName(
+   *               NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       nodeGroupControllerClient.getNodeGroupCallable().futureCall(request);
+   *   // Do something.
+   *   NodeGroup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNodeGroupCallable() { + return stub.getNodeGroupCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerSettings.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerSettings.java new file mode 100644 index 000000000000..67a4d010ab14 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerSettings.java @@ -0,0 +1,251 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dataproc.v1.stub.NodeGroupControllerStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link NodeGroupControllerClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dataproc.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNodeGroup to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * NodeGroupControllerSettings.Builder nodeGroupControllerSettingsBuilder =
+ *     NodeGroupControllerSettings.newBuilder();
+ * nodeGroupControllerSettingsBuilder
+ *     .getNodeGroupSettings()
+ *     .setRetrySettings(
+ *         nodeGroupControllerSettingsBuilder.getNodeGroupSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NodeGroupControllerSettings nodeGroupControllerSettings =
+ *     nodeGroupControllerSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class NodeGroupControllerSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createNodeGroup. */ + public UnaryCallSettings createNodeGroupSettings() { + return ((NodeGroupControllerStubSettings) getStubSettings()).createNodeGroupSettings(); + } + + /** Returns the object with the settings used for calls to createNodeGroup. */ + public OperationCallSettings + createNodeGroupOperationSettings() { + return ((NodeGroupControllerStubSettings) getStubSettings()).createNodeGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to resizeNodeGroup. */ + public UnaryCallSettings resizeNodeGroupSettings() { + return ((NodeGroupControllerStubSettings) getStubSettings()).resizeNodeGroupSettings(); + } + + /** Returns the object with the settings used for calls to resizeNodeGroup. */ + public OperationCallSettings + resizeNodeGroupOperationSettings() { + return ((NodeGroupControllerStubSettings) getStubSettings()).resizeNodeGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to getNodeGroup. */ + public UnaryCallSettings getNodeGroupSettings() { + return ((NodeGroupControllerStubSettings) getStubSettings()).getNodeGroupSettings(); + } + + public static final NodeGroupControllerSettings create(NodeGroupControllerStubSettings stub) + throws IOException { + return new NodeGroupControllerSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return NodeGroupControllerStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return NodeGroupControllerStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return NodeGroupControllerStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return NodeGroupControllerStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return NodeGroupControllerStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return NodeGroupControllerStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return NodeGroupControllerStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NodeGroupControllerStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NodeGroupControllerSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for NodeGroupControllerSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(NodeGroupControllerStubSettings.newBuilder(clientContext)); + } + + protected Builder(NodeGroupControllerSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(NodeGroupControllerStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(NodeGroupControllerStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(NodeGroupControllerStubSettings.newHttpJsonBuilder()); + } + + public NodeGroupControllerStubSettings.Builder getStubSettingsBuilder() { + return ((NodeGroupControllerStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createNodeGroup. */ + public UnaryCallSettings.Builder createNodeGroupSettings() { + return getStubSettingsBuilder().createNodeGroupSettings(); + } + + /** Returns the builder for the settings used for calls to createNodeGroup. */ + public OperationCallSettings.Builder< + CreateNodeGroupRequest, NodeGroup, NodeGroupOperationMetadata> + createNodeGroupOperationSettings() { + return getStubSettingsBuilder().createNodeGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to resizeNodeGroup. */ + public UnaryCallSettings.Builder resizeNodeGroupSettings() { + return getStubSettingsBuilder().resizeNodeGroupSettings(); + } + + /** Returns the builder for the settings used for calls to resizeNodeGroup. */ + public OperationCallSettings.Builder< + ResizeNodeGroupRequest, NodeGroup, NodeGroupOperationMetadata> + resizeNodeGroupOperationSettings() { + return getStubSettingsBuilder().resizeNodeGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getNodeGroup. */ + public UnaryCallSettings.Builder getNodeGroupSettings() { + return getStubSettingsBuilder().getNodeGroupSettings(); + } + + @Override + public NodeGroupControllerSettings build() throws IOException { + return new NodeGroupControllerSettings(this); + } + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json index 26e0eeb58e8f..832368b59430 100644 --- a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json @@ -142,6 +142,24 @@ } } } + }, + "NodeGroupController": { + "clients": { + "grpc": { + "libraryClient": "NodeGroupControllerClient", + "rpcs": { + "CreateNodeGroup": { + "methods": ["createNodeGroupAsync", "createNodeGroupAsync", "createNodeGroupAsync", "createNodeGroupOperationCallable", "createNodeGroupCallable"] + }, + "GetNodeGroup": { + "methods": ["getNodeGroup", "getNodeGroup", "getNodeGroup", "getNodeGroupCallable"] + }, + "ResizeNodeGroup": { + "methods": ["resizeNodeGroupAsync", "resizeNodeGroupAsync", "resizeNodeGroupOperationCallable", "resizeNodeGroupCallable"] + } + } + } + } } } } \ No newline at end of file diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java index 7f608efc866d..ab6d8c1c9171 100644 --- a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java @@ -117,6 +117,25 @@ * workflowTemplateServiceClient.createWorkflowTemplate(parent, template); * } * } + * + *

======================= NodeGroupControllerClient ======================= + * + *

Service Description: The `NodeGroupControllerService` provides methods to manage node groups + * of Compute Engine managed instances. + * + *

Sample for NodeGroupControllerClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) {
+ *   NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]");
+ *   NodeGroup response = nodeGroupControllerClient.getNodeGroup(name);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.dataproc.v1; diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcNodeGroupControllerCallableFactory.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcNodeGroupControllerCallableFactory.java new file mode 100644 index 000000000000..95148608da7e --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcNodeGroupControllerCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the NodeGroupController service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcNodeGroupControllerCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcNodeGroupControllerStub.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcNodeGroupControllerStub.java new file mode 100644 index 000000000000..5b7673e26cf4 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcNodeGroupControllerStub.java @@ -0,0 +1,252 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataproc.v1.CreateNodeGroupRequest; +import com.google.cloud.dataproc.v1.GetNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupOperationMetadata; +import com.google.cloud.dataproc.v1.ResizeNodeGroupRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the NodeGroupController service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcNodeGroupControllerStub extends NodeGroupControllerStub { + private static final MethodDescriptor + createNodeGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataproc.v1.NodeGroupController/CreateNodeGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateNodeGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + resizeNodeGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataproc.v1.NodeGroupController/ResizeNodeGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(ResizeNodeGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNodeGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataproc.v1.NodeGroupController/GetNodeGroup") + .setRequestMarshaller(ProtoUtils.marshaller(GetNodeGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NodeGroup.getDefaultInstance())) + .build(); + + private final UnaryCallable createNodeGroupCallable; + private final OperationCallable + createNodeGroupOperationCallable; + private final UnaryCallable resizeNodeGroupCallable; + private final OperationCallable + resizeNodeGroupOperationCallable; + private final UnaryCallable getNodeGroupCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcNodeGroupControllerStub create(NodeGroupControllerStubSettings settings) + throws IOException { + return new GrpcNodeGroupControllerStub(settings, ClientContext.create(settings)); + } + + public static final GrpcNodeGroupControllerStub create(ClientContext clientContext) + throws IOException { + return new GrpcNodeGroupControllerStub( + NodeGroupControllerStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcNodeGroupControllerStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcNodeGroupControllerStub( + NodeGroupControllerStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcNodeGroupControllerStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcNodeGroupControllerStub( + NodeGroupControllerStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcNodeGroupControllerCallableFactory()); + } + + /** + * Constructs an instance of GrpcNodeGroupControllerStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcNodeGroupControllerStub( + NodeGroupControllerStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createNodeGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNodeGroupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings resizeNodeGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resizeNodeGroupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getNodeGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNodeGroupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.createNodeGroupCallable = + callableFactory.createUnaryCallable( + createNodeGroupTransportSettings, settings.createNodeGroupSettings(), clientContext); + this.createNodeGroupOperationCallable = + callableFactory.createOperationCallable( + createNodeGroupTransportSettings, + settings.createNodeGroupOperationSettings(), + clientContext, + operationsStub); + this.resizeNodeGroupCallable = + callableFactory.createUnaryCallable( + resizeNodeGroupTransportSettings, settings.resizeNodeGroupSettings(), clientContext); + this.resizeNodeGroupOperationCallable = + callableFactory.createOperationCallable( + resizeNodeGroupTransportSettings, + settings.resizeNodeGroupOperationSettings(), + clientContext, + operationsStub); + this.getNodeGroupCallable = + callableFactory.createUnaryCallable( + getNodeGroupTransportSettings, settings.getNodeGroupSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createNodeGroupCallable() { + return createNodeGroupCallable; + } + + @Override + public OperationCallable + createNodeGroupOperationCallable() { + return createNodeGroupOperationCallable; + } + + @Override + public UnaryCallable resizeNodeGroupCallable() { + return resizeNodeGroupCallable; + } + + @Override + public OperationCallable + resizeNodeGroupOperationCallable() { + return resizeNodeGroupOperationCallable; + } + + @Override + public UnaryCallable getNodeGroupCallable() { + return getNodeGroupCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/HttpJsonNodeGroupControllerCallableFactory.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/HttpJsonNodeGroupControllerCallableFactory.java new file mode 100644 index 000000000000..e3209b9e61ac --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/HttpJsonNodeGroupControllerCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the NodeGroupController service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonNodeGroupControllerCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/HttpJsonNodeGroupControllerStub.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/HttpJsonNodeGroupControllerStub.java new file mode 100644 index 000000000000..0acea0d80617 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/HttpJsonNodeGroupControllerStub.java @@ -0,0 +1,353 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataproc.v1.CreateNodeGroupRequest; +import com.google.cloud.dataproc.v1.GetNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupOperationMetadata; +import com.google.cloud.dataproc.v1.ResizeNodeGroupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the NodeGroupController service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonNodeGroupControllerStub extends NodeGroupControllerStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(NodeGroup.getDescriptor()) + .add(NodeGroupOperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createNodeGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataproc.v1.NodeGroupController/CreateNodeGroup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/regions/*/clusters/*}/nodeGroups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "nodeGroupId", request.getNodeGroupId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("nodeGroup", request.getNodeGroup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateNodeGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + resizeNodeGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataproc.v1.NodeGroupController/ResizeNodeGroup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}:resize", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ResizeNodeGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getNodeGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataproc.v1.NodeGroupController/GetNodeGroup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(NodeGroup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createNodeGroupCallable; + private final OperationCallable + createNodeGroupOperationCallable; + private final UnaryCallable resizeNodeGroupCallable; + private final OperationCallable + resizeNodeGroupOperationCallable; + private final UnaryCallable getNodeGroupCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonNodeGroupControllerStub create( + NodeGroupControllerStubSettings settings) throws IOException { + return new HttpJsonNodeGroupControllerStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonNodeGroupControllerStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonNodeGroupControllerStub( + NodeGroupControllerStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonNodeGroupControllerStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonNodeGroupControllerStub( + NodeGroupControllerStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonNodeGroupControllerStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonNodeGroupControllerStub( + NodeGroupControllerStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonNodeGroupControllerCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonNodeGroupControllerStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonNodeGroupControllerStub( + NodeGroupControllerStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createNodeGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createNodeGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings resizeNodeGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(resizeNodeGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getNodeGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNodeGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createNodeGroupCallable = + callableFactory.createUnaryCallable( + createNodeGroupTransportSettings, settings.createNodeGroupSettings(), clientContext); + this.createNodeGroupOperationCallable = + callableFactory.createOperationCallable( + createNodeGroupTransportSettings, + settings.createNodeGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.resizeNodeGroupCallable = + callableFactory.createUnaryCallable( + resizeNodeGroupTransportSettings, settings.resizeNodeGroupSettings(), clientContext); + this.resizeNodeGroupOperationCallable = + callableFactory.createOperationCallable( + resizeNodeGroupTransportSettings, + settings.resizeNodeGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getNodeGroupCallable = + callableFactory.createUnaryCallable( + getNodeGroupTransportSettings, settings.getNodeGroupSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createNodeGroupMethodDescriptor); + methodDescriptors.add(resizeNodeGroupMethodDescriptor); + methodDescriptors.add(getNodeGroupMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createNodeGroupCallable() { + return createNodeGroupCallable; + } + + @Override + public OperationCallable + createNodeGroupOperationCallable() { + return createNodeGroupOperationCallable; + } + + @Override + public UnaryCallable resizeNodeGroupCallable() { + return resizeNodeGroupCallable; + } + + @Override + public OperationCallable + resizeNodeGroupOperationCallable() { + return resizeNodeGroupOperationCallable; + } + + @Override + public UnaryCallable getNodeGroupCallable() { + return getNodeGroupCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/NodeGroupControllerStub.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/NodeGroupControllerStub.java new file mode 100644 index 000000000000..168f263a9449 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/NodeGroupControllerStub.java @@ -0,0 +1,72 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataproc.v1.CreateNodeGroupRequest; +import com.google.cloud.dataproc.v1.GetNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupOperationMetadata; +import com.google.cloud.dataproc.v1.ResizeNodeGroupRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the NodeGroupController service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class NodeGroupControllerStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createNodeGroupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createNodeGroupOperationCallable()"); + } + + public UnaryCallable createNodeGroupCallable() { + throw new UnsupportedOperationException("Not implemented: createNodeGroupCallable()"); + } + + public OperationCallable + resizeNodeGroupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: resizeNodeGroupOperationCallable()"); + } + + public UnaryCallable resizeNodeGroupCallable() { + throw new UnsupportedOperationException("Not implemented: resizeNodeGroupCallable()"); + } + + public UnaryCallable getNodeGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getNodeGroupCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/NodeGroupControllerStubSettings.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/NodeGroupControllerStubSettings.java new file mode 100644 index 000000000000..dabb606ce4c2 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/NodeGroupControllerStubSettings.java @@ -0,0 +1,461 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dataproc.v1.CreateNodeGroupRequest; +import com.google.cloud.dataproc.v1.GetNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupOperationMetadata; +import com.google.cloud.dataproc.v1.ResizeNodeGroupRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link NodeGroupControllerStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dataproc.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNodeGroup to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * NodeGroupControllerStubSettings.Builder nodeGroupControllerSettingsBuilder =
+ *     NodeGroupControllerStubSettings.newBuilder();
+ * nodeGroupControllerSettingsBuilder
+ *     .getNodeGroupSettings()
+ *     .setRetrySettings(
+ *         nodeGroupControllerSettingsBuilder.getNodeGroupSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NodeGroupControllerStubSettings nodeGroupControllerSettings =
+ *     nodeGroupControllerSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class NodeGroupControllerStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createNodeGroupSettings; + private final OperationCallSettings + createNodeGroupOperationSettings; + private final UnaryCallSettings resizeNodeGroupSettings; + private final OperationCallSettings + resizeNodeGroupOperationSettings; + private final UnaryCallSettings getNodeGroupSettings; + + /** Returns the object with the settings used for calls to createNodeGroup. */ + public UnaryCallSettings createNodeGroupSettings() { + return createNodeGroupSettings; + } + + /** Returns the object with the settings used for calls to createNodeGroup. */ + public OperationCallSettings + createNodeGroupOperationSettings() { + return createNodeGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to resizeNodeGroup. */ + public UnaryCallSettings resizeNodeGroupSettings() { + return resizeNodeGroupSettings; + } + + /** Returns the object with the settings used for calls to resizeNodeGroup. */ + public OperationCallSettings + resizeNodeGroupOperationSettings() { + return resizeNodeGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to getNodeGroup. */ + public UnaryCallSettings getNodeGroupSettings() { + return getNodeGroupSettings; + } + + public NodeGroupControllerStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcNodeGroupControllerStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonNodeGroupControllerStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dataproc.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dataproc.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(NodeGroupControllerStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(NodeGroupControllerStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NodeGroupControllerStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NodeGroupControllerStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createNodeGroupSettings = settingsBuilder.createNodeGroupSettings().build(); + createNodeGroupOperationSettings = settingsBuilder.createNodeGroupOperationSettings().build(); + resizeNodeGroupSettings = settingsBuilder.resizeNodeGroupSettings().build(); + resizeNodeGroupOperationSettings = settingsBuilder.resizeNodeGroupOperationSettings().build(); + getNodeGroupSettings = settingsBuilder.getNodeGroupSettings().build(); + } + + /** Builder for NodeGroupControllerStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createNodeGroupSettings; + private final OperationCallSettings.Builder< + CreateNodeGroupRequest, NodeGroup, NodeGroupOperationMetadata> + createNodeGroupOperationSettings; + private final UnaryCallSettings.Builder + resizeNodeGroupSettings; + private final OperationCallSettings.Builder< + ResizeNodeGroupRequest, NodeGroup, NodeGroupOperationMetadata> + resizeNodeGroupOperationSettings; + private final UnaryCallSettings.Builder getNodeGroupSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createNodeGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNodeGroupOperationSettings = OperationCallSettings.newBuilder(); + resizeNodeGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resizeNodeGroupOperationSettings = OperationCallSettings.newBuilder(); + getNodeGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createNodeGroupSettings, resizeNodeGroupSettings, getNodeGroupSettings); + initDefaults(this); + } + + protected Builder(NodeGroupControllerStubSettings settings) { + super(settings); + + createNodeGroupSettings = settings.createNodeGroupSettings.toBuilder(); + createNodeGroupOperationSettings = settings.createNodeGroupOperationSettings.toBuilder(); + resizeNodeGroupSettings = settings.resizeNodeGroupSettings.toBuilder(); + resizeNodeGroupOperationSettings = settings.resizeNodeGroupOperationSettings.toBuilder(); + getNodeGroupSettings = settings.getNodeGroupSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createNodeGroupSettings, resizeNodeGroupSettings, getNodeGroupSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createNodeGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .resizeNodeGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getNodeGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createNodeGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(NodeGroup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + NodeGroupOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .resizeNodeGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(NodeGroup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + NodeGroupOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createNodeGroup. */ + public UnaryCallSettings.Builder createNodeGroupSettings() { + return createNodeGroupSettings; + } + + /** Returns the builder for the settings used for calls to createNodeGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateNodeGroupRequest, NodeGroup, NodeGroupOperationMetadata> + createNodeGroupOperationSettings() { + return createNodeGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to resizeNodeGroup. */ + public UnaryCallSettings.Builder resizeNodeGroupSettings() { + return resizeNodeGroupSettings; + } + + /** Returns the builder for the settings used for calls to resizeNodeGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ResizeNodeGroupRequest, NodeGroup, NodeGroupOperationMetadata> + resizeNodeGroupOperationSettings() { + return resizeNodeGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to getNodeGroup. */ + public UnaryCallSettings.Builder getNodeGroupSettings() { + return getNodeGroupSettings; + } + + @Override + public NodeGroupControllerStubSettings build() throws IOException { + return new NodeGroupControllerStubSettings(this); + } + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientHttpJsonTest.java b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientHttpJsonTest.java index 0bcb2ad9211d..f1c70ae5bd42 100644 --- a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientHttpJsonTest.java +++ b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientHttpJsonTest.java @@ -97,6 +97,7 @@ public void submitJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -155,6 +156,7 @@ public void submitJobAsOperationTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -218,6 +220,7 @@ public void getJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -382,6 +385,7 @@ public void updateJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -450,6 +454,7 @@ public void cancelJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); diff --git a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java index ffa2b83b4e3a..15db8d588ee5 100644 --- a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java +++ b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java @@ -101,6 +101,7 @@ public void submitJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockJobController.addResponse(expectedResponse); @@ -155,6 +156,7 @@ public void submitJobAsOperationTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -217,6 +219,7 @@ public void getJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockJobController.addResponse(expectedResponse); @@ -368,6 +371,7 @@ public void updateJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockJobController.addResponse(expectedResponse); @@ -434,6 +438,7 @@ public void cancelJobTest() throws Exception { .setScheduling(JobScheduling.newBuilder().build()) .setJobUuid("jobUuid-1437868776") .setDone(true) + .setDriverSchedulingConfig(DriverSchedulingConfig.newBuilder().build()) .build(); mockJobController.addResponse(expectedResponse); diff --git a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockNodeGroupController.java b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockNodeGroupController.java new file mode 100644 index 000000000000..7b7cff37c787 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockNodeGroupController.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNodeGroupController implements MockGrpcService { + private final MockNodeGroupControllerImpl serviceImpl; + + public MockNodeGroupController() { + serviceImpl = new MockNodeGroupControllerImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockNodeGroupControllerImpl.java b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockNodeGroupControllerImpl.java new file mode 100644 index 000000000000..873c3d8b5148 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockNodeGroupControllerImpl.java @@ -0,0 +1,124 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dataproc.v1.NodeGroupControllerGrpc.NodeGroupControllerImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNodeGroupControllerImpl extends NodeGroupControllerImplBase { + private List requests; + private Queue responses; + + public MockNodeGroupControllerImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createNodeGroup( + CreateNodeGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateNodeGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resizeNodeGroup( + ResizeNodeGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResizeNodeGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNodeGroup( + GetNodeGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NodeGroup) { + requests.add(request); + responseObserver.onNext(((NodeGroup) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNodeGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NodeGroup.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/NodeGroupControllerClientHttpJsonTest.java b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/NodeGroupControllerClientHttpJsonTest.java new file mode 100644 index 000000000000..eade609312c2 --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/NodeGroupControllerClientHttpJsonTest.java @@ -0,0 +1,347 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dataproc.v1.stub.HttpJsonNodeGroupControllerStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class NodeGroupControllerClientHttpJsonTest { + private static MockHttpService mockService; + private static NodeGroupControllerClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonNodeGroupControllerStub.getMethodDescriptors(), + NodeGroupControllerSettings.getDefaultEndpoint()); + NodeGroupControllerSettings settings = + NodeGroupControllerSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + NodeGroupControllerSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NodeGroupControllerClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createNodeGroupTest() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterRegionName parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]"); + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + + NodeGroup actualResponse = client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNodeGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterRegionName parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]"); + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createNodeGroupTest2() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-3127/regions/region-3127/clusters/cluster-3127"; + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + + NodeGroup actualResponse = client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNodeGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3127/regions/region-3127/clusters/cluster-3127"; + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void resizeNodeGroupTest() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resizeNodeGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-8856/regions/region-8856/clusters/cluster-8856/nodeGroups/nodeGroup-8856"; + int size = 3530753; + + NodeGroup actualResponse = client.resizeNodeGroupAsync(name, size).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resizeNodeGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8856/regions/region-8856/clusters/cluster-8856/nodeGroups/nodeGroup-8856"; + int size = 3530753; + client.resizeNodeGroupAsync(name, size).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getNodeGroupTest() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"); + + NodeGroup actualResponse = client.getNodeGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNodeGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"); + client.getNodeGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodeGroupTest2() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8856/regions/region-8856/clusters/cluster-8856/nodeGroups/nodeGroup-8856"; + + NodeGroup actualResponse = client.getNodeGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNodeGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8856/regions/region-8856/clusters/cluster-8856/nodeGroups/nodeGroup-8856"; + client.getNodeGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/NodeGroupControllerClientTest.java b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/NodeGroupControllerClientTest.java new file mode 100644 index 000000000000..1f022990c80f --- /dev/null +++ b/java-dataproc/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/NodeGroupControllerClientTest.java @@ -0,0 +1,332 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class NodeGroupControllerClientTest { + private static MockNodeGroupController mockNodeGroupController; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private NodeGroupControllerClient client; + + @BeforeClass + public static void startStaticServer() { + mockNodeGroupController = new MockNodeGroupController(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockNodeGroupController)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + NodeGroupControllerSettings settings = + NodeGroupControllerSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NodeGroupControllerClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createNodeGroupTest() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNodeGroupController.addResponse(resultOperation); + + ClusterRegionName parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]"); + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + + NodeGroup actualResponse = client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNodeGroupController.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNodeGroupRequest actualRequest = ((CreateNodeGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(nodeGroup, actualRequest.getNodeGroup()); + Assert.assertEquals(nodeGroupId, actualRequest.getNodeGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNodeGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNodeGroupController.addException(exception); + + try { + ClusterRegionName parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]"); + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createNodeGroupTest2() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNodeGroupController.addResponse(resultOperation); + + String parent = "parent-995424086"; + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + + NodeGroup actualResponse = client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNodeGroupController.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNodeGroupRequest actualRequest = ((CreateNodeGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(nodeGroup, actualRequest.getNodeGroup()); + Assert.assertEquals(nodeGroupId, actualRequest.getNodeGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNodeGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNodeGroupController.addException(exception); + + try { + String parent = "parent-995424086"; + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + client.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void resizeNodeGroupTest() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resizeNodeGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNodeGroupController.addResponse(resultOperation); + + String name = "name3373707"; + int size = 3530753; + + NodeGroup actualResponse = client.resizeNodeGroupAsync(name, size).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNodeGroupController.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResizeNodeGroupRequest actualRequest = ((ResizeNodeGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(size, actualRequest.getSize()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resizeNodeGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNodeGroupController.addException(exception); + + try { + String name = "name3373707"; + int size = 3530753; + client.resizeNodeGroupAsync(name, size).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getNodeGroupTest() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockNodeGroupController.addResponse(expectedResponse); + + NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"); + + NodeGroup actualResponse = client.getNodeGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNodeGroupController.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNodeGroupRequest actualRequest = ((GetNodeGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNodeGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNodeGroupController.addException(exception); + + try { + NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"); + client.getNodeGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodeGroupTest2() throws Exception { + NodeGroup expectedResponse = + NodeGroup.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .addAllRoles(new ArrayList()) + .setNodeGroupConfig(InstanceGroupConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockNodeGroupController.addResponse(expectedResponse); + + String name = "name3373707"; + + NodeGroup actualResponse = client.getNodeGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNodeGroupController.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNodeGroupRequest actualRequest = ((GetNodeGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNodeGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNodeGroupController.addException(exception); + + try { + String name = "name3373707"; + client.getNodeGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dataproc/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java b/java-dataproc/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java index 95cd8ec5d1e4..0b9c78721ff4 100644 --- a/java-dataproc/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java +++ b/java-dataproc/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java @@ -456,7 +456,8 @@ public void createCluster( * Updates a cluster in a project. The returned * [Operation.metadata][google.longrunning.Operation.metadata] will be * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error + * The cluster must be in a + * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error * is returned. * */ @@ -660,7 +661,8 @@ public void createCluster( * Updates a cluster in a project. The returned * [Operation.metadata][google.longrunning.Operation.metadata] will be * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error + * The cluster must be in a + * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error * is returned. * */ @@ -820,7 +822,8 @@ public com.google.longrunning.Operation createCluster( * Updates a cluster in a project. The returned * [Operation.metadata][google.longrunning.Operation.metadata] will be * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error + * The cluster must be in a + * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error * is returned. * */ @@ -959,7 +962,8 @@ protected ClusterControllerFutureStub build( * Updates a cluster in a project. The returned * [Operation.metadata][google.longrunning.Operation.metadata] will be * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error + * The cluster must be in a + * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error * is returned. * */ diff --git a/java-dataproc/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerGrpc.java b/java-dataproc/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerGrpc.java new file mode 100644 index 000000000000..065e504f7638 --- /dev/null +++ b/java-dataproc/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupControllerGrpc.java @@ -0,0 +1,609 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.dataproc.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The `NodeGroupControllerService` provides methods to manage node groups
+ * of Compute Engine managed instances.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dataproc/v1/node_groups.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class NodeGroupControllerGrpc { + + private NodeGroupControllerGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dataproc.v1.NodeGroupController"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.CreateNodeGroupRequest, com.google.longrunning.Operation> + getCreateNodeGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNodeGroup", + requestType = com.google.cloud.dataproc.v1.CreateNodeGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.CreateNodeGroupRequest, com.google.longrunning.Operation> + getCreateNodeGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.CreateNodeGroupRequest, com.google.longrunning.Operation> + getCreateNodeGroupMethod; + if ((getCreateNodeGroupMethod = NodeGroupControllerGrpc.getCreateNodeGroupMethod) == null) { + synchronized (NodeGroupControllerGrpc.class) { + if ((getCreateNodeGroupMethod = NodeGroupControllerGrpc.getCreateNodeGroupMethod) == null) { + NodeGroupControllerGrpc.getCreateNodeGroupMethod = + getCreateNodeGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNodeGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataproc.v1.CreateNodeGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NodeGroupControllerMethodDescriptorSupplier("CreateNodeGroup")) + .build(); + } + } + } + return getCreateNodeGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest, com.google.longrunning.Operation> + getResizeNodeGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResizeNodeGroup", + requestType = com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest, com.google.longrunning.Operation> + getResizeNodeGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest, com.google.longrunning.Operation> + getResizeNodeGroupMethod; + if ((getResizeNodeGroupMethod = NodeGroupControllerGrpc.getResizeNodeGroupMethod) == null) { + synchronized (NodeGroupControllerGrpc.class) { + if ((getResizeNodeGroupMethod = NodeGroupControllerGrpc.getResizeNodeGroupMethod) == null) { + NodeGroupControllerGrpc.getResizeNodeGroupMethod = + getResizeNodeGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResizeNodeGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NodeGroupControllerMethodDescriptorSupplier("ResizeNodeGroup")) + .build(); + } + } + } + return getResizeNodeGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.GetNodeGroupRequest, com.google.cloud.dataproc.v1.NodeGroup> + getGetNodeGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNodeGroup", + requestType = com.google.cloud.dataproc.v1.GetNodeGroupRequest.class, + responseType = com.google.cloud.dataproc.v1.NodeGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.GetNodeGroupRequest, com.google.cloud.dataproc.v1.NodeGroup> + getGetNodeGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataproc.v1.GetNodeGroupRequest, + com.google.cloud.dataproc.v1.NodeGroup> + getGetNodeGroupMethod; + if ((getGetNodeGroupMethod = NodeGroupControllerGrpc.getGetNodeGroupMethod) == null) { + synchronized (NodeGroupControllerGrpc.class) { + if ((getGetNodeGroupMethod = NodeGroupControllerGrpc.getGetNodeGroupMethod) == null) { + NodeGroupControllerGrpc.getGetNodeGroupMethod = + getGetNodeGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNodeGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataproc.v1.GetNodeGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance())) + .setSchemaDescriptor( + new NodeGroupControllerMethodDescriptorSupplier("GetNodeGroup")) + .build(); + } + } + } + return getGetNodeGroupMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static NodeGroupControllerStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NodeGroupControllerStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NodeGroupControllerStub(channel, callOptions); + } + }; + return NodeGroupControllerStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NodeGroupControllerBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NodeGroupControllerBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NodeGroupControllerBlockingStub(channel, callOptions); + } + }; + return NodeGroupControllerBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static NodeGroupControllerFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NodeGroupControllerFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NodeGroupControllerFutureStub(channel, callOptions); + } + }; + return NodeGroupControllerFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The `NodeGroupControllerService` provides methods to manage node groups
+   * of Compute Engine managed instances.
+   * 
+ */ + public abstract static class NodeGroupControllerImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public void createNodeGroup( + com.google.cloud.dataproc.v1.CreateNodeGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateNodeGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Resizes a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public void resizeNodeGroup( + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResizeNodeGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the resource representation for a node group in a
+     * cluster.
+     * 
+ */ + public void getNodeGroup( + com.google.cloud.dataproc.v1.GetNodeGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNodeGroupMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateNodeGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataproc.v1.CreateNodeGroupRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_NODE_GROUP))) + .addMethod( + getResizeNodeGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest, + com.google.longrunning.Operation>(this, METHODID_RESIZE_NODE_GROUP))) + .addMethod( + getGetNodeGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataproc.v1.GetNodeGroupRequest, + com.google.cloud.dataproc.v1.NodeGroup>(this, METHODID_GET_NODE_GROUP))) + .build(); + } + } + + /** + * + * + *
+   * The `NodeGroupControllerService` provides methods to manage node groups
+   * of Compute Engine managed instances.
+   * 
+ */ + public static final class NodeGroupControllerStub + extends io.grpc.stub.AbstractAsyncStub { + private NodeGroupControllerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NodeGroupControllerStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NodeGroupControllerStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public void createNodeGroup( + com.google.cloud.dataproc.v1.CreateNodeGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNodeGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resizes a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public void resizeNodeGroup( + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResizeNodeGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the resource representation for a node group in a
+     * cluster.
+     * 
+ */ + public void getNodeGroup( + com.google.cloud.dataproc.v1.GetNodeGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNodeGroupMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * The `NodeGroupControllerService` provides methods to manage node groups
+   * of Compute Engine managed instances.
+   * 
+ */ + public static final class NodeGroupControllerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private NodeGroupControllerBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NodeGroupControllerBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NodeGroupControllerBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public com.google.longrunning.Operation createNodeGroup( + com.google.cloud.dataproc.v1.CreateNodeGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNodeGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resizes a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public com.google.longrunning.Operation resizeNodeGroup( + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResizeNodeGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the resource representation for a node group in a
+     * cluster.
+     * 
+ */ + public com.google.cloud.dataproc.v1.NodeGroup getNodeGroup( + com.google.cloud.dataproc.v1.GetNodeGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNodeGroupMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * The `NodeGroupControllerService` provides methods to manage node groups
+   * of Compute Engine managed instances.
+   * 
+ */ + public static final class NodeGroupControllerFutureStub + extends io.grpc.stub.AbstractFutureStub { + private NodeGroupControllerFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NodeGroupControllerFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NodeGroupControllerFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createNodeGroup(com.google.cloud.dataproc.v1.CreateNodeGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNodeGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resizes a node group in a cluster. The returned
+     * [Operation.metadata][google.longrunning.Operation.metadata] is
+     * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + resizeNodeGroup(com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResizeNodeGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the resource representation for a node group in a
+     * cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dataproc.v1.NodeGroup> + getNodeGroup(com.google.cloud.dataproc.v1.GetNodeGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNodeGroupMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_NODE_GROUP = 0; + private static final int METHODID_RESIZE_NODE_GROUP = 1; + private static final int METHODID_GET_NODE_GROUP = 2; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final NodeGroupControllerImplBase serviceImpl; + private final int methodId; + + MethodHandlers(NodeGroupControllerImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_NODE_GROUP: + serviceImpl.createNodeGroup( + (com.google.cloud.dataproc.v1.CreateNodeGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESIZE_NODE_GROUP: + serviceImpl.resizeNodeGroup( + (com.google.cloud.dataproc.v1.ResizeNodeGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NODE_GROUP: + serviceImpl.getNodeGroup( + (com.google.cloud.dataproc.v1.GetNodeGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class NodeGroupControllerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NodeGroupControllerBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("NodeGroupController"); + } + } + + private static final class NodeGroupControllerFileDescriptorSupplier + extends NodeGroupControllerBaseDescriptorSupplier { + NodeGroupControllerFileDescriptorSupplier() {} + } + + private static final class NodeGroupControllerMethodDescriptorSupplier + extends NodeGroupControllerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + NodeGroupControllerMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (NodeGroupControllerGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NodeGroupControllerFileDescriptorSupplier()) + .addMethod(getCreateNodeGroupMethod()) + .addMethod(getResizeNodeGroupMethod()) + .addMethod(getGetNodeGroupMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryNodeGroup.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryNodeGroup.java new file mode 100644 index 000000000000..574b13e469f3 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryNodeGroup.java @@ -0,0 +1,927 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/clusters.proto + +package com.google.cloud.dataproc.v1; + +/** + * + * + *
+ * Node group identification and configuration information.
+ * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.AuxiliaryNodeGroup} + */ +public final class AuxiliaryNodeGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.AuxiliaryNodeGroup) + AuxiliaryNodeGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuxiliaryNodeGroup.newBuilder() to construct. + private AuxiliaryNodeGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuxiliaryNodeGroup() { + nodeGroupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuxiliaryNodeGroup(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.class, + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder.class); + } + + public static final int NODE_GROUP_FIELD_NUMBER = 1; + private com.google.cloud.dataproc.v1.NodeGroup nodeGroup_; + /** + * + * + *
+   * Required. Node group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroup field is set. + */ + @java.lang.Override + public boolean hasNodeGroup() { + return nodeGroup_ != null; + } + /** + * + * + *
+   * Required. Node group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroup. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroup getNodeGroup() { + return nodeGroup_ == null + ? com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance() + : nodeGroup_; + } + /** + * + * + *
+   * Required. Node group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOrBuilder getNodeGroupOrBuilder() { + return getNodeGroup(); + } + + public static final int NODE_GROUP_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object nodeGroupId_; + /** + * + * + *
+   * Optional. A node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nodeGroupId. + */ + @java.lang.Override + public java.lang.String getNodeGroupId() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nodeGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNodeGroupIdBytes() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (nodeGroup_ != null) { + output.writeMessage(1, getNodeGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nodeGroupId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nodeGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNodeGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nodeGroupId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataproc.v1.AuxiliaryNodeGroup)) { + return super.equals(obj); + } + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup other = + (com.google.cloud.dataproc.v1.AuxiliaryNodeGroup) obj; + + if (hasNodeGroup() != other.hasNodeGroup()) return false; + if (hasNodeGroup()) { + if (!getNodeGroup().equals(other.getNodeGroup())) return false; + } + if (!getNodeGroupId().equals(other.getNodeGroupId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNodeGroup()) { + hash = (37 * hash) + NODE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroup().hashCode(); + } + hash = (37 * hash) + NODE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroupId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dataproc.v1.AuxiliaryNodeGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Node group identification and configuration information.
+   * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.AuxiliaryNodeGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.AuxiliaryNodeGroup) + com.google.cloud.dataproc.v1.AuxiliaryNodeGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.class, + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder.class); + } + + // Construct using com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (nodeGroupBuilder_ == null) { + nodeGroup_ = null; + } else { + nodeGroup_ = null; + nodeGroupBuilder_ = null; + } + nodeGroupId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup getDefaultInstanceForType() { + return com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup build() { + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup buildPartial() { + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup result = + new com.google.cloud.dataproc.v1.AuxiliaryNodeGroup(this); + if (nodeGroupBuilder_ == null) { + result.nodeGroup_ = nodeGroup_; + } else { + result.nodeGroup_ = nodeGroupBuilder_.build(); + } + result.nodeGroupId_ = nodeGroupId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataproc.v1.AuxiliaryNodeGroup) { + return mergeFrom((com.google.cloud.dataproc.v1.AuxiliaryNodeGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataproc.v1.AuxiliaryNodeGroup other) { + if (other == com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.getDefaultInstance()) + return this; + if (other.hasNodeGroup()) { + mergeNodeGroup(other.getNodeGroup()); + } + if (!other.getNodeGroupId().isEmpty()) { + nodeGroupId_ = other.nodeGroupId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getNodeGroupFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + nodeGroupId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.dataproc.v1.NodeGroup nodeGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.NodeGroup, + com.google.cloud.dataproc.v1.NodeGroup.Builder, + com.google.cloud.dataproc.v1.NodeGroupOrBuilder> + nodeGroupBuilder_; + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroup field is set. + */ + public boolean hasNodeGroup() { + return nodeGroupBuilder_ != null || nodeGroup_ != null; + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroup. + */ + public com.google.cloud.dataproc.v1.NodeGroup getNodeGroup() { + if (nodeGroupBuilder_ == null) { + return nodeGroup_ == null + ? com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance() + : nodeGroup_; + } else { + return nodeGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNodeGroup(com.google.cloud.dataproc.v1.NodeGroup value) { + if (nodeGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeGroup_ = value; + onChanged(); + } else { + nodeGroupBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNodeGroup(com.google.cloud.dataproc.v1.NodeGroup.Builder builderForValue) { + if (nodeGroupBuilder_ == null) { + nodeGroup_ = builderForValue.build(); + onChanged(); + } else { + nodeGroupBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNodeGroup(com.google.cloud.dataproc.v1.NodeGroup value) { + if (nodeGroupBuilder_ == null) { + if (nodeGroup_ != null) { + nodeGroup_ = + com.google.cloud.dataproc.v1.NodeGroup.newBuilder(nodeGroup_) + .mergeFrom(value) + .buildPartial(); + } else { + nodeGroup_ = value; + } + onChanged(); + } else { + nodeGroupBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNodeGroup() { + if (nodeGroupBuilder_ == null) { + nodeGroup_ = null; + onChanged(); + } else { + nodeGroup_ = null; + nodeGroupBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataproc.v1.NodeGroup.Builder getNodeGroupBuilder() { + + onChanged(); + return getNodeGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataproc.v1.NodeGroupOrBuilder getNodeGroupOrBuilder() { + if (nodeGroupBuilder_ != null) { + return nodeGroupBuilder_.getMessageOrBuilder(); + } else { + return nodeGroup_ == null + ? com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance() + : nodeGroup_; + } + } + /** + * + * + *
+     * Required. Node group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.NodeGroup, + com.google.cloud.dataproc.v1.NodeGroup.Builder, + com.google.cloud.dataproc.v1.NodeGroupOrBuilder> + getNodeGroupFieldBuilder() { + if (nodeGroupBuilder_ == null) { + nodeGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.NodeGroup, + com.google.cloud.dataproc.v1.NodeGroup.Builder, + com.google.cloud.dataproc.v1.NodeGroupOrBuilder>( + getNodeGroup(), getParentForChildren(), isClean()); + nodeGroup_ = null; + } + return nodeGroupBuilder_; + } + + private java.lang.Object nodeGroupId_ = ""; + /** + * + * + *
+     * Optional. A node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nodeGroupId. + */ + public java.lang.String getNodeGroupId() { + java.lang.Object ref = nodeGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nodeGroupId. + */ + public com.google.protobuf.ByteString getNodeGroupIdBytes() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nodeGroupId to set. + * @return This builder for chaining. + */ + public Builder setNodeGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNodeGroupId() { + + nodeGroupId_ = getDefaultInstance().getNodeGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nodeGroupId to set. + * @return This builder for chaining. + */ + public Builder setNodeGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeGroupId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.AuxiliaryNodeGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.AuxiliaryNodeGroup) + private static final com.google.cloud.dataproc.v1.AuxiliaryNodeGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.AuxiliaryNodeGroup(); + } + + public static com.google.cloud.dataproc.v1.AuxiliaryNodeGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuxiliaryNodeGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryNodeGroupOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryNodeGroupOrBuilder.java new file mode 100644 index 000000000000..ea926d07f919 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryNodeGroupOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/clusters.proto + +package com.google.cloud.dataproc.v1; + +public interface AuxiliaryNodeGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.AuxiliaryNodeGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Node group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroup field is set. + */ + boolean hasNodeGroup(); + /** + * + * + *
+   * Required. Node group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroup. + */ + com.google.cloud.dataproc.v1.NodeGroup getNodeGroup(); + /** + * + * + *
+   * Required. Node group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataproc.v1.NodeGroupOrBuilder getNodeGroupOrBuilder(); + + /** + * + * + *
+   * Optional. A node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nodeGroupId. + */ + java.lang.String getNodeGroupId(); + /** + * + * + *
+   * Optional. A node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nodeGroupId. + */ + com.google.protobuf.ByteString getNodeGroupIdBytes(); +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java index 90cdc6c414c0..2b1894fb7ddd 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java @@ -137,8 +137,10 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * * *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
+   * Required. The cluster name, which must be unique within a project.
+   * The name must start with a lowercase letter, and can contain
+   * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+   * with a hyphen. The name of a deleted cluster can be reused.
    * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -161,8 +163,10 @@ public java.lang.String getClusterName() { * * *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
+   * Required. The cluster name, which must be unique within a project.
+   * The name must start with a lowercase letter, and can contain
+   * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+   * with a hyphen. The name of a deleted cluster can be reused.
    * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -248,13 +252,15 @@ public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() * * *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
+   * Optional. The virtual cluster config is used when creating a Dataproc
+   * cluster that does not directly control the underlying compute resources,
+   * for example, when creating a [Dataproc-on-GKE
+   * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+   * Dataproc may set default values, and values may change when
+   * clusters are updated. Exactly one of
+   * [config][google.cloud.dataproc.v1.Cluster.config] or
+   * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+   * must be specified.
    * 
* * @@ -271,13 +277,15 @@ public boolean hasVirtualClusterConfig() { * * *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
+   * Optional. The virtual cluster config is used when creating a Dataproc
+   * cluster that does not directly control the underlying compute resources,
+   * for example, when creating a [Dataproc-on-GKE
+   * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+   * Dataproc may set default values, and values may change when
+   * clusters are updated. Exactly one of
+   * [config][google.cloud.dataproc.v1.Cluster.config] or
+   * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+   * must be specified.
    * 
* * @@ -296,13 +304,15 @@ public com.google.cloud.dataproc.v1.VirtualClusterConfig getVirtualClusterConfig * * *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
+   * Optional. The virtual cluster config is used when creating a Dataproc
+   * cluster that does not directly control the underlying compute resources,
+   * for example, when creating a [Dataproc-on-GKE
+   * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+   * Dataproc may set default values, and values may change when
+   * clusters are updated. Exactly one of
+   * [config][google.cloud.dataproc.v1.Cluster.config] or
+   * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+   * must be specified.
    * 
* * @@ -1423,8 +1433,10 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
+     * Required. The cluster name, which must be unique within a project.
+     * The name must start with a lowercase letter, and can contain
+     * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+     * with a hyphen. The name of a deleted cluster can be reused.
      * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1446,8 +1458,10 @@ public java.lang.String getClusterName() { * * *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
+     * Required. The cluster name, which must be unique within a project.
+     * The name must start with a lowercase letter, and can contain
+     * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+     * with a hyphen. The name of a deleted cluster can be reused.
      * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1469,8 +1483,10 @@ public com.google.protobuf.ByteString getClusterNameBytes() { * * *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
+     * Required. The cluster name, which must be unique within a project.
+     * The name must start with a lowercase letter, and can contain
+     * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+     * with a hyphen. The name of a deleted cluster can be reused.
      * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1491,8 +1507,10 @@ public Builder setClusterName(java.lang.String value) { * * *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
+     * Required. The cluster name, which must be unique within a project.
+     * The name must start with a lowercase letter, and can contain
+     * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+     * with a hyphen. The name of a deleted cluster can be reused.
      * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1509,8 +1527,10 @@ public Builder clearClusterName() { * * *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
+     * Required. The cluster name, which must be unique within a project.
+     * The name must start with a lowercase letter, and can contain
+     * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+     * with a hyphen. The name of a deleted cluster can be reused.
      * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1760,13 +1780,15 @@ public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1782,13 +1804,15 @@ public boolean hasVirtualClusterConfig() { * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1810,13 +1834,15 @@ public com.google.cloud.dataproc.v1.VirtualClusterConfig getVirtualClusterConfig * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1841,13 +1867,15 @@ public Builder setVirtualClusterConfig( * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1869,13 +1897,15 @@ public Builder setVirtualClusterConfig( * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1904,13 +1934,15 @@ public Builder mergeVirtualClusterConfig( * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1932,13 +1964,15 @@ public Builder clearVirtualClusterConfig() { * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1955,13 +1989,15 @@ public Builder clearVirtualClusterConfig() { * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * @@ -1982,13 +2018,15 @@ public Builder clearVirtualClusterConfig() { * * *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
+     * Optional. The virtual cluster config is used when creating a Dataproc
+     * cluster that does not directly control the underlying compute resources,
+     * for example, when creating a [Dataproc-on-GKE
+     * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+     * Dataproc may set default values, and values may change when
+     * clusters are updated. Exactly one of
+     * [config][google.cloud.dataproc.v1.Cluster.config] or
+     * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+     * must be specified.
      * 
* * diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java index 303fd32c99ce..aded899163ce 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java @@ -41,6 +41,7 @@ private ClusterConfig() { configBucket_ = ""; tempBucket_ = ""; initializationActions_ = java.util.Collections.emptyList(); + auxiliaryNodeGroups_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -144,15 +145,13 @@ public com.google.protobuf.ByteString getConfigBucketBytes() { * * *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
+   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+   * data, such as Spark and MapReduce history files. If you do not specify a
+   * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+   * EU) for your cluster's temp bucket according to the Compute Engine zone
+   * where your cluster is deployed, and then create and manage this
+   * project-level, per-location bucket. The default bucket has a TTL of 90
+   * days, but you can use any TTL (or none) if you specify a bucket (see
    * [Dataproc staging and temp
    * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
    * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -179,15 +178,13 @@ public java.lang.String getTempBucket() {
    *
    *
    * 
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
+   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+   * data, such as Spark and MapReduce history files. If you do not specify a
+   * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+   * EU) for your cluster's temp bucket according to the Compute Engine zone
+   * where your cluster is deployed, and then create and manage this
+   * project-level, per-location bucket. The default bucket has a TTL of 90
+   * days, but you can use any TTL (or none) if you specify a bucket (see
    * [Dataproc staging and temp
    * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
    * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -1013,6 +1010,87 @@ public com.google.cloud.dataproc.v1.DataprocMetricConfig getDataprocMetricConfig
     return getDataprocMetricConfig();
   }
 
+  public static final int AUXILIARY_NODE_GROUPS_FIELD_NUMBER = 25;
+  private java.util.List auxiliaryNodeGroups_;
+  /**
+   *
+   *
+   * 
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAuxiliaryNodeGroupsList() { + return auxiliaryNodeGroups_; + } + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAuxiliaryNodeGroupsOrBuilderList() { + return auxiliaryNodeGroups_; + } + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAuxiliaryNodeGroupsCount() { + return auxiliaryNodeGroups_.size(); + } + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup getAuxiliaryNodeGroups(int index) { + return auxiliaryNodeGroups_.get(index); + } + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroupOrBuilder getAuxiliaryNodeGroupsOrBuilder( + int index) { + return auxiliaryNodeGroups_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1072,6 +1150,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dataprocMetricConfig_ != null) { output.writeMessage(23, getDataprocMetricConfig()); } + for (int i = 0; i < auxiliaryNodeGroups_.size(); i++) { + output.writeMessage(25, auxiliaryNodeGroups_.get(i)); + } getUnknownFields().writeTo(output); } @@ -1130,6 +1211,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getDataprocMetricConfig()); } + for (int i = 0; i < auxiliaryNodeGroups_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(25, auxiliaryNodeGroups_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1197,6 +1282,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDataprocMetricConfig()) { if (!getDataprocMetricConfig().equals(other.getDataprocMetricConfig())) return false; } + if (!getAuxiliaryNodeGroupsList().equals(other.getAuxiliaryNodeGroupsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1264,6 +1350,10 @@ public int hashCode() { hash = (37 * hash) + DATAPROC_METRIC_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getDataprocMetricConfig().hashCode(); } + if (getAuxiliaryNodeGroupsCount() > 0) { + hash = (37 * hash) + AUXILIARY_NODE_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getAuxiliaryNodeGroupsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1485,6 +1575,13 @@ public Builder clear() { dataprocMetricConfig_ = null; dataprocMetricConfigBuilder_ = null; } + if (auxiliaryNodeGroupsBuilder_ == null) { + auxiliaryNodeGroups_ = java.util.Collections.emptyList(); + } else { + auxiliaryNodeGroups_ = null; + auxiliaryNodeGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1584,6 +1681,15 @@ public com.google.cloud.dataproc.v1.ClusterConfig buildPartial() { } else { result.dataprocMetricConfig_ = dataprocMetricConfigBuilder_.build(); } + if (auxiliaryNodeGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + auxiliaryNodeGroups_ = java.util.Collections.unmodifiableList(auxiliaryNodeGroups_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.auxiliaryNodeGroups_ = auxiliaryNodeGroups_; + } else { + result.auxiliaryNodeGroups_ = auxiliaryNodeGroupsBuilder_.build(); + } onBuilt(); return result; } @@ -1704,6 +1810,33 @@ public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterConfig other) { if (other.hasDataprocMetricConfig()) { mergeDataprocMetricConfig(other.getDataprocMetricConfig()); } + if (auxiliaryNodeGroupsBuilder_ == null) { + if (!other.auxiliaryNodeGroups_.isEmpty()) { + if (auxiliaryNodeGroups_.isEmpty()) { + auxiliaryNodeGroups_ = other.auxiliaryNodeGroups_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.addAll(other.auxiliaryNodeGroups_); + } + onChanged(); + } + } else { + if (!other.auxiliaryNodeGroups_.isEmpty()) { + if (auxiliaryNodeGroupsBuilder_.isEmpty()) { + auxiliaryNodeGroupsBuilder_.dispose(); + auxiliaryNodeGroupsBuilder_ = null; + auxiliaryNodeGroups_ = other.auxiliaryNodeGroups_; + bitField0_ = (bitField0_ & ~0x00000002); + auxiliaryNodeGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAuxiliaryNodeGroupsFieldBuilder() + : null; + } else { + auxiliaryNodeGroupsBuilder_.addAllMessages(other.auxiliaryNodeGroups_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1833,6 +1966,20 @@ public Builder mergeFrom( break; } // case 186 + case 202: + { + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup m = + input.readMessage( + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.parser(), + extensionRegistry); + if (auxiliaryNodeGroupsBuilder_ == null) { + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.add(m); + } else { + auxiliaryNodeGroupsBuilder_.addMessage(m); + } + break; + } // case 202 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2013,15 +2160,13 @@ public Builder setConfigBucketBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
+     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+     * data, such as Spark and MapReduce history files. If you do not specify a
+     * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+     * EU) for your cluster's temp bucket according to the Compute Engine zone
+     * where your cluster is deployed, and then create and manage this
+     * project-level, per-location bucket. The default bucket has a TTL of 90
+     * days, but you can use any TTL (or none) if you specify a bucket (see
      * [Dataproc staging and temp
      * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
      * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -2047,15 +2192,13 @@ public java.lang.String getTempBucket() {
      *
      *
      * 
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
+     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+     * data, such as Spark and MapReduce history files. If you do not specify a
+     * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+     * EU) for your cluster's temp bucket according to the Compute Engine zone
+     * where your cluster is deployed, and then create and manage this
+     * project-level, per-location bucket. The default bucket has a TTL of 90
+     * days, but you can use any TTL (or none) if you specify a bucket (see
      * [Dataproc staging and temp
      * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
      * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -2081,15 +2224,13 @@ public com.google.protobuf.ByteString getTempBucketBytes() {
      *
      *
      * 
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
+     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+     * data, such as Spark and MapReduce history files. If you do not specify a
+     * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+     * EU) for your cluster's temp bucket according to the Compute Engine zone
+     * where your cluster is deployed, and then create and manage this
+     * project-level, per-location bucket. The default bucket has a TTL of 90
+     * days, but you can use any TTL (or none) if you specify a bucket (see
      * [Dataproc staging and temp
      * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
      * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -2114,15 +2255,13 @@ public Builder setTempBucket(java.lang.String value) {
      *
      *
      * 
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
+     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+     * data, such as Spark and MapReduce history files. If you do not specify a
+     * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+     * EU) for your cluster's temp bucket according to the Compute Engine zone
+     * where your cluster is deployed, and then create and manage this
+     * project-level, per-location bucket. The default bucket has a TTL of 90
+     * days, but you can use any TTL (or none) if you specify a bucket (see
      * [Dataproc staging and temp
      * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
      * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -2143,15 +2282,13 @@ public Builder clearTempBucket() {
      *
      *
      * 
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
+     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+     * data, such as Spark and MapReduce history files. If you do not specify a
+     * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+     * EU) for your cluster's temp bucket according to the Compute Engine zone
+     * where your cluster is deployed, and then create and manage this
+     * project-level, per-location bucket. The default bucket has a TTL of 90
+     * days, but you can use any TTL (or none) if you specify a bucket (see
      * [Dataproc staging and temp
      * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
      * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -5275,6 +5412,403 @@ public Builder clearDataprocMetricConfig() {
       return dataprocMetricConfigBuilder_;
     }
 
+    private java.util.List auxiliaryNodeGroups_ =
+        java.util.Collections.emptyList();
+
+    private void ensureAuxiliaryNodeGroupsIsMutable() {
+      if (!((bitField0_ & 0x00000002) != 0)) {
+        auxiliaryNodeGroups_ =
+            new java.util.ArrayList(
+                auxiliaryNodeGroups_);
+        bitField0_ |= 0x00000002;
+      }
+    }
+
+    private com.google.protobuf.RepeatedFieldBuilderV3<
+            com.google.cloud.dataproc.v1.AuxiliaryNodeGroup,
+            com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder,
+            com.google.cloud.dataproc.v1.AuxiliaryNodeGroupOrBuilder>
+        auxiliaryNodeGroupsBuilder_;
+
+    /**
+     *
+     *
+     * 
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAuxiliaryNodeGroupsList() { + if (auxiliaryNodeGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(auxiliaryNodeGroups_); + } else { + return auxiliaryNodeGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAuxiliaryNodeGroupsCount() { + if (auxiliaryNodeGroupsBuilder_ == null) { + return auxiliaryNodeGroups_.size(); + } else { + return auxiliaryNodeGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup getAuxiliaryNodeGroups(int index) { + if (auxiliaryNodeGroupsBuilder_ == null) { + return auxiliaryNodeGroups_.get(index); + } else { + return auxiliaryNodeGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuxiliaryNodeGroups( + int index, com.google.cloud.dataproc.v1.AuxiliaryNodeGroup value) { + if (auxiliaryNodeGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.set(index, value); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuxiliaryNodeGroups( + int index, com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder builderForValue) { + if (auxiliaryNodeGroupsBuilder_ == null) { + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuxiliaryNodeGroups(com.google.cloud.dataproc.v1.AuxiliaryNodeGroup value) { + if (auxiliaryNodeGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.add(value); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuxiliaryNodeGroups( + int index, com.google.cloud.dataproc.v1.AuxiliaryNodeGroup value) { + if (auxiliaryNodeGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.add(index, value); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuxiliaryNodeGroups( + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder builderForValue) { + if (auxiliaryNodeGroupsBuilder_ == null) { + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.add(builderForValue.build()); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuxiliaryNodeGroups( + int index, com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder builderForValue) { + if (auxiliaryNodeGroupsBuilder_ == null) { + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAuxiliaryNodeGroups( + java.lang.Iterable values) { + if (auxiliaryNodeGroupsBuilder_ == null) { + ensureAuxiliaryNodeGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, auxiliaryNodeGroups_); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAuxiliaryNodeGroups() { + if (auxiliaryNodeGroupsBuilder_ == null) { + auxiliaryNodeGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAuxiliaryNodeGroups(int index) { + if (auxiliaryNodeGroupsBuilder_ == null) { + ensureAuxiliaryNodeGroupsIsMutable(); + auxiliaryNodeGroups_.remove(index); + onChanged(); + } else { + auxiliaryNodeGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder getAuxiliaryNodeGroupsBuilder( + int index) { + return getAuxiliaryNodeGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroupOrBuilder getAuxiliaryNodeGroupsOrBuilder( + int index) { + if (auxiliaryNodeGroupsBuilder_ == null) { + return auxiliaryNodeGroups_.get(index); + } else { + return auxiliaryNodeGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAuxiliaryNodeGroupsOrBuilderList() { + if (auxiliaryNodeGroupsBuilder_ != null) { + return auxiliaryNodeGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(auxiliaryNodeGroups_); + } + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder addAuxiliaryNodeGroupsBuilder() { + return getAuxiliaryNodeGroupsFieldBuilder() + .addBuilder(com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder addAuxiliaryNodeGroupsBuilder( + int index) { + return getAuxiliaryNodeGroupsFieldBuilder() + .addBuilder(index, com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The node group settings.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAuxiliaryNodeGroupsBuilderList() { + return getAuxiliaryNodeGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup, + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder, + com.google.cloud.dataproc.v1.AuxiliaryNodeGroupOrBuilder> + getAuxiliaryNodeGroupsFieldBuilder() { + if (auxiliaryNodeGroupsBuilder_ == null) { + auxiliaryNodeGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup, + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup.Builder, + com.google.cloud.dataproc.v1.AuxiliaryNodeGroupOrBuilder>( + auxiliaryNodeGroups_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + auxiliaryNodeGroups_ = null; + } + return auxiliaryNodeGroupsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java index 310c89b51c4f..9e1e20b36f68 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java @@ -72,15 +72,13 @@ public interface ClusterConfigOrBuilder * * *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
+   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+   * data, such as Spark and MapReduce history files. If you do not specify a
+   * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+   * EU) for your cluster's temp bucket according to the Compute Engine zone
+   * where your cluster is deployed, and then create and manage this
+   * project-level, per-location bucket. The default bucket has a TTL of 90
+   * days, but you can use any TTL (or none) if you specify a bucket (see
    * [Dataproc staging and temp
    * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
    * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -96,15 +94,13 @@ public interface ClusterConfigOrBuilder
    *
    *
    * 
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
+   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs
+   * data, such as Spark and MapReduce history files. If you do not specify a
+   * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or
+   * EU) for your cluster's temp bucket according to the Compute Engine zone
+   * where your cluster is deployed, and then create and manage this
+   * project-level, per-location bucket. The default bucket has a TTL of 90
+   * days, but you can use any TTL (or none) if you specify a bucket (see
    * [Dataproc staging and temp
    * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
    * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
@@ -742,4 +738,67 @@ com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder getInitialization
    * 
    */
   com.google.cloud.dataproc.v1.DataprocMetricConfigOrBuilder getDataprocMetricConfigOrBuilder();
+
+  /**
+   *
+   *
+   * 
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getAuxiliaryNodeGroupsList(); + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataproc.v1.AuxiliaryNodeGroup getAuxiliaryNodeGroups(int index); + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAuxiliaryNodeGroupsCount(); + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAuxiliaryNodeGroupsOrBuilderList(); + /** + * + * + *
+   * Optional. The node group settings.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataproc.v1.AuxiliaryNodeGroupOrBuilder getAuxiliaryNodeGroupsOrBuilder( + int index); } diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java index 542813e6e31a..060b1fe35569 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java @@ -52,8 +52,10 @@ public interface ClusterOrBuilder * * *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
+   * Required. The cluster name, which must be unique within a project.
+   * The name must start with a lowercase letter, and can contain
+   * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+   * with a hyphen. The name of a deleted cluster can be reused.
    * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -65,8 +67,10 @@ public interface ClusterOrBuilder * * *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
+   * Required. The cluster name, which must be unique within a project.
+   * The name must start with a lowercase letter, and can contain
+   * up to 51 lowercase letters, numbers, and hyphens. It cannot end
+   * with a hyphen. The name of a deleted cluster can be reused.
    * 
* * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -126,13 +130,15 @@ public interface ClusterOrBuilder * * *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
+   * Optional. The virtual cluster config is used when creating a Dataproc
+   * cluster that does not directly control the underlying compute resources,
+   * for example, when creating a [Dataproc-on-GKE
+   * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+   * Dataproc may set default values, and values may change when
+   * clusters are updated. Exactly one of
+   * [config][google.cloud.dataproc.v1.Cluster.config] or
+   * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+   * must be specified.
    * 
* * @@ -146,13 +152,15 @@ public interface ClusterOrBuilder * * *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
+   * Optional. The virtual cluster config is used when creating a Dataproc
+   * cluster that does not directly control the underlying compute resources,
+   * for example, when creating a [Dataproc-on-GKE
+   * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+   * Dataproc may set default values, and values may change when
+   * clusters are updated. Exactly one of
+   * [config][google.cloud.dataproc.v1.Cluster.config] or
+   * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+   * must be specified.
    * 
* * @@ -166,13 +174,15 @@ public interface ClusterOrBuilder * * *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
+   * Optional. The virtual cluster config is used when creating a Dataproc
+   * cluster that does not directly control the underlying compute resources,
+   * for example, when creating a [Dataproc-on-GKE
+   * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
+   * Dataproc may set default values, and values may change when
+   * clusters are updated. Exactly one of
+   * [config][google.cloud.dataproc.v1.Cluster.config] or
+   * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config]
+   * must be specified.
    * 
* * diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterRegionName.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterRegionName.java new file mode 100644 index 000000000000..1c99e7c1fa87 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterRegionName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ClusterRegionName implements ResourceName { + private static final PathTemplate PROJECT_REGION_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/regions/{region}/clusters/{cluster}"); + private volatile Map fieldValuesMap; + private final String project; + private final String region; + private final String cluster; + + @Deprecated + protected ClusterRegionName() { + project = null; + region = null; + cluster = null; + } + + private ClusterRegionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + region = Preconditions.checkNotNull(builder.getRegion()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + } + + public String getProject() { + return project; + } + + public String getRegion() { + return region; + } + + public String getCluster() { + return cluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ClusterRegionName of(String project, String region, String cluster) { + return newBuilder().setProject(project).setRegion(region).setCluster(cluster).build(); + } + + public static String format(String project, String region, String cluster) { + return newBuilder() + .setProject(project) + .setRegion(region) + .setCluster(cluster) + .build() + .toString(); + } + + public static ClusterRegionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_REGION_CLUSTER.validatedMatch( + formattedString, "ClusterRegionName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("region"), matchMap.get("cluster")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ClusterRegionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_REGION_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (region != null) { + fieldMapBuilder.put("region", region); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_REGION_CLUSTER.instantiate( + "project", project, "region", region, "cluster", cluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ClusterRegionName that = ((ClusterRegionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.region, that.region) + && Objects.equals(this.cluster, that.cluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(region); + h *= 1000003; + h ^= Objects.hashCode(cluster); + return h; + } + + /** Builder for projects/{project}/regions/{region}/clusters/{cluster}. */ + public static class Builder { + private String project; + private String region; + private String cluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getRegion() { + return region; + } + + public String getCluster() { + return cluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setRegion(String region) { + this.region = region; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + private Builder(ClusterRegionName clusterRegionName) { + this.project = clusterRegionName.project; + this.region = clusterRegionName.region; + this.cluster = clusterRegionName.cluster; + } + + public ClusterRegionName build() { + return new ClusterRegionName(this); + } + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java index 125c4937d0e2..89f52ba40d65 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java @@ -99,6 +99,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataproc_v1_DiskConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataproc_v1_DiskConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_NodeGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_NodeGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_NodeGroup_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_NodeGroup_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -234,7 +246,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tusB\003\340A\003\022\031\n\014cluster_uuid\030\006 \001(\tB\003\340A\003\022>\n\007m" + "etrics\030\t \001(\0132(.google.cloud.dataproc.v1." + "ClusterMetricsB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\261\010\n\rClusterCo" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\203\t\n\rClusterCo" + "nfig\022\032\n\rconfig_bucket\030\001 \001(\tB\003\340A\001\022\030\n\013temp" + "_bucket\030\002 \001(\tB\003\340A\001\022K\n\022gce_cluster_config" + "\030\010 \001(\0132*.google.cloud.dataproc.v1.GceClu" @@ -261,252 +273,268 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "fig\030\024 \001(\0132).google.cloud.dataproc.v1.Met" + "astoreConfigB\003\340A\001\022S\n\026dataproc_metric_con" + "fig\030\027 \001(\0132..google.cloud.dataproc.v1.Dat" - + "aprocMetricConfigB\003\340A\001\"\204\002\n\024VirtualCluste" - + "rConfig\022\033\n\016staging_bucket\030\001 \001(\tB\003\340A\001\022[\n\031" - + "kubernetes_cluster_config\030\006 \001(\01321.google" - + ".cloud.dataproc.v1.KubernetesClusterConf" - + "igB\003\340A\002H\000\022Y\n\031auxiliary_services_config\030\007" - + " \001(\01321.google.cloud.dataproc.v1.Auxiliar" - + "yServicesConfigB\003\340A\001B\027\n\025infrastructure_c" - + "onfig\"\301\001\n\027AuxiliaryServicesConfig\022H\n\020met" - + "astore_config\030\001 \001(\0132).google.cloud.datap" - + "roc.v1.MetastoreConfigB\003\340A\001\022\\\n\033spark_his" - + "tory_server_config\030\002 \001(\01322.google.cloud." - + "dataproc.v1.SparkHistoryServerConfigB\003\340A" - + "\001\"\272\001\n\016EndpointConfig\022P\n\nhttp_ports\030\001 \003(\013" - + "27.google.cloud.dataproc.v1.EndpointConf" - + "ig.HttpPortsEntryB\003\340A\003\022$\n\027enable_http_po" - + "rt_access\030\002 \001(\010B\003\340A\001\0320\n\016HttpPortsEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\",\n\021Autosc" - + "alingConfig\022\027\n\npolicy_uri\030\001 \001(\tB\003\340A\001\"4\n\020" - + "EncryptionConfig\022 \n\023gce_pd_kms_key_name\030" - + "\001 \001(\tB\003\340A\001\"\233\007\n\020GceClusterConfig\022\025\n\010zone_" - + "uri\030\001 \001(\tB\003\340A\001\022\030\n\013network_uri\030\002 \001(\tB\003\340A\001" - + "\022\033\n\016subnetwork_uri\030\006 \001(\tB\003\340A\001\022\035\n\020interna" - + "l_ip_only\030\007 \001(\010B\003\340A\001\022k\n\032private_ipv6_goo" - + "gle_access\030\014 \001(\0162B.google.cloud.dataproc" - + ".v1.GceClusterConfig.PrivateIpv6GoogleAc" - + "cessB\003\340A\001\022\034\n\017service_account\030\010 \001(\tB\003\340A\001\022" - + "#\n\026service_account_scopes\030\003 \003(\tB\003\340A\001\022\014\n\004" - + "tags\030\004 \003(\t\022J\n\010metadata\030\005 \003(\01328.google.cl" - + "oud.dataproc.v1.GceClusterConfig.Metadat" - + "aEntry\022P\n\024reservation_affinity\030\013 \001(\0132-.g" + + "aprocMetricConfigB\003\340A\001\022P\n\025auxiliary_node" + + "_groups\030\031 \003(\0132,.google.cloud.dataproc.v1" + + ".AuxiliaryNodeGroupB\003\340A\001\"\204\002\n\024VirtualClus" + + "terConfig\022\033\n\016staging_bucket\030\001 \001(\tB\003\340A\001\022[" + + "\n\031kubernetes_cluster_config\030\006 \001(\01321.goog" + + "le.cloud.dataproc.v1.KubernetesClusterCo" + + "nfigB\003\340A\002H\000\022Y\n\031auxiliary_services_config" + + "\030\007 \001(\01321.google.cloud.dataproc.v1.Auxili" + + "aryServicesConfigB\003\340A\001B\027\n\025infrastructure" + + "_config\"\301\001\n\027AuxiliaryServicesConfig\022H\n\020m" + + "etastore_config\030\001 \001(\0132).google.cloud.dat" + + "aproc.v1.MetastoreConfigB\003\340A\001\022\\\n\033spark_h" + + "istory_server_config\030\002 \001(\01322.google.clou" + + "d.dataproc.v1.SparkHistoryServerConfigB\003" + + "\340A\001\"\272\001\n\016EndpointConfig\022P\n\nhttp_ports\030\001 \003" + + "(\01327.google.cloud.dataproc.v1.EndpointCo" + + "nfig.HttpPortsEntryB\003\340A\003\022$\n\027enable_http_" + + "port_access\030\002 \001(\010B\003\340A\001\0320\n\016HttpPortsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\",\n\021Auto" + + "scalingConfig\022\027\n\npolicy_uri\030\001 \001(\tB\003\340A\001\"4" + + "\n\020EncryptionConfig\022 \n\023gce_pd_kms_key_nam" + + "e\030\001 \001(\tB\003\340A\001\"\233\007\n\020GceClusterConfig\022\025\n\010zon" + + "e_uri\030\001 \001(\tB\003\340A\001\022\030\n\013network_uri\030\002 \001(\tB\003\340" + + "A\001\022\033\n\016subnetwork_uri\030\006 \001(\tB\003\340A\001\022\035\n\020inter" + + "nal_ip_only\030\007 \001(\010B\003\340A\001\022k\n\032private_ipv6_g" + + "oogle_access\030\014 \001(\0162B.google.cloud.datapr" + + "oc.v1.GceClusterConfig.PrivateIpv6Google" + + "AccessB\003\340A\001\022\034\n\017service_account\030\010 \001(\tB\003\340A" + + "\001\022#\n\026service_account_scopes\030\003 \003(\tB\003\340A\001\022\014" + + "\n\004tags\030\004 \003(\t\022J\n\010metadata\030\005 \003(\01328.google." + + "cloud.dataproc.v1.GceClusterConfig.Metad" + + "ataEntry\022P\n\024reservation_affinity\030\013 \001(\0132-" + + ".google.cloud.dataproc.v1.ReservationAff" + + "inityB\003\340A\001\022M\n\023node_group_affinity\030\r \001(\0132" + + "+.google.cloud.dataproc.v1.NodeGroupAffi" + + "nityB\003\340A\001\022W\n\030shielded_instance_config\030\016 " + + "\001(\01320.google.cloud.dataproc.v1.ShieldedI" + + "nstanceConfigB\003\340A\001\022_\n\034confidential_insta" + + "nce_config\030\017 \001(\01324.google.cloud.dataproc" + + ".v1.ConfidentialInstanceConfigB\003\340A\001\032/\n\rM" + + "etadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001\"\203\001\n\027PrivateIpv6GoogleAccess\022*\n&PRIV" + + "ATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\020\000\022\033\n\027" + + "INHERIT_FROM_SUBNETWORK\020\001\022\014\n\010OUTBOUND\020\002\022" + + "\021\n\rBIDIRECTIONAL\020\003\"0\n\021NodeGroupAffinity\022" + + "\033\n\016node_group_uri\030\001 \001(\tB\003\340A\002\"}\n\026Shielded" + + "InstanceConfig\022\037\n\022enable_secure_boot\030\001 \001" + + "(\010B\003\340A\001\022\030\n\013enable_vtpm\030\002 \001(\010B\003\340A\001\022(\n\033ena" + + "ble_integrity_monitoring\030\003 \001(\010B\003\340A\001\"F\n\032C" + + "onfidentialInstanceConfig\022(\n\033enable_conf" + + "idential_compute\030\001 \001(\010B\003\340A\001\"\315\004\n\023Instance" + + "GroupConfig\022\032\n\rnum_instances\030\001 \001(\005B\003\340A\001\022" + + "\033\n\016instance_names\030\002 \003(\tB\003\340A\003\022\026\n\timage_ur" + + "i\030\003 \001(\tB\003\340A\001\022\035\n\020machine_type_uri\030\004 \001(\tB\003" + + "\340A\001\022>\n\013disk_config\030\005 \001(\0132$.google.cloud." + + "dataproc.v1.DiskConfigB\003\340A\001\022\033\n\016is_preemp" + + "tible\030\006 \001(\010B\003\340A\003\022Y\n\016preemptibility\030\n \001(\016" + + "2<.google.cloud.dataproc.v1.InstanceGrou" + + "pConfig.PreemptibilityB\003\340A\001\022O\n\024managed_g" + + "roup_config\030\007 \001(\0132,.google.cloud.datapro" + + "c.v1.ManagedGroupConfigB\003\340A\003\022F\n\014accelera" + + "tors\030\010 \003(\0132+.google.cloud.dataproc.v1.Ac" + + "celeratorConfigB\003\340A\001\022\035\n\020min_cpu_platform" + + "\030\t \001(\tB\003\340A\001\"V\n\016Preemptibility\022\036\n\032PREEMPT" + + "IBILITY_UNSPECIFIED\020\000\022\023\n\017NON_PREEMPTIBLE" + + "\020\001\022\017\n\013PREEMPTIBLE\020\002\"c\n\022ManagedGroupConfi" + + "g\022#\n\026instance_template_name\030\001 \001(\tB\003\340A\003\022(" + + "\n\033instance_group_manager_name\030\002 \001(\tB\003\340A\003" + + "\"L\n\021AcceleratorConfig\022\034\n\024accelerator_typ" + + "e_uri\030\001 \001(\t\022\031\n\021accelerator_count\030\002 \001(\005\"\210" + + "\001\n\nDiskConfig\022\033\n\016boot_disk_type\030\003 \001(\tB\003\340" + + "A\001\022\036\n\021boot_disk_size_gb\030\001 \001(\005B\003\340A\001\022\033\n\016nu" + + "m_local_ssds\030\002 \001(\005B\003\340A\001\022 \n\023local_ssd_int" + + "erface\030\004 \001(\tB\003\340A\001\"n\n\022AuxiliaryNodeGroup\022" + + "<\n\nnode_group\030\001 \001(\0132#.google.cloud.datap" + + "roc.v1.NodeGroupB\003\340A\002\022\032\n\rnode_group_id\030\002" + + " \001(\tB\003\340A\001\"\275\003\n\tNodeGroup\022\014\n\004name\030\001 \001(\t\022<\n" + + "\005roles\030\002 \003(\0162(.google.cloud.dataproc.v1." + + "NodeGroup.RoleB\003\340A\002\022M\n\021node_group_config" + + "\030\003 \001(\0132-.google.cloud.dataproc.v1.Instan" + + "ceGroupConfigB\003\340A\001\022D\n\006labels\030\004 \003(\0132/.goo" + + "gle.cloud.dataproc.v1.NodeGroup.LabelsEn" + + "tryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001\"(\n\004Role\022\024\n\020ROLE_UNSPECIF" + + "IED\020\000\022\n\n\006DRIVER\020\001:v\352As\n!dataproc.googlea" + + "pis.com/NodeGroup\022Nprojects/{project}/re" + + "gions/{region}/clusters/{cluster}/nodeGr" + + "oups/{node_group}\"s\n\030NodeInitializationA" + + "ction\022\034\n\017executable_file\030\001 \001(\tB\003\340A\002\0229\n\021e" + + "xecution_timeout\030\002 \001(\0132\031.google.protobuf" + + ".DurationB\003\340A\001\"\307\003\n\rClusterStatus\022A\n\005stat" + + "e\030\001 \001(\0162-.google.cloud.dataproc.v1.Clust" + + "erStatus.StateB\003\340A\003\022\026\n\006detail\030\002 \001(\tB\006\340A\003" + + "\340A\001\0229\n\020state_start_time\030\003 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022G\n\010substate\030\004 \001(\016" + + "20.google.cloud.dataproc.v1.ClusterStatu" + + "s.SubstateB\003\340A\003\"\230\001\n\005State\022\013\n\007UNKNOWN\020\000\022\014" + + "\n\010CREATING\020\001\022\013\n\007RUNNING\020\002\022\t\n\005ERROR\020\003\022\027\n\023" + + "ERROR_DUE_TO_UPDATE\020\t\022\014\n\010DELETING\020\004\022\014\n\010U" + + "PDATING\020\005\022\014\n\010STOPPING\020\006\022\013\n\007STOPPED\020\007\022\014\n\010" + + "STARTING\020\010\"<\n\010Substate\022\017\n\013UNSPECIFIED\020\000\022" + + "\r\n\tUNHEALTHY\020\001\022\020\n\014STALE_STATUS\020\002\"\240\001\n\016Sec" + + "urityConfig\022F\n\017kerberos_config\030\001 \001(\0132(.g" + + "oogle.cloud.dataproc.v1.KerberosConfigB\003" + + "\340A\001\022F\n\017identity_config\030\002 \001(\0132(.google.cl" + + "oud.dataproc.v1.IdentityConfigB\003\340A\001\"\220\004\n\016" + + "KerberosConfig\022\034\n\017enable_kerberos\030\001 \001(\010B" + + "\003\340A\001\022(\n\033root_principal_password_uri\030\002 \001(" + + "\tB\003\340A\001\022\030\n\013kms_key_uri\030\003 \001(\tB\003\340A\001\022\031\n\014keys" + + "tore_uri\030\004 \001(\tB\003\340A\001\022\033\n\016truststore_uri\030\005 " + + "\001(\tB\003\340A\001\022\"\n\025keystore_password_uri\030\006 \001(\tB" + + "\003\340A\001\022\035\n\020key_password_uri\030\007 \001(\tB\003\340A\001\022$\n\027t" + + "ruststore_password_uri\030\010 \001(\tB\003\340A\001\022$\n\027cro" + + "ss_realm_trust_realm\030\t \001(\tB\003\340A\001\022\"\n\025cross" + + "_realm_trust_kdc\030\n \001(\tB\003\340A\001\022+\n\036cross_rea" + + "lm_trust_admin_server\030\013 \001(\tB\003\340A\001\0222\n%cros" + + "s_realm_trust_shared_password_uri\030\014 \001(\tB" + + "\003\340A\001\022\033\n\016kdc_db_key_uri\030\r \001(\tB\003\340A\001\022\037\n\022tgt" + + "_lifetime_hours\030\016 \001(\005B\003\340A\001\022\022\n\005realm\030\017 \001(" + + "\tB\003\340A\001\"\306\001\n\016IdentityConfig\022r\n\034user_servic" + + "e_account_mapping\030\001 \003(\0132G.google.cloud.d" + + "ataproc.v1.IdentityConfig.UserServiceAcc" + + "ountMappingEntryB\003\340A\002\032@\n\036UserServiceAcco" + + "untMappingEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\"\371\001\n\016SoftwareConfig\022\032\n\rimage_vers" + + "ion\030\001 \001(\tB\003\340A\001\022Q\n\nproperties\030\002 \003(\01328.goo" + + "gle.cloud.dataproc.v1.SoftwareConfig.Pro" + + "pertiesEntryB\003\340A\001\022E\n\023optional_components" + + "\030\003 \003(\0162#.google.cloud.dataproc.v1.Compon" + + "entB\003\340A\001\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\"\203\002\n\017LifecycleConfig\022" + + "7\n\017idle_delete_ttl\030\001 \001(\0132\031.google.protob" + + "uf.DurationB\003\340A\001\022;\n\020auto_delete_time\030\002 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\001H\000\0229\n" + + "\017auto_delete_ttl\030\003 \001(\0132\031.google.protobuf" + + ".DurationB\003\340A\001H\000\0228\n\017idle_start_time\030\004 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003B\005\n\003tt" + + "l\"_\n\017MetastoreConfig\022L\n\032dataproc_metasto" + + "re_service\030\001 \001(\tB(\340A\002\372A\"\n metastore.goog" + + "leapis.com/Service\"\377\002\n\024DataprocMetricCon" + + "fig\022K\n\007metrics\030\001 \003(\01325.google.cloud.data" + + "proc.v1.DataprocMetricConfig.MetricB\003\340A\002" + + "\032\200\001\n\006Metric\022W\n\rmetric_source\030\001 \001(\0162;.goo" + + "gle.cloud.dataproc.v1.DataprocMetricConf" + + "ig.MetricSourceB\003\340A\002\022\035\n\020metric_overrides" + + "\030\002 \003(\tB\003\340A\001\"\226\001\n\014MetricSource\022\035\n\031METRIC_S" + + "OURCE_UNSPECIFIED\020\000\022\035\n\031MONITORING_AGENT_" + + "DEFAULTS\020\001\022\010\n\004HDFS\020\002\022\t\n\005SPARK\020\003\022\010\n\004YARN\020" + + "\004\022\030\n\024SPARK_HISTORY_SERVER\020\005\022\017\n\013HIVESERVE" + + "R2\020\006\"\232\002\n\016ClusterMetrics\022O\n\014hdfs_metrics\030" + + "\001 \003(\01329.google.cloud.dataproc.v1.Cluster" + + "Metrics.HdfsMetricsEntry\022O\n\014yarn_metrics" + + "\030\002 \003(\01329.google.cloud.dataproc.v1.Cluste" + + "rMetrics.YarnMetricsEntry\0322\n\020HdfsMetrics" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001\0322\n" + + "\020YarnMetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\003:\0028\001\"\356\001\n\024CreateClusterRequest\022\027\n\npr" + + "oject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002" + + "\0227\n\007cluster\030\002 \001(\0132!.google.cloud.datapro" + + "c.v1.ClusterB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340" + + "A\001\022V\n action_on_failed_primary_workers\030\005" + + " \001(\0162\'.google.cloud.dataproc.v1.FailureA" + + "ctionB\003\340A\001\"\256\002\n\024UpdateClusterRequest\022\027\n\np" + + "roject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\005 \001(\tB\003\340A" + + "\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\0227\n\007cluster\030" + + "\003 \001(\0132!.google.cloud.dataproc.v1.Cluster" + + "B\003\340A\002\022E\n\035graceful_decommission_timeout\030\006" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\0224\n\013" + + "update_mask\030\004 \001(\0132\032.google.protobuf.Fiel" + + "dMaskB\003\340A\002\022\027\n\nrequest_id\030\007 \001(\tB\003\340A\001\"\221\001\n\022" + + "StopClusterRequest\022\027\n\nproject_id\030\001 \001(\tB\003" + + "\340A\002\022\023\n\006region\030\002 \001(\tB\003\340A\002\022\031\n\014cluster_name" + + "\030\003 \001(\tB\003\340A\002\022\031\n\014cluster_uuid\030\004 \001(\tB\003\340A\001\022\027" + + "\n\nrequest_id\030\005 \001(\tB\003\340A\001\"\222\001\n\023StartCluster" + + "Request\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006regi" + + "on\030\002 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\003 \001(\tB\003\340A\002" + + "\022\031\n\014cluster_uuid\030\004 \001(\tB\003\340A\001\022\027\n\nrequest_i" + + "d\030\005 \001(\tB\003\340A\001\"\223\001\n\024DeleteClusterRequest\022\027\n" + + "\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003" + + "\340A\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\022\031\n\014cluste" + + "r_uuid\030\004 \001(\tB\003\340A\001\022\027\n\nrequest_id\030\005 \001(\tB\003\340" + + "A\001\"\\\n\021GetClusterRequest\022\027\n\nproject_id\030\001 " + + "\001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\022\031\n\014cluster" + + "_name\030\002 \001(\tB\003\340A\002\"\211\001\n\023ListClustersRequest" + + "\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\004 \001(" + + "\tB\003\340A\002\022\023\n\006filter\030\005 \001(\tB\003\340A\001\022\026\n\tpage_size" + + "\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"n\n\024" + + "ListClustersResponse\0228\n\010clusters\030\001 \003(\0132!" + + ".google.cloud.dataproc.v1.ClusterB\003\340A\003\022\034" + + "\n\017next_page_token\030\002 \001(\tB\003\340A\003\"a\n\026Diagnose" + + "ClusterRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022" + + "\023\n\006region\030\003 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\002 \001" + + "(\tB\003\340A\002\"1\n\026DiagnoseClusterResults\022\027\n\nout" + + "put_uri\030\001 \001(\tB\003\340A\003\"\370\001\n\023ReservationAffini" + + "ty\022Y\n\030consume_reservation_type\030\001 \001(\01622.g" + "oogle.cloud.dataproc.v1.ReservationAffin" - + "ityB\003\340A\001\022M\n\023node_group_affinity\030\r \001(\0132+." - + "google.cloud.dataproc.v1.NodeGroupAffini" - + "tyB\003\340A\001\022W\n\030shielded_instance_config\030\016 \001(" - + "\01320.google.cloud.dataproc.v1.ShieldedIns" - + "tanceConfigB\003\340A\001\022_\n\034confidential_instanc" - + "e_config\030\017 \001(\01324.google.cloud.dataproc.v" - + "1.ConfidentialInstanceConfigB\003\340A\001\032/\n\rMet" - + "adataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001\"\203\001\n\027PrivateIpv6GoogleAccess\022*\n&PRIVAT" - + "E_IPV6_GOOGLE_ACCESS_UNSPECIFIED\020\000\022\033\n\027IN" - + "HERIT_FROM_SUBNETWORK\020\001\022\014\n\010OUTBOUND\020\002\022\021\n" - + "\rBIDIRECTIONAL\020\003\"0\n\021NodeGroupAffinity\022\033\n" - + "\016node_group_uri\030\001 \001(\tB\003\340A\002\"}\n\026ShieldedIn" - + "stanceConfig\022\037\n\022enable_secure_boot\030\001 \001(\010" - + "B\003\340A\001\022\030\n\013enable_vtpm\030\002 \001(\010B\003\340A\001\022(\n\033enabl" - + "e_integrity_monitoring\030\003 \001(\010B\003\340A\001\"F\n\032Con" - + "fidentialInstanceConfig\022(\n\033enable_confid" - + "ential_compute\030\001 \001(\010B\003\340A\001\"\315\004\n\023InstanceGr" - + "oupConfig\022\032\n\rnum_instances\030\001 \001(\005B\003\340A\001\022\033\n" - + "\016instance_names\030\002 \003(\tB\003\340A\003\022\026\n\timage_uri\030" - + "\003 \001(\tB\003\340A\001\022\035\n\020machine_type_uri\030\004 \001(\tB\003\340A" - + "\001\022>\n\013disk_config\030\005 \001(\0132$.google.cloud.da" - + "taproc.v1.DiskConfigB\003\340A\001\022\033\n\016is_preempti" - + "ble\030\006 \001(\010B\003\340A\003\022Y\n\016preemptibility\030\n \001(\0162<" - + ".google.cloud.dataproc.v1.InstanceGroupC" - + "onfig.PreemptibilityB\003\340A\001\022O\n\024managed_gro" - + "up_config\030\007 \001(\0132,.google.cloud.dataproc." - + "v1.ManagedGroupConfigB\003\340A\003\022F\n\014accelerato" - + "rs\030\010 \003(\0132+.google.cloud.dataproc.v1.Acce" - + "leratorConfigB\003\340A\001\022\035\n\020min_cpu_platform\030\t" - + " \001(\tB\003\340A\001\"V\n\016Preemptibility\022\036\n\032PREEMPTIB" - + "ILITY_UNSPECIFIED\020\000\022\023\n\017NON_PREEMPTIBLE\020\001" - + "\022\017\n\013PREEMPTIBLE\020\002\"c\n\022ManagedGroupConfig\022" - + "#\n\026instance_template_name\030\001 \001(\tB\003\340A\003\022(\n\033" - + "instance_group_manager_name\030\002 \001(\tB\003\340A\003\"L" - + "\n\021AcceleratorConfig\022\034\n\024accelerator_type_" - + "uri\030\001 \001(\t\022\031\n\021accelerator_count\030\002 \001(\005\"\210\001\n" - + "\nDiskConfig\022\033\n\016boot_disk_type\030\003 \001(\tB\003\340A\001" - + "\022\036\n\021boot_disk_size_gb\030\001 \001(\005B\003\340A\001\022\033\n\016num_" - + "local_ssds\030\002 \001(\005B\003\340A\001\022 \n\023local_ssd_inter" - + "face\030\004 \001(\tB\003\340A\001\"s\n\030NodeInitializationAct" - + "ion\022\034\n\017executable_file\030\001 \001(\tB\003\340A\002\0229\n\021exe" - + "cution_timeout\030\002 \001(\0132\031.google.protobuf.D" - + "urationB\003\340A\001\"\307\003\n\rClusterStatus\022A\n\005state\030" - + "\001 \001(\0162-.google.cloud.dataproc.v1.Cluster" - + "Status.StateB\003\340A\003\022\026\n\006detail\030\002 \001(\tB\006\340A\003\340A" - + "\001\0229\n\020state_start_time\030\003 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003\022G\n\010substate\030\004 \001(\01620" - + ".google.cloud.dataproc.v1.ClusterStatus." - + "SubstateB\003\340A\003\"\230\001\n\005State\022\013\n\007UNKNOWN\020\000\022\014\n\010" - + "CREATING\020\001\022\013\n\007RUNNING\020\002\022\t\n\005ERROR\020\003\022\027\n\023ER" - + "ROR_DUE_TO_UPDATE\020\t\022\014\n\010DELETING\020\004\022\014\n\010UPD" - + "ATING\020\005\022\014\n\010STOPPING\020\006\022\013\n\007STOPPED\020\007\022\014\n\010ST" - + "ARTING\020\010\"<\n\010Substate\022\017\n\013UNSPECIFIED\020\000\022\r\n" - + "\tUNHEALTHY\020\001\022\020\n\014STALE_STATUS\020\002\"\240\001\n\016Secur" - + "ityConfig\022F\n\017kerberos_config\030\001 \001(\0132(.goo" - + "gle.cloud.dataproc.v1.KerberosConfigB\003\340A" - + "\001\022F\n\017identity_config\030\002 \001(\0132(.google.clou" - + "d.dataproc.v1.IdentityConfigB\003\340A\001\"\220\004\n\016Ke" - + "rberosConfig\022\034\n\017enable_kerberos\030\001 \001(\010B\003\340" - + "A\001\022(\n\033root_principal_password_uri\030\002 \001(\tB" - + "\003\340A\001\022\030\n\013kms_key_uri\030\003 \001(\tB\003\340A\001\022\031\n\014keysto" - + "re_uri\030\004 \001(\tB\003\340A\001\022\033\n\016truststore_uri\030\005 \001(" - + "\tB\003\340A\001\022\"\n\025keystore_password_uri\030\006 \001(\tB\003\340" - + "A\001\022\035\n\020key_password_uri\030\007 \001(\tB\003\340A\001\022$\n\027tru" - + "ststore_password_uri\030\010 \001(\tB\003\340A\001\022$\n\027cross" - + "_realm_trust_realm\030\t \001(\tB\003\340A\001\022\"\n\025cross_r" - + "ealm_trust_kdc\030\n \001(\tB\003\340A\001\022+\n\036cross_realm" - + "_trust_admin_server\030\013 \001(\tB\003\340A\001\0222\n%cross_" - + "realm_trust_shared_password_uri\030\014 \001(\tB\003\340" - + "A\001\022\033\n\016kdc_db_key_uri\030\r \001(\tB\003\340A\001\022\037\n\022tgt_l" - + "ifetime_hours\030\016 \001(\005B\003\340A\001\022\022\n\005realm\030\017 \001(\tB" - + "\003\340A\001\"\306\001\n\016IdentityConfig\022r\n\034user_service_" - + "account_mapping\030\001 \003(\0132G.google.cloud.dat" - + "aproc.v1.IdentityConfig.UserServiceAccou" - + "ntMappingEntryB\003\340A\002\032@\n\036UserServiceAccoun" - + "tMappingEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001\"\371\001\n\016SoftwareConfig\022\032\n\rimage_versio" - + "n\030\001 \001(\tB\003\340A\001\022Q\n\nproperties\030\002 \003(\01328.googl" - + "e.cloud.dataproc.v1.SoftwareConfig.Prope" - + "rtiesEntryB\003\340A\001\022E\n\023optional_components\030\003" - + " \003(\0162#.google.cloud.dataproc.v1.Componen" - + "tB\003\340A\001\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\t:\0028\001\"\203\002\n\017LifecycleConfig\0227\n" - + "\017idle_delete_ttl\030\001 \001(\0132\031.google.protobuf" - + ".DurationB\003\340A\001\022;\n\020auto_delete_time\030\002 \001(\013" - + "2\032.google.protobuf.TimestampB\003\340A\001H\000\0229\n\017a" - + "uto_delete_ttl\030\003 \001(\0132\031.google.protobuf.D" - + "urationB\003\340A\001H\000\0228\n\017idle_start_time\030\004 \001(\0132" - + "\032.google.protobuf.TimestampB\003\340A\003B\005\n\003ttl\"" - + "_\n\017MetastoreConfig\022L\n\032dataproc_metastore" - + "_service\030\001 \001(\tB(\340A\002\372A\"\n metastore.google" - + "apis.com/Service\"\377\002\n\024DataprocMetricConfi" - + "g\022K\n\007metrics\030\001 \003(\01325.google.cloud.datapr" - + "oc.v1.DataprocMetricConfig.MetricB\003\340A\002\032\200" - + "\001\n\006Metric\022W\n\rmetric_source\030\001 \001(\0162;.googl" - + "e.cloud.dataproc.v1.DataprocMetricConfig" - + ".MetricSourceB\003\340A\002\022\035\n\020metric_overrides\030\002" - + " \003(\tB\003\340A\001\"\226\001\n\014MetricSource\022\035\n\031METRIC_SOU" - + "RCE_UNSPECIFIED\020\000\022\035\n\031MONITORING_AGENT_DE" - + "FAULTS\020\001\022\010\n\004HDFS\020\002\022\t\n\005SPARK\020\003\022\010\n\004YARN\020\004\022" - + "\030\n\024SPARK_HISTORY_SERVER\020\005\022\017\n\013HIVESERVER2" - + "\020\006\"\232\002\n\016ClusterMetrics\022O\n\014hdfs_metrics\030\001 " - + "\003(\01329.google.cloud.dataproc.v1.ClusterMe" - + "trics.HdfsMetricsEntry\022O\n\014yarn_metrics\030\002" - + " \003(\01329.google.cloud.dataproc.v1.ClusterM" - + "etrics.YarnMetricsEntry\0322\n\020HdfsMetricsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001\0322\n\020Y" - + "arnMetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\003:\0028\001\"\356\001\n\024CreateClusterRequest\022\027\n\nproj" - + "ect_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\0227" - + "\n\007cluster\030\002 \001(\0132!.google.cloud.dataproc." - + "v1.ClusterB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001" - + "\022V\n action_on_failed_primary_workers\030\005 \001" - + "(\0162\'.google.cloud.dataproc.v1.FailureAct" - + "ionB\003\340A\001\"\256\002\n\024UpdateClusterRequest\022\027\n\npro" - + "ject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\005 \001(\tB\003\340A\002\022" - + "\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\0227\n\007cluster\030\003 " - + "\001(\0132!.google.cloud.dataproc.v1.ClusterB\003" - + "\340A\002\022E\n\035graceful_decommission_timeout\030\006 \001" - + "(\0132\031.google.protobuf.DurationB\003\340A\001\0224\n\013up" - + "date_mask\030\004 \001(\0132\032.google.protobuf.FieldM" - + "askB\003\340A\002\022\027\n\nrequest_id\030\007 \001(\tB\003\340A\001\"\221\001\n\022St" - + "opClusterRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A" - + "\002\022\023\n\006region\030\002 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\003" - + " \001(\tB\003\340A\002\022\031\n\014cluster_uuid\030\004 \001(\tB\003\340A\001\022\027\n\n" - + "request_id\030\005 \001(\tB\003\340A\001\"\222\001\n\023StartClusterRe" - + "quest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region" - + "\030\002 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\003 \001(\tB\003\340A\002\022\031" - + "\n\014cluster_uuid\030\004 \001(\tB\003\340A\001\022\027\n\nrequest_id\030" - + "\005 \001(\tB\003\340A\001\"\223\001\n\024DeleteClusterRequest\022\027\n\np" - + "roject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A" - + "\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\022\031\n\014cluster_" - + "uuid\030\004 \001(\tB\003\340A\001\022\027\n\nrequest_id\030\005 \001(\tB\003\340A\001" - + "\"\\\n\021GetClusterRequest\022\027\n\nproject_id\030\001 \001(" - + "\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\022\031\n\014cluster_n" - + "ame\030\002 \001(\tB\003\340A\002\"\211\001\n\023ListClustersRequest\022\027" - + "\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\004 \001(\tB" - + "\003\340A\002\022\023\n\006filter\030\005 \001(\tB\003\340A\001\022\026\n\tpage_size\030\002" - + " \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"n\n\024Li" - + "stClustersResponse\0228\n\010clusters\030\001 \003(\0132!.g" - + "oogle.cloud.dataproc.v1.ClusterB\003\340A\003\022\034\n\017" - + "next_page_token\030\002 \001(\tB\003\340A\003\"a\n\026DiagnoseCl" - + "usterRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n" - + "\006region\030\003 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\002 \001(\t" - + "B\003\340A\002\"1\n\026DiagnoseClusterResults\022\027\n\noutpu" - + "t_uri\030\001 \001(\tB\003\340A\003\"\370\001\n\023ReservationAffinity" - + "\022Y\n\030consume_reservation_type\030\001 \001(\01622.goo" - + "gle.cloud.dataproc.v1.ReservationAffinit" - + "y.TypeB\003\340A\001\022\020\n\003key\030\002 \001(\tB\003\340A\001\022\023\n\006values\030" - + "\003 \003(\tB\003\340A\001\"_\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000" - + "\022\022\n\016NO_RESERVATION\020\001\022\023\n\017ANY_RESERVATION\020" - + "\002\022\030\n\024SPECIFIC_RESERVATION\020\0032\344\020\n\021ClusterC" - + "ontroller\022\200\002\n\rCreateCluster\022..google.clo" - + "ud.dataproc.v1.CreateClusterRequest\032\035.go" - + "ogle.longrunning.Operation\"\237\001\202\323\344\223\002>\"3/v1" - + "/projects/{project_id}/regions/{region}/" - + "clusters:\007cluster\332A\031project_id,region,cl" - + "uster\312A<\n\007Cluster\0221google.cloud.dataproc" - + ".v1.ClusterOperationMetadata\022\250\002\n\rUpdateC" - + "luster\022..google.cloud.dataproc.v1.Update" - + "ClusterRequest\032\035.google.longrunning.Oper" - + "ation\"\307\001\202\323\344\223\002M2B/v1/projects/{project_id" - + "}/regions/{region}/clusters/{cluster_nam" - + "e}:\007cluster\332A2project_id,region,cluster_" - + "name,cluster,update_mask\312A<\n\007Cluster\0221go" - + "ogle.cloud.dataproc.v1.ClusterOperationM" - + "etadata\022\356\001\n\013StopCluster\022,.google.cloud.d" - + "ataproc.v1.StopClusterRequest\032\035.google.l" - + "ongrunning.Operation\"\221\001\202\323\344\223\002L\"G/v1/proje" - + "cts/{project_id}/regions/{region}/cluste" - + "rs/{cluster_name}:stop:\001*\312A<\n\007Cluster\0221g" - + "oogle.cloud.dataproc.v1.ClusterOperation" - + "Metadata\022\361\001\n\014StartCluster\022-.google.cloud" - + ".dataproc.v1.StartClusterRequest\032\035.googl" - + "e.longrunning.Operation\"\222\001\202\323\344\223\002M\"H/v1/pr" + + "ity.TypeB\003\340A\001\022\020\n\003key\030\002 \001(\tB\003\340A\001\022\023\n\006value" + + "s\030\003 \003(\tB\003\340A\001\"_\n\004Type\022\024\n\020TYPE_UNSPECIFIED" + + "\020\000\022\022\n\016NO_RESERVATION\020\001\022\023\n\017ANY_RESERVATIO" + + "N\020\002\022\030\n\024SPECIFIC_RESERVATION\020\0032\344\020\n\021Cluste" + + "rController\022\200\002\n\rCreateCluster\022..google.c" + + "loud.dataproc.v1.CreateClusterRequest\032\035." + + "google.longrunning.Operation\"\237\001\202\323\344\223\002>\"3/" + + "v1/projects/{project_id}/regions/{region" + + "}/clusters:\007cluster\332A\031project_id,region," + + "cluster\312A<\n\007Cluster\0221google.cloud.datapr" + + "oc.v1.ClusterOperationMetadata\022\250\002\n\rUpdat" + + "eCluster\022..google.cloud.dataproc.v1.Upda" + + "teClusterRequest\032\035.google.longrunning.Op" + + "eration\"\307\001\202\323\344\223\002M2B/v1/projects/{project_" + + "id}/regions/{region}/clusters/{cluster_n" + + "ame}:\007cluster\332A2project_id,region,cluste" + + "r_name,cluster,update_mask\312A<\n\007Cluster\0221" + + "google.cloud.dataproc.v1.ClusterOperatio" + + "nMetadata\022\356\001\n\013StopCluster\022,.google.cloud" + + ".dataproc.v1.StopClusterRequest\032\035.google" + + ".longrunning.Operation\"\221\001\202\323\344\223\002L\"G/v1/pro" + + "jects/{project_id}/regions/{region}/clus" + + "ters/{cluster_name}:stop:\001*\312A<\n\007Cluster\022" + + "1google.cloud.dataproc.v1.ClusterOperati" + + "onMetadata\022\361\001\n\014StartCluster\022-.google.clo" + + "ud.dataproc.v1.StartClusterRequest\032\035.goo" + + "gle.longrunning.Operation\"\222\001\202\323\344\223\002M\"H/v1/" + + "projects/{project_id}/regions/{region}/c" + + "lusters/{cluster_name}:start:\001*\312A<\n\007Clus" + + "ter\0221google.cloud.dataproc.v1.ClusterOpe" + + "rationMetadata\022\231\002\n\rDeleteCluster\022..googl" + + "e.cloud.dataproc.v1.DeleteClusterRequest" + + "\032\035.google.longrunning.Operation\"\270\001\202\323\344\223\002D" + + "*B/v1/projects/{project_id}/regions/{reg" + + "ion}/clusters/{cluster_name}\332A\036project_i" + + "d,region,cluster_name\312AJ\n\025google.protobu" + + "f.Empty\0221google.cloud.dataproc.v1.Cluste" + + "rOperationMetadata\022\311\001\n\nGetCluster\022+.goog" + + "le.cloud.dataproc.v1.GetClusterRequest\032!" + + ".google.cloud.dataproc.v1.Cluster\"k\202\323\344\223\002" + + "D\022B/v1/projects/{project_id}/regions/{re" + + "gion}/clusters/{cluster_name}\332A\036project_" + + "id,region,cluster_name\022\331\001\n\014ListClusters\022" + + "-.google.cloud.dataproc.v1.ListClustersR" + + "equest\032..google.cloud.dataproc.v1.ListCl" + + "ustersResponse\"j\202\323\344\223\0025\0223/v1/projects/{pr" + + "oject_id}/regions/{region}/clusters\332A\021pr" + + "oject_id,region\332A\030project_id,region,filt" + + "er\022\252\002\n\017DiagnoseCluster\0220.google.cloud.da" + + "taproc.v1.DiagnoseClusterRequest\032\035.googl" + + "e.longrunning.Operation\"\305\001\202\323\344\223\002P\"K/v1/pr" + "ojects/{project_id}/regions/{region}/clu" - + "sters/{cluster_name}:start:\001*\312A<\n\007Cluste" - + "r\0221google.cloud.dataproc.v1.ClusterOpera" - + "tionMetadata\022\231\002\n\rDeleteCluster\022..google." - + "cloud.dataproc.v1.DeleteClusterRequest\032\035" - + ".google.longrunning.Operation\"\270\001\202\323\344\223\002D*B" - + "/v1/projects/{project_id}/regions/{regio" - + "n}/clusters/{cluster_name}\332A\036project_id," - + "region,cluster_name\312AJ\n\025google.protobuf." - + "Empty\0221google.cloud.dataproc.v1.ClusterO" - + "perationMetadata\022\311\001\n\nGetCluster\022+.google" - + ".cloud.dataproc.v1.GetClusterRequest\032!.g" - + "oogle.cloud.dataproc.v1.Cluster\"k\202\323\344\223\002D\022" - + "B/v1/projects/{project_id}/regions/{regi" - + "on}/clusters/{cluster_name}\332A\036project_id" - + ",region,cluster_name\022\331\001\n\014ListClusters\022-." - + "google.cloud.dataproc.v1.ListClustersReq" - + "uest\032..google.cloud.dataproc.v1.ListClus" - + "tersResponse\"j\202\323\344\223\0025\0223/v1/projects/{proj" - + "ect_id}/regions/{region}/clusters\332A\021proj" - + "ect_id,region\332A\030project_id,region,filter" - + "\022\252\002\n\017DiagnoseCluster\0220.google.cloud.data" - + "proc.v1.DiagnoseClusterRequest\032\035.google." - + "longrunning.Operation\"\305\001\202\323\344\223\002P\"K/v1/proj" - + "ects/{project_id}/regions/{region}/clust" - + "ers/{cluster_name}:diagnose:\001*\332A\036project" - + "_id,region,cluster_name\312AK\n\026DiagnoseClus" - + "terResults\0221google.cloud.dataproc.v1.Clu" - + "sterOperationMetadata\032K\312A\027dataproc.googl" - + "eapis.com\322A.https://www.googleapis.com/a" - + "uth/cloud-platformB\263\002\n\034com.google.cloud." - + "dataproc.v1B\rClustersProtoP\001Z@google.gol" - + "ang.org/genproto/googleapis/cloud/datapr" - + "oc/v1;dataproc\352A^\n container.googleapis." - + "com/Cluster\022:projects/{project}/location" - + "s/{location}/clusters/{cluster}\352A^\n meta" - + "store.googleapis.com/Service\022:projects/{" - + "project}/locations/{location}/services/{" - + "service}b\006proto3" + + "sters/{cluster_name}:diagnose:\001*\332A\036proje" + + "ct_id,region,cluster_name\312AK\n\026DiagnoseCl" + + "usterResults\0221google.cloud.dataproc.v1.C" + + "lusterOperationMetadata\032K\312A\027dataproc.goo" + + "gleapis.com\322A.https://www.googleapis.com" + + "/auth/cloud-platformB\263\002\n\034com.google.clou" + + "d.dataproc.v1B\rClustersProtoP\001Z@google.g" + + "olang.org/genproto/googleapis/cloud/data" + + "proc/v1;dataproc\352A^\n container.googleapi" + + "s.com/Cluster\022:projects/{project}/locati" + + "ons/{location}/clusters/{cluster}\352A^\n me" + + "tastore.googleapis.com/Service\022:projects" + + "/{project}/locations/{location}/services" + + "/{service}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -567,6 +595,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EndpointConfig", "MetastoreConfig", "DataprocMetricConfig", + "AuxiliaryNodeGroups", }); internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_descriptor = getDescriptor().getMessageTypes().get(2); @@ -714,8 +743,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "BootDiskType", "BootDiskSizeGb", "NumLocalSsds", "LocalSsdInterface", }); - internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor = + internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_AuxiliaryNodeGroup_descriptor, + new java.lang.String[] { + "NodeGroup", "NodeGroupId", + }); + internal_static_google_cloud_dataproc_v1_NodeGroup_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dataproc_v1_NodeGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_NodeGroup_descriptor, + new java.lang.String[] { + "Name", "Roles", "NodeGroupConfig", "Labels", + }); + internal_static_google_cloud_dataproc_v1_NodeGroup_LabelsEntry_descriptor = + internal_static_google_cloud_dataproc_v1_NodeGroup_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dataproc_v1_NodeGroup_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_NodeGroup_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor = + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dataproc_v1_NodeInitializationAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor, @@ -723,7 +776,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExecutableFile", "ExecutionTimeout", }); internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dataproc_v1_ClusterStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor, @@ -731,7 +784,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "Detail", "StateStartTime", "Substate", }); internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dataproc_v1_SecurityConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor, @@ -739,7 +792,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "KerberosConfig", "IdentityConfig", }); internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dataproc_v1_KerberosConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor, @@ -761,7 +814,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Realm", }); internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dataproc_v1_IdentityConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor, @@ -777,7 +830,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dataproc_v1_SoftwareConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor, @@ -793,7 +846,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dataproc_v1_LifecycleConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor, @@ -801,7 +854,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IdleDeleteTtl", "AutoDeleteTime", "AutoDeleteTtl", "IdleStartTime", "Ttl", }); internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dataproc_v1_MetastoreConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor, @@ -809,7 +862,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataprocMetastoreService", }); internal_static_google_cloud_dataproc_v1_DataprocMetricConfig_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dataproc_v1_DataprocMetricConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_DataprocMetricConfig_descriptor, @@ -827,7 +880,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSource", "MetricOverrides", }); internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_dataproc_v1_ClusterMetrics_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor, @@ -851,7 +904,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_dataproc_v1_CreateClusterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor, @@ -859,7 +912,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "Cluster", "RequestId", "ActionOnFailedPrimaryWorkers", }); internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor, @@ -873,7 +926,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RequestId", }); internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_dataproc_v1_StopClusterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor, @@ -881,7 +934,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "ClusterName", "ClusterUuid", "RequestId", }); internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_dataproc_v1_StartClusterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor, @@ -889,7 +942,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "ClusterName", "ClusterUuid", "RequestId", }); internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor, @@ -897,7 +950,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "ClusterName", "ClusterUuid", "RequestId", }); internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_dataproc_v1_GetClusterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor, @@ -905,7 +958,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "ClusterName", }); internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_dataproc_v1_ListClustersRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor, @@ -913,7 +966,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "Filter", "PageSize", "PageToken", }); internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_dataproc_v1_ListClustersResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor, @@ -921,7 +974,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Clusters", "NextPageToken", }); internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor, @@ -929,7 +982,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "ClusterName", }); internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor, @@ -937,7 +990,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OutputUri", }); internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_dataproc_v1_ReservationAffinity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor, @@ -951,6 +1004,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.AnnotationsProto.http); registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); registry.add(com.google.longrunning.OperationsProto.operationInfo); diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfig.java index 911a7f764cfb..0e7c53d6728e 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfig.java @@ -72,7 +72,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. Defines whether the instance should have confidential compute enabled.
+   * Optional. Defines whether the instance should have confidential compute
+   * enabled.
    * 
* * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -420,7 +421,8 @@ public Builder mergeFrom( * * *
-     * Optional. Defines whether the instance should have confidential compute enabled.
+     * Optional. Defines whether the instance should have confidential compute
+     * enabled.
      * 
* * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -435,7 +437,8 @@ public boolean getEnableConfidentialCompute() { * * *
-     * Optional. Defines whether the instance should have confidential compute enabled.
+     * Optional. Defines whether the instance should have confidential compute
+     * enabled.
      * 
* * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -453,7 +456,8 @@ public Builder setEnableConfidentialCompute(boolean value) { * * *
-     * Optional. Defines whether the instance should have confidential compute enabled.
+     * Optional. Defines whether the instance should have confidential compute
+     * enabled.
      * 
* * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfigOrBuilder.java index dcf27cf823f9..767898d599b9 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfigOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfigOrBuilder.java @@ -27,7 +27,8 @@ public interface ConfidentialInstanceConfigOrBuilder * * *
-   * Optional. Defines whether the instance should have confidential compute enabled.
+   * Optional. Defines whether the instance should have confidential compute
+   * enabled.
    * 
* * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java index 8d5654938163..f8214ad4744d 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java @@ -225,11 +225,12 @@ public com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder() { * * *
-   * Optional. A unique ID used to identify the request. If the server receives two
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
    * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
    * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
    * It is recommended to always set this value to a
    * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
    * The ID must contain only letters (a-z, A-Z), numbers (0-9),
@@ -256,11 +257,12 @@ public java.lang.String getRequestId() {
    *
    *
    * 
-   * Optional. A unique ID used to identify the request. If the server receives two
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
    * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
    * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
    * It is recommended to always set this value to a
    * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
    * The ID must contain only letters (a-z, A-Z), numbers (0-9),
@@ -1181,11 +1183,12 @@ public com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder() {
      *
      *
      * 
-     * Optional. A unique ID used to identify the request. If the server receives two
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
      * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
      * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
      * It is recommended to always set this value to a
      * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
      * The ID must contain only letters (a-z, A-Z), numbers (0-9),
@@ -1211,11 +1214,12 @@ public java.lang.String getRequestId() {
      *
      *
      * 
-     * Optional. A unique ID used to identify the request. If the server receives two
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
      * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
      * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
      * It is recommended to always set this value to a
      * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
      * The ID must contain only letters (a-z, A-Z), numbers (0-9),
@@ -1241,11 +1245,12 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
      *
      *
      * 
-     * Optional. A unique ID used to identify the request. If the server receives two
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
      * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
      * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
      * It is recommended to always set this value to a
      * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
      * The ID must contain only letters (a-z, A-Z), numbers (0-9),
@@ -1270,11 +1275,12 @@ public Builder setRequestId(java.lang.String value) {
      *
      *
      * 
-     * Optional. A unique ID used to identify the request. If the server receives two
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
      * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
      * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
      * It is recommended to always set this value to a
      * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
      * The ID must contain only letters (a-z, A-Z), numbers (0-9),
@@ -1295,11 +1301,12 @@ public Builder clearRequestId() {
      *
      *
      * 
-     * Optional. A unique ID used to identify the request. If the server receives two
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
      * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
      * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
      * It is recommended to always set this value to a
      * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
      * The ID must contain only letters (a-z, A-Z), numbers (0-9),
diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java
index 0903a768bb8f..e0fced7656a6 100644
--- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java
+++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java
@@ -117,11 +117,12 @@ public interface CreateClusterRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique ID used to identify the request. If the server receives two
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
    * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
    * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
    * It is recommended to always set this value to a
    * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
    * The ID must contain only letters (a-z, A-Z), numbers (0-9),
@@ -137,11 +138,12 @@ public interface CreateClusterRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique ID used to identify the request. If the server receives two
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
    * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
    * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
    * It is recommended to always set this value to a
    * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
    * The ID must contain only letters (a-z, A-Z), numbers (0-9),
diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateNodeGroupRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateNodeGroupRequest.java
new file mode 100644
index 000000000000..4f36cb6439ec
--- /dev/null
+++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateNodeGroupRequest.java
@@ -0,0 +1,1367 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/dataproc/v1/node_groups.proto
+
+package com.google.cloud.dataproc.v1;
+
+/**
+ *
+ *
+ * 
+ * A request to create a node group.
+ * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.CreateNodeGroupRequest} + */ +public final class CreateNodeGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.CreateNodeGroupRequest) + CreateNodeGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNodeGroupRequest.newBuilder() to construct. + private CreateNodeGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNodeGroupRequest() { + parent_ = ""; + nodeGroupId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNodeGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.CreateNodeGroupRequest.class, + com.google.cloud.dataproc.v1.CreateNodeGroupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource where this node group will be created.
+   * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource where this node group will be created.
+   * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_GROUP_FIELD_NUMBER = 2; + private com.google.cloud.dataproc.v1.NodeGroup nodeGroup_; + /** + * + * + *
+   * Required. The node group to create.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroup field is set. + */ + @java.lang.Override + public boolean hasNodeGroup() { + return nodeGroup_ != null; + } + /** + * + * + *
+   * Required. The node group to create.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroup. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroup getNodeGroup() { + return nodeGroup_ == null + ? com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance() + : nodeGroup_; + } + /** + * + * + *
+   * Required. The node group to create.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOrBuilder getNodeGroupOrBuilder() { + return getNodeGroup(); + } + + public static final int NODE_GROUP_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object nodeGroupId_; + /** + * + * + *
+   * Optional. An optional node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nodeGroupId. + */ + @java.lang.Override + public java.lang.String getNodeGroupId() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nodeGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNodeGroupIdBytes() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (nodeGroup_ != null) { + output.writeMessage(2, getNodeGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, nodeGroupId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (nodeGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNodeGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, nodeGroupId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataproc.v1.CreateNodeGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.dataproc.v1.CreateNodeGroupRequest other = + (com.google.cloud.dataproc.v1.CreateNodeGroupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasNodeGroup() != other.hasNodeGroup()) return false; + if (hasNodeGroup()) { + if (!getNodeGroup().equals(other.getNodeGroup())) return false; + } + if (!getNodeGroupId().equals(other.getNodeGroupId())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasNodeGroup()) { + hash = (37 * hash) + NODE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroup().hashCode(); + } + hash = (37 * hash) + NODE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroupId().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dataproc.v1.CreateNodeGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a node group.
+   * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.CreateNodeGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.CreateNodeGroupRequest) + com.google.cloud.dataproc.v1.CreateNodeGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.CreateNodeGroupRequest.class, + com.google.cloud.dataproc.v1.CreateNodeGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.dataproc.v1.CreateNodeGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (nodeGroupBuilder_ == null) { + nodeGroup_ = null; + } else { + nodeGroup_ = null; + nodeGroupBuilder_ = null; + } + nodeGroupId_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.CreateNodeGroupRequest getDefaultInstanceForType() { + return com.google.cloud.dataproc.v1.CreateNodeGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.CreateNodeGroupRequest build() { + com.google.cloud.dataproc.v1.CreateNodeGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.CreateNodeGroupRequest buildPartial() { + com.google.cloud.dataproc.v1.CreateNodeGroupRequest result = + new com.google.cloud.dataproc.v1.CreateNodeGroupRequest(this); + result.parent_ = parent_; + if (nodeGroupBuilder_ == null) { + result.nodeGroup_ = nodeGroup_; + } else { + result.nodeGroup_ = nodeGroupBuilder_.build(); + } + result.nodeGroupId_ = nodeGroupId_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataproc.v1.CreateNodeGroupRequest) { + return mergeFrom((com.google.cloud.dataproc.v1.CreateNodeGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataproc.v1.CreateNodeGroupRequest other) { + if (other == com.google.cloud.dataproc.v1.CreateNodeGroupRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasNodeGroup()) { + mergeNodeGroup(other.getNodeGroup()); + } + if (!other.getNodeGroupId().isEmpty()) { + nodeGroupId_ = other.nodeGroupId_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getNodeGroupFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + nodeGroupId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this node group will be created.
+     * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this node group will be created.
+     * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this node group will be created.
+     * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this node group will be created.
+     * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this node group will be created.
+     * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dataproc.v1.NodeGroup nodeGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.NodeGroup, + com.google.cloud.dataproc.v1.NodeGroup.Builder, + com.google.cloud.dataproc.v1.NodeGroupOrBuilder> + nodeGroupBuilder_; + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroup field is set. + */ + public boolean hasNodeGroup() { + return nodeGroupBuilder_ != null || nodeGroup_ != null; + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroup. + */ + public com.google.cloud.dataproc.v1.NodeGroup getNodeGroup() { + if (nodeGroupBuilder_ == null) { + return nodeGroup_ == null + ? com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance() + : nodeGroup_; + } else { + return nodeGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNodeGroup(com.google.cloud.dataproc.v1.NodeGroup value) { + if (nodeGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeGroup_ = value; + onChanged(); + } else { + nodeGroupBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNodeGroup(com.google.cloud.dataproc.v1.NodeGroup.Builder builderForValue) { + if (nodeGroupBuilder_ == null) { + nodeGroup_ = builderForValue.build(); + onChanged(); + } else { + nodeGroupBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNodeGroup(com.google.cloud.dataproc.v1.NodeGroup value) { + if (nodeGroupBuilder_ == null) { + if (nodeGroup_ != null) { + nodeGroup_ = + com.google.cloud.dataproc.v1.NodeGroup.newBuilder(nodeGroup_) + .mergeFrom(value) + .buildPartial(); + } else { + nodeGroup_ = value; + } + onChanged(); + } else { + nodeGroupBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNodeGroup() { + if (nodeGroupBuilder_ == null) { + nodeGroup_ = null; + onChanged(); + } else { + nodeGroup_ = null; + nodeGroupBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataproc.v1.NodeGroup.Builder getNodeGroupBuilder() { + + onChanged(); + return getNodeGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataproc.v1.NodeGroupOrBuilder getNodeGroupOrBuilder() { + if (nodeGroupBuilder_ != null) { + return nodeGroupBuilder_.getMessageOrBuilder(); + } else { + return nodeGroup_ == null + ? com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance() + : nodeGroup_; + } + } + /** + * + * + *
+     * Required. The node group to create.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.NodeGroup, + com.google.cloud.dataproc.v1.NodeGroup.Builder, + com.google.cloud.dataproc.v1.NodeGroupOrBuilder> + getNodeGroupFieldBuilder() { + if (nodeGroupBuilder_ == null) { + nodeGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.NodeGroup, + com.google.cloud.dataproc.v1.NodeGroup.Builder, + com.google.cloud.dataproc.v1.NodeGroupOrBuilder>( + getNodeGroup(), getParentForChildren(), isClean()); + nodeGroup_ = null; + } + return nodeGroupBuilder_; + } + + private java.lang.Object nodeGroupId_ = ""; + /** + * + * + *
+     * Optional. An optional node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nodeGroupId. + */ + public java.lang.String getNodeGroupId() { + java.lang.Object ref = nodeGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nodeGroupId. + */ + public com.google.protobuf.ByteString getNodeGroupIdBytes() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nodeGroupId to set. + * @return This builder for chaining. + */ + public Builder setNodeGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNodeGroupId() { + + nodeGroupId_ = getDefaultInstance().getNodeGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional node group ID. Generated if not specified.
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). Cannot begin or end with underscore
+     * or hyphen. Must consist of from 3 to 33 characters.
+     * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nodeGroupId to set. + * @return This builder for chaining. + */ + public Builder setNodeGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.CreateNodeGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.CreateNodeGroupRequest) + private static final com.google.cloud.dataproc.v1.CreateNodeGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.CreateNodeGroupRequest(); + } + + public static com.google.cloud.dataproc.v1.CreateNodeGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNodeGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.CreateNodeGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateNodeGroupRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateNodeGroupRequestOrBuilder.java new file mode 100644 index 000000000000..8eb012f1c3fe --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateNodeGroupRequestOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/node_groups.proto + +package com.google.cloud.dataproc.v1; + +public interface CreateNodeGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.CreateNodeGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this node group will be created.
+   * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource where this node group will be created.
+   * Format: `projects/{project}/regions/{region}/clusters/{cluster}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The node group to create.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroup field is set. + */ + boolean hasNodeGroup(); + /** + * + * + *
+   * Required. The node group to create.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroup. + */ + com.google.cloud.dataproc.v1.NodeGroup getNodeGroup(); + /** + * + * + *
+   * Required. The node group to create.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataproc.v1.NodeGroupOrBuilder getNodeGroupOrBuilder(); + + /** + * + * + *
+   * Optional. An optional node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nodeGroupId. + */ + java.lang.String getNodeGroupId(); + /** + * + * + *
+   * Optional. An optional node group ID. Generated if not specified.
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). Cannot begin or end with underscore
+   * or hyphen. Must consist of from 3 to 33 characters.
+   * 
+ * + * string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nodeGroupId. + */ + com.google.protobuf.ByteString getNodeGroupIdBytes(); + + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java index 9508dd27dd75..0f9b3477c471 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java @@ -281,8 +281,8 @@ public com.google.protobuf.ByteString getClusterUuidBytes() { * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -313,8 +313,8 @@ public java.lang.String getRequestId() { * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1199,8 +1199,8 @@ public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1230,8 +1230,8 @@ public java.lang.String getRequestId() { * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1261,8 +1261,8 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1291,8 +1291,8 @@ public Builder setRequestId(java.lang.String value) { * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1317,8 +1317,8 @@ public Builder clearRequestId() { * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java index 32f0dd6ab605..5b61a5ff90e8 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java @@ -135,8 +135,8 @@ public interface DeleteClusterRequestOrBuilder * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -156,8 +156,8 @@ public interface DeleteClusterRequestOrBuilder * receives two * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java index ac9db471a117..ebc46f643d2a 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java @@ -149,7 +149,7 @@ public int getBootDiskSizeGb() { * * *
-   * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
+   * Optional. Number of attached SSDs, from 0 to 8 (default is 0).
    * If SSDs are not attached, the boot disk is used to store runtime logs and
    * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
    * If one or more SSDs are attached, this runtime bulk
@@ -798,7 +798,7 @@ public Builder clearBootDiskSizeGb() {
      *
      *
      * 
-     * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
+     * Optional. Number of attached SSDs, from 0 to 8 (default is 0).
      * If SSDs are not attached, the boot disk is used to store runtime logs and
      * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
      * If one or more SSDs are attached, this runtime bulk
@@ -818,7 +818,7 @@ public int getNumLocalSsds() {
      *
      *
      * 
-     * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
+     * Optional. Number of attached SSDs, from 0 to 8 (default is 0).
      * If SSDs are not attached, the boot disk is used to store runtime logs and
      * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
      * If one or more SSDs are attached, this runtime bulk
@@ -841,7 +841,7 @@ public Builder setNumLocalSsds(int value) {
      *
      *
      * 
-     * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
+     * Optional. Number of attached SSDs, from 0 to 8 (default is 0).
      * If SSDs are not attached, the boot disk is used to store runtime logs and
      * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
      * If one or more SSDs are attached, this runtime bulk
diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java
index 050b28c8fc50..6a1918bf0faa 100644
--- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java
+++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java
@@ -73,7 +73,7 @@ public interface DiskConfigOrBuilder
    *
    *
    * 
-   * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
+   * Optional. Number of attached SSDs, from 0 to 8 (default is 0).
    * If SSDs are not attached, the boot disk is used to store runtime logs and
    * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
    * If one or more SSDs are attached, this runtime bulk
diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DriverSchedulingConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DriverSchedulingConfig.java
new file mode 100644
index 000000000000..09096b2e21a1
--- /dev/null
+++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DriverSchedulingConfig.java
@@ -0,0 +1,618 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/dataproc/v1/jobs.proto
+
+package com.google.cloud.dataproc.v1;
+
+/**
+ *
+ *
+ * 
+ * Driver scheduling configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.DriverSchedulingConfig} + */ +public final class DriverSchedulingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DriverSchedulingConfig) + DriverSchedulingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DriverSchedulingConfig.newBuilder() to construct. + private DriverSchedulingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DriverSchedulingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DriverSchedulingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.JobsProto + .internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.JobsProto + .internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.DriverSchedulingConfig.class, + com.google.cloud.dataproc.v1.DriverSchedulingConfig.Builder.class); + } + + public static final int MEMORY_MB_FIELD_NUMBER = 1; + private int memoryMb_; + /** + * + * + *
+   * Required. The amount of memory in MB the driver is requesting.
+   * 
+ * + * int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The memoryMb. + */ + @java.lang.Override + public int getMemoryMb() { + return memoryMb_; + } + + public static final int VCORES_FIELD_NUMBER = 2; + private int vcores_; + /** + * + * + *
+   * Required. The number of vCPUs the driver is requesting.
+   * 
+ * + * int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vcores. + */ + @java.lang.Override + public int getVcores() { + return vcores_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (memoryMb_ != 0) { + output.writeInt32(1, memoryMb_); + } + if (vcores_ != 0) { + output.writeInt32(2, vcores_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (memoryMb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, memoryMb_); + } + if (vcores_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, vcores_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataproc.v1.DriverSchedulingConfig)) { + return super.equals(obj); + } + com.google.cloud.dataproc.v1.DriverSchedulingConfig other = + (com.google.cloud.dataproc.v1.DriverSchedulingConfig) obj; + + if (getMemoryMb() != other.getMemoryMb()) return false; + if (getVcores() != other.getVcores()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MEMORY_MB_FIELD_NUMBER; + hash = (53 * hash) + getMemoryMb(); + hash = (37 * hash) + VCORES_FIELD_NUMBER; + hash = (53 * hash) + getVcores(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dataproc.v1.DriverSchedulingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Driver scheduling configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.DriverSchedulingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DriverSchedulingConfig) + com.google.cloud.dataproc.v1.DriverSchedulingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.JobsProto + .internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.JobsProto + .internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.DriverSchedulingConfig.class, + com.google.cloud.dataproc.v1.DriverSchedulingConfig.Builder.class); + } + + // Construct using com.google.cloud.dataproc.v1.DriverSchedulingConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + memoryMb_ = 0; + + vcores_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataproc.v1.JobsProto + .internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.DriverSchedulingConfig getDefaultInstanceForType() { + return com.google.cloud.dataproc.v1.DriverSchedulingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.DriverSchedulingConfig build() { + com.google.cloud.dataproc.v1.DriverSchedulingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.DriverSchedulingConfig buildPartial() { + com.google.cloud.dataproc.v1.DriverSchedulingConfig result = + new com.google.cloud.dataproc.v1.DriverSchedulingConfig(this); + result.memoryMb_ = memoryMb_; + result.vcores_ = vcores_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataproc.v1.DriverSchedulingConfig) { + return mergeFrom((com.google.cloud.dataproc.v1.DriverSchedulingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataproc.v1.DriverSchedulingConfig other) { + if (other == com.google.cloud.dataproc.v1.DriverSchedulingConfig.getDefaultInstance()) + return this; + if (other.getMemoryMb() != 0) { + setMemoryMb(other.getMemoryMb()); + } + if (other.getVcores() != 0) { + setVcores(other.getVcores()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + memoryMb_ = input.readInt32(); + + break; + } // case 8 + case 16: + { + vcores_ = input.readInt32(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int memoryMb_; + /** + * + * + *
+     * Required. The amount of memory in MB the driver is requesting.
+     * 
+ * + * int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The memoryMb. + */ + @java.lang.Override + public int getMemoryMb() { + return memoryMb_; + } + /** + * + * + *
+     * Required. The amount of memory in MB the driver is requesting.
+     * 
+ * + * int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The memoryMb to set. + * @return This builder for chaining. + */ + public Builder setMemoryMb(int value) { + + memoryMb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The amount of memory in MB the driver is requesting.
+     * 
+ * + * int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMemoryMb() { + + memoryMb_ = 0; + onChanged(); + return this; + } + + private int vcores_; + /** + * + * + *
+     * Required. The number of vCPUs the driver is requesting.
+     * 
+ * + * int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vcores. + */ + @java.lang.Override + public int getVcores() { + return vcores_; + } + /** + * + * + *
+     * Required. The number of vCPUs the driver is requesting.
+     * 
+ * + * int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vcores to set. + * @return This builder for chaining. + */ + public Builder setVcores(int value) { + + vcores_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The number of vCPUs the driver is requesting.
+     * 
+ * + * int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVcores() { + + vcores_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.DriverSchedulingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DriverSchedulingConfig) + private static final com.google.cloud.dataproc.v1.DriverSchedulingConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DriverSchedulingConfig(); + } + + public static com.google.cloud.dataproc.v1.DriverSchedulingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DriverSchedulingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.DriverSchedulingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DriverSchedulingConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DriverSchedulingConfigOrBuilder.java new file mode 100644 index 000000000000..71dfc1092dad --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DriverSchedulingConfigOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/jobs.proto + +package com.google.cloud.dataproc.v1; + +public interface DriverSchedulingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DriverSchedulingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The amount of memory in MB the driver is requesting.
+   * 
+ * + * int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The memoryMb. + */ + int getMemoryMb(); + + /** + * + * + *
+   * Required. The number of vCPUs the driver is requesting.
+   * 
+ * + * int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vcores. + */ + int getVcores(); +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java index f92c6a6cbcb1..e15fdcbc7265 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java @@ -104,7 +104,8 @@ public enum PrivateIpv6GoogleAccess implements com.google.protobuf.ProtocolMessa * *
      * If unspecified, Compute Engine default behavior will apply, which
-     * is the same as [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
+     * is the same as
+     * [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
      * 
* * PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; @@ -152,7 +153,8 @@ public enum PrivateIpv6GoogleAccess implements com.google.protobuf.ProtocolMessa * *
      * If unspecified, Compute Engine default behavior will apply, which
-     * is the same as [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
+     * is the same as
+     * [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
      * 
* * PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; @@ -998,7 +1000,8 @@ public com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder getNodeGroupAffin * * *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+   * Optional. Shielded Instance Config for clusters using [Compute Engine
+   * Shielded
    * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
    * 
* @@ -1016,7 +1019,8 @@ public boolean hasShieldedInstanceConfig() { * * *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+   * Optional. Shielded Instance Config for clusters using [Compute Engine
+   * Shielded
    * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
    * 
* @@ -1036,7 +1040,8 @@ public com.google.cloud.dataproc.v1.ShieldedInstanceConfig getShieldedInstanceCo * * *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+   * Optional. Shielded Instance Config for clusters using [Compute Engine
+   * Shielded
    * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
    * 
* @@ -3623,7 +3628,8 @@ public com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder getNodeGroupAffin * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3640,7 +3646,8 @@ public boolean hasShieldedInstanceConfig() { * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3663,7 +3670,8 @@ public com.google.cloud.dataproc.v1.ShieldedInstanceConfig getShieldedInstanceCo * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3689,7 +3697,8 @@ public Builder setShieldedInstanceConfig( * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3712,7 +3721,8 @@ public Builder setShieldedInstanceConfig( * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3743,7 +3753,8 @@ public Builder mergeShieldedInstanceConfig( * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3766,7 +3777,8 @@ public Builder clearShieldedInstanceConfig() { * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3784,7 +3796,8 @@ public Builder clearShieldedInstanceConfig() { * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* @@ -3806,7 +3819,8 @@ public Builder clearShieldedInstanceConfig() { * * *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+     * Optional. Shielded Instance Config for clusters using [Compute Engine
+     * Shielded
      * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
      * 
* diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java index 407610faa1e0..2768c077482f 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java @@ -538,7 +538,8 @@ java.lang.String getMetadataOrDefault( * * *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+   * Optional. Shielded Instance Config for clusters using [Compute Engine
+   * Shielded
    * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
    * 
* @@ -553,7 +554,8 @@ java.lang.String getMetadataOrDefault( * * *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+   * Optional. Shielded Instance Config for clusters using [Compute Engine
+   * Shielded
    * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
    * 
* @@ -568,7 +570,8 @@ java.lang.String getMetadataOrDefault( * * *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
+   * Optional. Shielded Instance Config for clusters using [Compute Engine
+   * Shielded
    * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
    * 
* diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetNodeGroupRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetNodeGroupRequest.java new file mode 100644 index 000000000000..1e980ee6f70f --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetNodeGroupRequest.java @@ -0,0 +1,643 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/node_groups.proto + +package com.google.cloud.dataproc.v1; + +/** + * + * + *
+ * A request to get a node group .
+ * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.GetNodeGroupRequest} + */ +public final class GetNodeGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GetNodeGroupRequest) + GetNodeGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNodeGroupRequest.newBuilder() to construct. + private GetNodeGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNodeGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNodeGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.GetNodeGroupRequest.class, + com.google.cloud.dataproc.v1.GetNodeGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the node group to retrieve.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the node group to retrieve.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataproc.v1.GetNodeGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.dataproc.v1.GetNodeGroupRequest other = + (com.google.cloud.dataproc.v1.GetNodeGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dataproc.v1.GetNodeGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a node group .
+   * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.GetNodeGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GetNodeGroupRequest) + com.google.cloud.dataproc.v1.GetNodeGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.GetNodeGroupRequest.class, + com.google.cloud.dataproc.v1.GetNodeGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.dataproc.v1.GetNodeGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.GetNodeGroupRequest getDefaultInstanceForType() { + return com.google.cloud.dataproc.v1.GetNodeGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.GetNodeGroupRequest build() { + com.google.cloud.dataproc.v1.GetNodeGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.GetNodeGroupRequest buildPartial() { + com.google.cloud.dataproc.v1.GetNodeGroupRequest result = + new com.google.cloud.dataproc.v1.GetNodeGroupRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataproc.v1.GetNodeGroupRequest) { + return mergeFrom((com.google.cloud.dataproc.v1.GetNodeGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataproc.v1.GetNodeGroupRequest other) { + if (other == com.google.cloud.dataproc.v1.GetNodeGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the node group to retrieve.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the node group to retrieve.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the node group to retrieve.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the node group to retrieve.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the node group to retrieve.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.GetNodeGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GetNodeGroupRequest) + private static final com.google.cloud.dataproc.v1.GetNodeGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GetNodeGroupRequest(); + } + + public static com.google.cloud.dataproc.v1.GetNodeGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNodeGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.GetNodeGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetNodeGroupRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetNodeGroupRequestOrBuilder.java new file mode 100644 index 000000000000..c1e0a686d19f --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetNodeGroupRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/node_groups.proto + +package com.google.cloud.dataproc.v1; + +public interface GetNodeGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GetNodeGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the node group to retrieve.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the node group to retrieve.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java index 3507efee35b6..6a8d0418355e 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java @@ -77,10 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Controls the use of
-   * [preemptible instances]
-   * (https://cloud.google.com/compute/docs/instances/preemptible)
-   * within the group.
+   * Controls the use of preemptible instances within the group.
    * 
* * Protobuf enum {@code google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility} @@ -113,8 +110,11 @@ public enum Preemptibility implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Instances are preemptible.
-     * This option is allowed only for secondary worker groups.
+     * Instances are [preemptible]
+     * (https://cloud.google.com/compute/docs/instances/preemptible).
+     * This option is allowed only for [secondary worker]
+     * (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms)
+     * groups.
      * 
* * PREEMPTIBLE = 2; @@ -150,8 +150,11 @@ public enum Preemptibility implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Instances are preemptible.
-     * This option is allowed only for secondary worker groups.
+     * Instances are [preemptible]
+     * (https://cloud.google.com/compute/docs/instances/preemptible).
+     * This option is allowed only for [secondary worker]
+     * (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms)
+     * groups.
      * 
* * PREEMPTIBLE = 2; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java index 2c0babed88a8..6ea08a4538ca 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java @@ -1284,8 +1284,8 @@ public com.google.protobuf.ByteString getJobUuidBytes() { * * *
-   * Output only. Indicates whether the job is completed. If the value is `false`,
-   * the job is still in progress. If `true`, the job is completed, and
+   * Output only. Indicates whether the job is completed. If the value is
+   * `false`, the job is still in progress. If `true`, the job is completed, and
    * `status.state` field will indicate if it was successful, failed,
    * or cancelled.
    * 
@@ -1299,6 +1299,61 @@ public boolean getDone() { return done_; } + public static final int DRIVER_SCHEDULING_CONFIG_FIELD_NUMBER = 27; + private com.google.cloud.dataproc.v1.DriverSchedulingConfig driverSchedulingConfig_; + /** + * + * + *
+   * Optional. Driver scheduling configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the driverSchedulingConfig field is set. + */ + @java.lang.Override + public boolean hasDriverSchedulingConfig() { + return driverSchedulingConfig_ != null; + } + /** + * + * + *
+   * Optional. Driver scheduling configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The driverSchedulingConfig. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.DriverSchedulingConfig getDriverSchedulingConfig() { + return driverSchedulingConfig_ == null + ? com.google.cloud.dataproc.v1.DriverSchedulingConfig.getDefaultInstance() + : driverSchedulingConfig_; + } + /** + * + * + *
+   * Optional. Driver scheduling configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.DriverSchedulingConfigOrBuilder + getDriverSchedulingConfigOrBuilder() { + return getDriverSchedulingConfig(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1369,6 +1424,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (done_ != false) { output.writeBool(24, done_); } + if (driverSchedulingConfig_ != null) { + output.writeMessage(27, getDriverSchedulingConfig()); + } getUnknownFields().writeTo(output); } @@ -1459,6 +1517,10 @@ public int getSerializedSize() { if (done_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, done_); } + if (driverSchedulingConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(27, getDriverSchedulingConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1497,6 +1559,10 @@ public boolean equals(final java.lang.Object obj) { } if (!getJobUuid().equals(other.getJobUuid())) return false; if (getDone() != other.getDone()) return false; + if (hasDriverSchedulingConfig() != other.hasDriverSchedulingConfig()) return false; + if (hasDriverSchedulingConfig()) { + if (!getDriverSchedulingConfig().equals(other.getDriverSchedulingConfig())) return false; + } if (!getTypeJobCase().equals(other.getTypeJobCase())) return false; switch (typeJobCase_) { case 3: @@ -1573,6 +1639,10 @@ public int hashCode() { hash = (53 * hash) + getJobUuid().hashCode(); hash = (37 * hash) + DONE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDone()); + if (hasDriverSchedulingConfig()) { + hash = (37 * hash) + DRIVER_SCHEDULING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDriverSchedulingConfig().hashCode(); + } switch (typeJobCase_) { case 3: hash = (37 * hash) + HADOOP_JOB_FIELD_NUMBER; @@ -1837,6 +1907,12 @@ public Builder clear() { done_ = false; + if (driverSchedulingConfigBuilder_ == null) { + driverSchedulingConfig_ = null; + } else { + driverSchedulingConfig_ = null; + driverSchedulingConfigBuilder_ = null; + } typeJobCase_ = 0; typeJob_ = null; return this; @@ -1966,6 +2042,11 @@ public com.google.cloud.dataproc.v1.Job buildPartial() { } result.jobUuid_ = jobUuid_; result.done_ = done_; + if (driverSchedulingConfigBuilder_ == null) { + result.driverSchedulingConfig_ = driverSchedulingConfig_; + } else { + result.driverSchedulingConfig_ = driverSchedulingConfigBuilder_.build(); + } result.typeJobCase_ = typeJobCase_; onBuilt(); return result; @@ -2098,6 +2179,9 @@ public Builder mergeFrom(com.google.cloud.dataproc.v1.Job other) { if (other.getDone() != false) { setDone(other.getDone()); } + if (other.hasDriverSchedulingConfig()) { + mergeDriverSchedulingConfig(other.getDriverSchedulingConfig()); + } switch (other.getTypeJobCase()) { case HADOOP_JOB: { @@ -2303,6 +2387,13 @@ public Builder mergeFrom( break; } // case 192 + case 218: + { + input.readMessage( + getDriverSchedulingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 218 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6387,8 +6478,8 @@ public Builder setJobUuidBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. Indicates whether the job is completed. If the value is `false`,
-     * the job is still in progress. If `true`, the job is completed, and
+     * Output only. Indicates whether the job is completed. If the value is
+     * `false`, the job is still in progress. If `true`, the job is completed, and
      * `status.state` field will indicate if it was successful, failed,
      * or cancelled.
      * 
@@ -6405,8 +6496,8 @@ public boolean getDone() { * * *
-     * Output only. Indicates whether the job is completed. If the value is `false`,
-     * the job is still in progress. If `true`, the job is completed, and
+     * Output only. Indicates whether the job is completed. If the value is
+     * `false`, the job is still in progress. If `true`, the job is completed, and
      * `status.state` field will indicate if it was successful, failed,
      * or cancelled.
      * 
@@ -6426,8 +6517,8 @@ public Builder setDone(boolean value) { * * *
-     * Output only. Indicates whether the job is completed. If the value is `false`,
-     * the job is still in progress. If `true`, the job is completed, and
+     * Output only. Indicates whether the job is completed. If the value is
+     * `false`, the job is still in progress. If `true`, the job is completed, and
      * `status.state` field will indicate if it was successful, failed,
      * or cancelled.
      * 
@@ -6443,6 +6534,215 @@ public Builder clearDone() { return this; } + private com.google.cloud.dataproc.v1.DriverSchedulingConfig driverSchedulingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.DriverSchedulingConfig, + com.google.cloud.dataproc.v1.DriverSchedulingConfig.Builder, + com.google.cloud.dataproc.v1.DriverSchedulingConfigOrBuilder> + driverSchedulingConfigBuilder_; + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the driverSchedulingConfig field is set. + */ + public boolean hasDriverSchedulingConfig() { + return driverSchedulingConfigBuilder_ != null || driverSchedulingConfig_ != null; + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The driverSchedulingConfig. + */ + public com.google.cloud.dataproc.v1.DriverSchedulingConfig getDriverSchedulingConfig() { + if (driverSchedulingConfigBuilder_ == null) { + return driverSchedulingConfig_ == null + ? com.google.cloud.dataproc.v1.DriverSchedulingConfig.getDefaultInstance() + : driverSchedulingConfig_; + } else { + return driverSchedulingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDriverSchedulingConfig( + com.google.cloud.dataproc.v1.DriverSchedulingConfig value) { + if (driverSchedulingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + driverSchedulingConfig_ = value; + onChanged(); + } else { + driverSchedulingConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDriverSchedulingConfig( + com.google.cloud.dataproc.v1.DriverSchedulingConfig.Builder builderForValue) { + if (driverSchedulingConfigBuilder_ == null) { + driverSchedulingConfig_ = builderForValue.build(); + onChanged(); + } else { + driverSchedulingConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDriverSchedulingConfig( + com.google.cloud.dataproc.v1.DriverSchedulingConfig value) { + if (driverSchedulingConfigBuilder_ == null) { + if (driverSchedulingConfig_ != null) { + driverSchedulingConfig_ = + com.google.cloud.dataproc.v1.DriverSchedulingConfig.newBuilder( + driverSchedulingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + driverSchedulingConfig_ = value; + } + onChanged(); + } else { + driverSchedulingConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDriverSchedulingConfig() { + if (driverSchedulingConfigBuilder_ == null) { + driverSchedulingConfig_ = null; + onChanged(); + } else { + driverSchedulingConfig_ = null; + driverSchedulingConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.DriverSchedulingConfig.Builder + getDriverSchedulingConfigBuilder() { + + onChanged(); + return getDriverSchedulingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.DriverSchedulingConfigOrBuilder + getDriverSchedulingConfigOrBuilder() { + if (driverSchedulingConfigBuilder_ != null) { + return driverSchedulingConfigBuilder_.getMessageOrBuilder(); + } else { + return driverSchedulingConfig_ == null + ? com.google.cloud.dataproc.v1.DriverSchedulingConfig.getDefaultInstance() + : driverSchedulingConfig_; + } + } + /** + * + * + *
+     * Optional. Driver scheduling configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.DriverSchedulingConfig, + com.google.cloud.dataproc.v1.DriverSchedulingConfig.Builder, + com.google.cloud.dataproc.v1.DriverSchedulingConfigOrBuilder> + getDriverSchedulingConfigFieldBuilder() { + if (driverSchedulingConfigBuilder_ == null) { + driverSchedulingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.DriverSchedulingConfig, + com.google.cloud.dataproc.v1.DriverSchedulingConfig.Builder, + com.google.cloud.dataproc.v1.DriverSchedulingConfigOrBuilder>( + getDriverSchedulingConfig(), getParentForChildren(), isClean()); + driverSchedulingConfig_ = null; + } + return driverSchedulingConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java index 4747c1e252a1..49bb1aa6ec2e 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java @@ -841,8 +841,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. Indicates whether the job is completed. If the value is `false`,
-   * the job is still in progress. If `true`, the job is completed, and
+   * Output only. Indicates whether the job is completed. If the value is
+   * `false`, the job is still in progress. If `true`, the job is completed, and
    * `status.state` field will indicate if it was successful, failed,
    * or cancelled.
    * 
@@ -853,5 +853,46 @@ java.lang.String getLabelsOrDefault( */ boolean getDone(); + /** + * + * + *
+   * Optional. Driver scheduling configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the driverSchedulingConfig field is set. + */ + boolean hasDriverSchedulingConfig(); + /** + * + * + *
+   * Optional. Driver scheduling configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The driverSchedulingConfig. + */ + com.google.cloud.dataproc.v1.DriverSchedulingConfig getDriverSchedulingConfig(); + /** + * + * + *
+   * Optional. Driver scheduling configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataproc.v1.DriverSchedulingConfigOrBuilder getDriverSchedulingConfigOrBuilder(); + public com.google.cloud.dataproc.v1.Job.TypeJobCase getTypeJobCase(); } diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java index b891a0435fbe..2304cc35351a 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java @@ -210,7 +210,8 @@ public int getClusterLabelsCount() { * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -233,7 +234,8 @@ public java.util.Map getClusterLabels() { * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -247,7 +249,8 @@ public java.util.Map getClusterLabelsMap() { * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -266,7 +269,8 @@ public java.lang.String getClusterLabelsOrDefault( * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -939,7 +943,8 @@ public int getClusterLabelsCount() { * * *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
+     * Optional. Cluster labels to identify a cluster where the job will be
+     * submitted.
      * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -962,7 +967,8 @@ public java.util.Map getClusterLabels() { * * *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
+     * Optional. Cluster labels to identify a cluster where the job will be
+     * submitted.
      * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -976,7 +982,8 @@ public java.util.Map getClusterLabelsMap() { * * *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
+     * Optional. Cluster labels to identify a cluster where the job will be
+     * submitted.
      * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -995,7 +1002,8 @@ public java.lang.String getClusterLabelsOrDefault( * * *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
+     * Optional. Cluster labels to identify a cluster where the job will be
+     * submitted.
      * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1021,7 +1029,8 @@ public Builder clearClusterLabels() { * * *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
+     * Optional. Cluster labels to identify a cluster where the job will be
+     * submitted.
      * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1043,7 +1052,8 @@ public java.util.Map getMutableClusterLabels * * *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
+     * Optional. Cluster labels to identify a cluster where the job will be
+     * submitted.
      * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1064,7 +1074,8 @@ public Builder putClusterLabels(java.lang.String key, java.lang.String value) { * * *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
+     * Optional. Cluster labels to identify a cluster where the job will be
+     * submitted.
      * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java index fb61780da9aa..a1b0fa90b671 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java @@ -79,7 +79,8 @@ public interface JobPlacementOrBuilder * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -90,7 +91,8 @@ public interface JobPlacementOrBuilder * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -104,7 +106,8 @@ public interface JobPlacementOrBuilder * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -115,7 +118,8 @@ public interface JobPlacementOrBuilder * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -131,7 +135,8 @@ java.lang.String getClusterLabelsOrDefault( * * *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
+   * Optional. Cluster labels to identify a cluster where the job will be
+   * submitted.
    * 
* * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java index 7657961042a7..8644d3979530 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java @@ -74,8 +74,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
+   * Optional. The ID of the Google Cloud Platform project that the job belongs
+   * to. If specified, must match the request project ID.
    * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -98,8 +98,8 @@ public java.lang.String getProjectId() { * * *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
+   * Optional. The ID of the Google Cloud Platform project that the job belongs
+   * to. If specified, must match the request project ID.
    * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -530,8 +530,8 @@ public Builder mergeFrom( * * *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
+     * Optional. The ID of the Google Cloud Platform project that the job belongs
+     * to. If specified, must match the request project ID.
      * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -553,8 +553,8 @@ public java.lang.String getProjectId() { * * *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
+     * Optional. The ID of the Google Cloud Platform project that the job belongs
+     * to. If specified, must match the request project ID.
      * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -576,8 +576,8 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * * *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
+     * Optional. The ID of the Google Cloud Platform project that the job belongs
+     * to. If specified, must match the request project ID.
      * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -598,8 +598,8 @@ public Builder setProjectId(java.lang.String value) { * * *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
+     * Optional. The ID of the Google Cloud Platform project that the job belongs
+     * to. If specified, must match the request project ID.
      * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -616,8 +616,8 @@ public Builder clearProjectId() { * * *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
+     * Optional. The ID of the Google Cloud Platform project that the job belongs
+     * to. If specified, must match the request project ID.
      * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java index df102fa47605..c22d0ffdf068 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java @@ -27,8 +27,8 @@ public interface JobReferenceOrBuilder * * *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
+   * Optional. The ID of the Google Cloud Platform project that the job belongs
+   * to. If specified, must match the request project ID.
    * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -40,8 +40,8 @@ public interface JobReferenceOrBuilder * * *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
+   * Optional. The ID of the Google Cloud Platform project that the job belongs
+   * to. If specified, must match the request project ID.
    * 
* * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java index b5f855921810..648067e912d9 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java @@ -74,14 +74,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Optional. Maximum number of times per hour a driver may be restarted as * a result of driver exiting with non-zero code before job is * reported failed. - * A job may be reported as thrashing if driver exits with non-zero code - * 4 times within 10 minute window. + * A job may be reported as thrashing if the driver exits with a non-zero code + * four times within a 10-minute window. * Maximum value is 10. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - * jobs. + * **Note:** This restartable job option is not supported in Dataproc + * [workflow templates] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). *
* * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -99,14 +97,14 @@ public int getMaxFailuresPerHour() { * * *
-   * Optional. Maximum number of times in total a driver may be restarted as a result of
-   * driver exiting with non-zero code before job is reported failed.
+   * Optional. Maximum total number of times a driver may be restarted as a
+   * result of the driver exiting with a non-zero code. After the maximum number
+   * is reached, the job will be reported as failed.
    * Maximum value is 240.
    * **Note:** Currently, this restartable job option is
    * not supported in Dataproc
    * [workflow
-   * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-   * jobs.
+   * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).
    * 
* * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -475,14 +473,12 @@ public Builder mergeFrom( * Optional. Maximum number of times per hour a driver may be restarted as * a result of driver exiting with non-zero code before job is * reported failed. - * A job may be reported as thrashing if driver exits with non-zero code - * 4 times within 10 minute window. + * A job may be reported as thrashing if the driver exits with a non-zero code + * four times within a 10-minute window. * Maximum value is 10. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - * jobs. + * **Note:** This restartable job option is not supported in Dataproc + * [workflow templates] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). *
* * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -500,14 +496,12 @@ public int getMaxFailuresPerHour() { * Optional. Maximum number of times per hour a driver may be restarted as * a result of driver exiting with non-zero code before job is * reported failed. - * A job may be reported as thrashing if driver exits with non-zero code - * 4 times within 10 minute window. + * A job may be reported as thrashing if the driver exits with a non-zero code + * four times within a 10-minute window. * Maximum value is 10. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - * jobs. + * **Note:** This restartable job option is not supported in Dataproc + * [workflow templates] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). *
* * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -528,14 +522,12 @@ public Builder setMaxFailuresPerHour(int value) { * Optional. Maximum number of times per hour a driver may be restarted as * a result of driver exiting with non-zero code before job is * reported failed. - * A job may be reported as thrashing if driver exits with non-zero code - * 4 times within 10 minute window. + * A job may be reported as thrashing if the driver exits with a non-zero code + * four times within a 10-minute window. * Maximum value is 10. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - * jobs. + * **Note:** This restartable job option is not supported in Dataproc + * [workflow templates] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). *
* * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -554,14 +546,14 @@ public Builder clearMaxFailuresPerHour() { * * *
-     * Optional. Maximum number of times in total a driver may be restarted as a result of
-     * driver exiting with non-zero code before job is reported failed.
+     * Optional. Maximum total number of times a driver may be restarted as a
+     * result of the driver exiting with a non-zero code. After the maximum number
+     * is reached, the job will be reported as failed.
      * Maximum value is 240.
      * **Note:** Currently, this restartable job option is
      * not supported in Dataproc
      * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
+     * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).
      * 
* * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -576,14 +568,14 @@ public int getMaxFailuresTotal() { * * *
-     * Optional. Maximum number of times in total a driver may be restarted as a result of
-     * driver exiting with non-zero code before job is reported failed.
+     * Optional. Maximum total number of times a driver may be restarted as a
+     * result of the driver exiting with a non-zero code. After the maximum number
+     * is reached, the job will be reported as failed.
      * Maximum value is 240.
      * **Note:** Currently, this restartable job option is
      * not supported in Dataproc
      * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
+     * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).
      * 
* * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -601,14 +593,14 @@ public Builder setMaxFailuresTotal(int value) { * * *
-     * Optional. Maximum number of times in total a driver may be restarted as a result of
-     * driver exiting with non-zero code before job is reported failed.
+     * Optional. Maximum total number of times a driver may be restarted as a
+     * result of the driver exiting with a non-zero code. After the maximum number
+     * is reached, the job will be reported as failed.
      * Maximum value is 240.
      * **Note:** Currently, this restartable job option is
      * not supported in Dataproc
      * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
+     * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).
      * 
* * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java index a65b1cfc8edc..20f7a8437eed 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java @@ -30,14 +30,12 @@ public interface JobSchedulingOrBuilder * Optional. Maximum number of times per hour a driver may be restarted as * a result of driver exiting with non-zero code before job is * reported failed. - * A job may be reported as thrashing if driver exits with non-zero code - * 4 times within 10 minute window. + * A job may be reported as thrashing if the driver exits with a non-zero code + * four times within a 10-minute window. * Maximum value is 10. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - * jobs. + * **Note:** This restartable job option is not supported in Dataproc + * [workflow templates] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). *
* * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -50,14 +48,14 @@ public interface JobSchedulingOrBuilder * * *
-   * Optional. Maximum number of times in total a driver may be restarted as a result of
-   * driver exiting with non-zero code before job is reported failed.
+   * Optional. Maximum total number of times a driver may be restarted as a
+   * result of the driver exiting with a non-zero code. After the maximum number
+   * is reached, the job will be reported as failed.
    * Maximum value is 240.
    * **Note:** Currently, this restartable job option is
    * not supported in Dataproc
    * [workflow
-   * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-   * jobs.
+   * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).
    * 
* * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java index 6ce22a02f71d..2c48583f8eb1 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java @@ -143,6 +143,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -311,7 +315,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ing_url\030\004 \001(\tB\003\340A\001\"\207\001\n\005State\022\025\n\021STATE_UN" + "SPECIFIED\020\000\022\007\n\003NEW\020\001\022\016\n\nNEW_SAVING\020\002\022\r\n\t" + "SUBMITTED\020\003\022\014\n\010ACCEPTED\020\004\022\013\n\007RUNNING\020\005\022\014" - + "\n\010FINISHED\020\006\022\n\n\006FAILED\020\007\022\n\n\006KILLED\020\010\"\377\010\n" + + "\n\010FINISHED\020\006\022\n\n\006FAILED\020\007\022\n\n\006KILLED\020\010\"\330\t\n" + "\003Job\022>\n\treference\030\001 \001(\0132&.google.cloud.d" + "ataproc.v1.JobReferenceB\003\340A\001\022>\n\tplacemen" + "t\030\002 \001(\0132&.google.cloud.dataproc.v1.JobPl" @@ -339,8 +343,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v1.Job.LabelsEntryB\003\340A\001\022@\n\nscheduling\030\024 " + "\001(\0132\'.google.cloud.dataproc.v1.JobSchedu" + "lingB\003\340A\001\022\025\n\010job_uuid\030\026 \001(\tB\003\340A\003\022\021\n\004done" - + "\030\030 \001(\010B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001B\n\n\010type_job\"T\n\rJobSch" + + "\030\030 \001(\010B\003\340A\003\022W\n\030driver_scheduling_config\030" + + "\033 \001(\01320.google.cloud.dataproc.v1.DriverS" + + "chedulingConfigB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\n\n\010type_job\"" + + "E\n\026DriverSchedulingConfig\022\026\n\tmemory_mb\030\001" + + " \001(\005B\003\340A\002\022\023\n\006vcores\030\002 \001(\005B\003\340A\002\"T\n\rJobSch" + "eduling\022\"\n\025max_failures_per_hour\030\001 \001(\005B\003" + "\340A\001\022\037\n\022max_failures_total\030\002 \001(\005B\003\340A\001\"\212\001\n" + "\020SubmitJobRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340" @@ -714,6 +722,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Scheduling", "JobUuid", "Done", + "DriverSchedulingConfig", "TypeJob", }); internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_descriptor = @@ -724,8 +733,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor = + internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_DriverSchedulingConfig_descriptor, + new java.lang.String[] { + "MemoryMb", "Vcores", + }); + internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor = + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dataproc_v1_JobScheduling_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor, @@ -733,7 +750,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaxFailuresPerHour", "MaxFailuresTotal", }); internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dataproc_v1_SubmitJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor, @@ -741,7 +758,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "Job", "RequestId", }); internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dataproc_v1_JobMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor, @@ -749,7 +766,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "JobId", "Status", "OperationType", "StartTime", }); internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dataproc_v1_GetJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor, @@ -757,7 +774,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "JobId", }); internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dataproc_v1_ListJobsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor, @@ -771,7 +788,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Filter", }); internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dataproc_v1_UpdateJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor, @@ -779,7 +796,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "JobId", "Job", "UpdateMask", }); internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dataproc_v1_ListJobsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor, @@ -787,7 +804,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Jobs", "NextPageToken", }); internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dataproc_v1_CancelJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor, @@ -795,7 +812,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "Region", "JobId", }); internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dataproc_v1_DeleteJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor, diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java index c04e38c2009b..3e4810716c61 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java @@ -85,8 +85,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-   * this field to true to enable Kerberos on a cluster.
+   * Optional. Flag to indicate whether to Kerberize the cluster (default:
+   * false). Set this field to true to enable Kerberos on a cluster.
    * 
* * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1446,8 +1446,8 @@ public Builder mergeFrom( * * *
-     * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-     * this field to true to enable Kerberos on a cluster.
+     * Optional. Flag to indicate whether to Kerberize the cluster (default:
+     * false). Set this field to true to enable Kerberos on a cluster.
      * 
* * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1462,8 +1462,8 @@ public boolean getEnableKerberos() { * * *
-     * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-     * this field to true to enable Kerberos on a cluster.
+     * Optional. Flag to indicate whether to Kerberize the cluster (default:
+     * false). Set this field to true to enable Kerberos on a cluster.
      * 
* * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1481,8 +1481,8 @@ public Builder setEnableKerberos(boolean value) { * * *
-     * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-     * this field to true to enable Kerberos on a cluster.
+     * Optional. Flag to indicate whether to Kerberize the cluster (default:
+     * false). Set this field to true to enable Kerberos on a cluster.
      * 
* * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java index 0f7dc4724f1a..38118f80ed1a 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java @@ -27,8 +27,8 @@ public interface KerberosConfigOrBuilder * * *
-   * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-   * this field to true to enable Kerberos on a cluster.
+   * Optional. Flag to indicate whether to Kerberize the cluster (default:
+   * false). Set this field to true to enable Kerberos on a cluster.
    * 
* * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java index da3161162c80..45467d8d58f7 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java @@ -180,7 +180,8 @@ public com.google.protobuf.DurationOrBuilder getIdleDeleteTtlOrBuilder() { * * *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
+   * Optional. The time when cluster will be auto-deleted (see JSON
+   * representation of
    * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
    * 
* @@ -198,7 +199,8 @@ public boolean hasAutoDeleteTime() { * * *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
+   * Optional. The time when cluster will be auto-deleted (see JSON
+   * representation of
    * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
    * 
* @@ -219,7 +221,8 @@ public com.google.protobuf.Timestamp getAutoDeleteTime() { * * *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
+   * Optional. The time when cluster will be auto-deleted (see JSON
+   * representation of
    * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
    * 
* @@ -1088,7 +1091,8 @@ public com.google.protobuf.DurationOrBuilder getIdleDeleteTtlOrBuilder() { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1106,7 +1110,8 @@ public boolean hasAutoDeleteTime() { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1134,7 +1139,8 @@ public com.google.protobuf.Timestamp getAutoDeleteTime() { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1159,7 +1165,8 @@ public Builder setAutoDeleteTime(com.google.protobuf.Timestamp value) { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1181,7 +1188,8 @@ public Builder setAutoDeleteTime(com.google.protobuf.Timestamp.Builder builderFo * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1214,7 +1222,8 @@ public Builder mergeAutoDeleteTime(com.google.protobuf.Timestamp value) { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1242,7 +1251,8 @@ public Builder clearAutoDeleteTime() { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1257,7 +1267,8 @@ public com.google.protobuf.Timestamp.Builder getAutoDeleteTimeBuilder() { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* @@ -1280,7 +1291,8 @@ public com.google.protobuf.TimestampOrBuilder getAutoDeleteTimeOrBuilder() { * * *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
+     * Optional. The time when cluster will be auto-deleted (see JSON
+     * representation of
      * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
      * 
* diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java index 3f94c68eca7d..17018efe7c30 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java @@ -77,7 +77,8 @@ public interface LifecycleConfigOrBuilder * * *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
+   * Optional. The time when cluster will be auto-deleted (see JSON
+   * representation of
    * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
    * 
* @@ -92,7 +93,8 @@ public interface LifecycleConfigOrBuilder * * *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
+   * Optional. The time when cluster will be auto-deleted (see JSON
+   * representation of
    * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
    * 
* @@ -107,7 +109,8 @@ public interface LifecycleConfigOrBuilder * * *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
+   * Optional. The time when cluster will be auto-deleted (see JSON
+   * representation of
    * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
    * 
* diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroup.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroup.java new file mode 100644 index 000000000000..94940c4d17df --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroup.java @@ -0,0 +1,1847 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/clusters.proto + +package com.google.cloud.dataproc.v1; + +/** + * + * + *
+ * Dataproc Node Group.
+ * **The Dataproc `NodeGroup` resource is not related to the
+ * Dataproc [NodeGroupAffinity][google.cloud.dataproc.v1.NodeGroupAffinity]
+ * resource.**
+ * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.NodeGroup} + */ +public final class NodeGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.NodeGroup) + NodeGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeGroup.newBuilder() to construct. + private NodeGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodeGroup() { + name_ = ""; + roles_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodeGroup(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_NodeGroup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_NodeGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.NodeGroup.class, + com.google.cloud.dataproc.v1.NodeGroup.Builder.class); + } + + /** + * + * + *
+   * Node group roles.
+   * 
+ * + * Protobuf enum {@code google.cloud.dataproc.v1.NodeGroup.Role} + */ + public enum Role implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Required unspecified role.
+     * 
+ * + * ROLE_UNSPECIFIED = 0; + */ + ROLE_UNSPECIFIED(0), + /** + * + * + *
+     * Job drivers run on the node group.
+     * 
+ * + * DRIVER = 1; + */ + DRIVER(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Required unspecified role.
+     * 
+ * + * ROLE_UNSPECIFIED = 0; + */ + public static final int ROLE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Job drivers run on the node group.
+     * 
+ * + * DRIVER = 1; + */ + public static final int DRIVER_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Role valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Role forNumber(int value) { + switch (value) { + case 0: + return ROLE_UNSPECIFIED; + case 1: + return DRIVER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Role findValueByNumber(int number) { + return Role.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroup.getDescriptor().getEnumTypes().get(0); + } + + private static final Role[] VALUES = values(); + + public static Role valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Role(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.NodeGroup.Role) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The Node group [resource name](https://aip.dev/122).
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The Node group [resource name](https://aip.dev/122).
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLES_FIELD_NUMBER = 2; + private java.util.List roles_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.dataproc.v1.NodeGroup.Role> + roles_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.dataproc.v1.NodeGroup.Role>() { + public com.google.cloud.dataproc.v1.NodeGroup.Role convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.dataproc.v1.NodeGroup.Role result = + com.google.cloud.dataproc.v1.NodeGroup.Role.valueOf(from); + return result == null + ? com.google.cloud.dataproc.v1.NodeGroup.Role.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the roles. + */ + @java.lang.Override + public java.util.List getRolesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.dataproc.v1.NodeGroup.Role>(roles_, roles_converter_); + } + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of roles. + */ + @java.lang.Override + public int getRolesCount() { + return roles_.size(); + } + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The roles at the given index. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroup.Role getRoles(int index) { + return roles_converter_.convert(roles_.get(index)); + } + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for roles. + */ + @java.lang.Override + public java.util.List getRolesValueList() { + return roles_; + } + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of roles at the given index. + */ + @java.lang.Override + public int getRolesValue(int index) { + return roles_.get(index); + } + + private int rolesMemoizedSerializedSize; + + public static final int NODE_GROUP_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.dataproc.v1.InstanceGroupConfig nodeGroupConfig_; + /** + * + * + *
+   * Optional. The node group instance group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nodeGroupConfig field is set. + */ + @java.lang.Override + public boolean hasNodeGroupConfig() { + return nodeGroupConfig_ != null; + } + /** + * + * + *
+   * Optional. The node group instance group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeGroupConfig. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.InstanceGroupConfig getNodeGroupConfig() { + return nodeGroupConfig_ == null + ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() + : nodeGroupConfig_; + } + /** + * + * + *
+   * Optional. The node group instance group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getNodeGroupConfigOrBuilder() { + return getNodeGroupConfig(); + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_NodeGroup_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (getRolesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(rolesMemoizedSerializedSize); + } + for (int i = 0; i < roles_.size(); i++) { + output.writeEnumNoTag(roles_.get(i)); + } + if (nodeGroupConfig_ != null) { + output.writeMessage(3, getNodeGroupConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < roles_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(roles_.get(i)); + } + size += dataSize; + if (!getRolesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + rolesMemoizedSerializedSize = dataSize; + } + if (nodeGroupConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNodeGroupConfig()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataproc.v1.NodeGroup)) { + return super.equals(obj); + } + com.google.cloud.dataproc.v1.NodeGroup other = (com.google.cloud.dataproc.v1.NodeGroup) obj; + + if (!getName().equals(other.getName())) return false; + if (!roles_.equals(other.roles_)) return false; + if (hasNodeGroupConfig() != other.hasNodeGroupConfig()) return false; + if (hasNodeGroupConfig()) { + if (!getNodeGroupConfig().equals(other.getNodeGroupConfig())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + if (getRolesCount() > 0) { + hash = (37 * hash) + ROLES_FIELD_NUMBER; + hash = (53 * hash) + roles_.hashCode(); + } + if (hasNodeGroupConfig()) { + hash = (37 * hash) + NODE_GROUP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroupConfig().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.NodeGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dataproc.v1.NodeGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Dataproc Node Group.
+   * **The Dataproc `NodeGroup` resource is not related to the
+   * Dataproc [NodeGroupAffinity][google.cloud.dataproc.v1.NodeGroupAffinity]
+   * resource.**
+   * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.NodeGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.NodeGroup) + com.google.cloud.dataproc.v1.NodeGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_NodeGroup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_NodeGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.NodeGroup.class, + com.google.cloud.dataproc.v1.NodeGroup.Builder.class); + } + + // Construct using com.google.cloud.dataproc.v1.NodeGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + roles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (nodeGroupConfigBuilder_ == null) { + nodeGroupConfig_ = null; + } else { + nodeGroupConfig_ = null; + nodeGroupConfigBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataproc.v1.ClustersProto + .internal_static_google_cloud_dataproc_v1_NodeGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroup getDefaultInstanceForType() { + return com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroup build() { + com.google.cloud.dataproc.v1.NodeGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroup buildPartial() { + com.google.cloud.dataproc.v1.NodeGroup result = + new com.google.cloud.dataproc.v1.NodeGroup(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + roles_ = java.util.Collections.unmodifiableList(roles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.roles_ = roles_; + if (nodeGroupConfigBuilder_ == null) { + result.nodeGroupConfig_ = nodeGroupConfig_; + } else { + result.nodeGroupConfig_ = nodeGroupConfigBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataproc.v1.NodeGroup) { + return mergeFrom((com.google.cloud.dataproc.v1.NodeGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataproc.v1.NodeGroup other) { + if (other == com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.roles_.isEmpty()) { + if (roles_.isEmpty()) { + roles_ = other.roles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRolesIsMutable(); + roles_.addAll(other.roles_); + } + onChanged(); + } + if (other.hasNodeGroupConfig()) { + mergeNodeGroupConfig(other.getNodeGroupConfig()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + int tmpRaw = input.readEnum(); + ensureRolesIsMutable(); + roles_.add(tmpRaw); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureRolesIsMutable(); + roles_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 18 + case 26: + { + input.readMessage(getNodeGroupConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The Node group [resource name](https://aip.dev/122).
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Node group [resource name](https://aip.dev/122).
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Node group [resource name](https://aip.dev/122).
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Node group [resource name](https://aip.dev/122).
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Node group [resource name](https://aip.dev/122).
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List roles_ = java.util.Collections.emptyList(); + + private void ensureRolesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + roles_ = new java.util.ArrayList(roles_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the roles. + */ + public java.util.List getRolesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.dataproc.v1.NodeGroup.Role>(roles_, roles_converter_); + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of roles. + */ + public int getRolesCount() { + return roles_.size(); + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The roles at the given index. + */ + public com.google.cloud.dataproc.v1.NodeGroup.Role getRoles(int index) { + return roles_converter_.convert(roles_.get(index)); + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The roles to set. + * @return This builder for chaining. + */ + public Builder setRoles(int index, com.google.cloud.dataproc.v1.NodeGroup.Role value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The roles to add. + * @return This builder for chaining. + */ + public Builder addRoles(com.google.cloud.dataproc.v1.NodeGroup.Role value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The roles to add. + * @return This builder for chaining. + */ + public Builder addAllRoles( + java.lang.Iterable values) { + ensureRolesIsMutable(); + for (com.google.cloud.dataproc.v1.NodeGroup.Role value : values) { + roles_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearRoles() { + roles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for roles. + */ + public java.util.List getRolesValueList() { + return java.util.Collections.unmodifiableList(roles_); + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of roles at the given index. + */ + public int getRolesValue(int index) { + return roles_.get(index); + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for roles to set. + * @return This builder for chaining. + */ + public Builder setRolesValue(int index, int value) { + ensureRolesIsMutable(); + roles_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for roles to add. + * @return This builder for chaining. + */ + public Builder addRolesValue(int value) { + ensureRolesIsMutable(); + roles_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Node group roles.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for roles to add. + * @return This builder for chaining. + */ + public Builder addAllRolesValue(java.lang.Iterable values) { + ensureRolesIsMutable(); + for (int value : values) { + roles_.add(value); + } + onChanged(); + return this; + } + + private com.google.cloud.dataproc.v1.InstanceGroupConfig nodeGroupConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.InstanceGroupConfig, + com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, + com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> + nodeGroupConfigBuilder_; + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nodeGroupConfig field is set. + */ + public boolean hasNodeGroupConfig() { + return nodeGroupConfigBuilder_ != null || nodeGroupConfig_ != null; + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeGroupConfig. + */ + public com.google.cloud.dataproc.v1.InstanceGroupConfig getNodeGroupConfig() { + if (nodeGroupConfigBuilder_ == null) { + return nodeGroupConfig_ == null + ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() + : nodeGroupConfig_; + } else { + return nodeGroupConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNodeGroupConfig(com.google.cloud.dataproc.v1.InstanceGroupConfig value) { + if (nodeGroupConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeGroupConfig_ = value; + onChanged(); + } else { + nodeGroupConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNodeGroupConfig( + com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder builderForValue) { + if (nodeGroupConfigBuilder_ == null) { + nodeGroupConfig_ = builderForValue.build(); + onChanged(); + } else { + nodeGroupConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNodeGroupConfig(com.google.cloud.dataproc.v1.InstanceGroupConfig value) { + if (nodeGroupConfigBuilder_ == null) { + if (nodeGroupConfig_ != null) { + nodeGroupConfig_ = + com.google.cloud.dataproc.v1.InstanceGroupConfig.newBuilder(nodeGroupConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + nodeGroupConfig_ = value; + } + onChanged(); + } else { + nodeGroupConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNodeGroupConfig() { + if (nodeGroupConfigBuilder_ == null) { + nodeGroupConfig_ = null; + onChanged(); + } else { + nodeGroupConfig_ = null; + nodeGroupConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder getNodeGroupConfigBuilder() { + + onChanged(); + return getNodeGroupConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getNodeGroupConfigOrBuilder() { + if (nodeGroupConfigBuilder_ != null) { + return nodeGroupConfigBuilder_.getMessageOrBuilder(); + } else { + return nodeGroupConfig_ == null + ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() + : nodeGroupConfig_; + } + } + /** + * + * + *
+     * Optional. The node group instance group configuration.
+     * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.InstanceGroupConfig, + com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, + com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> + getNodeGroupConfigFieldBuilder() { + if (nodeGroupConfigBuilder_ == null) { + nodeGroupConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.InstanceGroupConfig, + com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, + com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder>( + getNodeGroupConfig(), getParentForChildren(), isClean()); + nodeGroupConfig_ = null; + } + return nodeGroupConfigBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Node group labels.
+     * * Label **keys** must consist of from 1 to 63 characters and conform to
+     *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * * Label **values** can be empty. If specified, they must consist of from
+     *   1 to 63 characters and conform to [RFC 1035]
+     *   (https://www.ietf.org/rfc/rfc1035.txt).
+     * * The node group must have no more than 32 labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Node group labels.
+     * * Label **keys** must consist of from 1 to 63 characters and conform to
+     *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * * Label **values** can be empty. If specified, they must consist of from
+     *   1 to 63 characters and conform to [RFC 1035]
+     *   (https://www.ietf.org/rfc/rfc1035.txt).
+     * * The node group must have no more than 32 labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Node group labels.
+     * * Label **keys** must consist of from 1 to 63 characters and conform to
+     *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * * Label **values** can be empty. If specified, they must consist of from
+     *   1 to 63 characters and conform to [RFC 1035]
+     *   (https://www.ietf.org/rfc/rfc1035.txt).
+     * * The node group must have no more than 32 labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Node group labels.
+     * * Label **keys** must consist of from 1 to 63 characters and conform to
+     *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * * Label **values** can be empty. If specified, they must consist of from
+     *   1 to 63 characters and conform to [RFC 1035]
+     *   (https://www.ietf.org/rfc/rfc1035.txt).
+     * * The node group must have no more than 32 labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Node group labels.
+     * * Label **keys** must consist of from 1 to 63 characters and conform to
+     *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * * Label **values** can be empty. If specified, they must consist of from
+     *   1 to 63 characters and conform to [RFC 1035]
+     *   (https://www.ietf.org/rfc/rfc1035.txt).
+     * * The node group must have no more than 32 labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Node group labels.
+     * * Label **keys** must consist of from 1 to 63 characters and conform to
+     *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * * Label **values** can be empty. If specified, they must consist of from
+     *   1 to 63 characters and conform to [RFC 1035]
+     *   (https://www.ietf.org/rfc/rfc1035.txt).
+     * * The node group must have no more than 32 labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Node group labels.
+     * * Label **keys** must consist of from 1 to 63 characters and conform to
+     *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * * Label **values** can be empty. If specified, they must consist of from
+     *   1 to 63 characters and conform to [RFC 1035]
+     *   (https://www.ietf.org/rfc/rfc1035.txt).
+     * * The node group must have no more than 32 labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.NodeGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.NodeGroup) + private static final com.google.cloud.dataproc.v1.NodeGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.NodeGroup(); + } + + public static com.google.cloud.dataproc.v1.NodeGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java index a503ed138011..3a7d9e8a2b25 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java @@ -23,6 +23,8 @@ * *
  * Node Group Affinity for clusters using sole-tenant node groups.
+ * **The Dataproc `NodeGroupAffinity` resource is not related to the
+ * Dataproc [NodeGroup][google.cloud.dataproc.v1.NodeGroup] resource.**
  * 
* * Protobuf type {@code google.cloud.dataproc.v1.NodeGroupAffinity} @@ -294,6 +296,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Node Group Affinity for clusters using sole-tenant node groups.
+   * **The Dataproc `NodeGroupAffinity` resource is not related to the
+   * Dataproc [NodeGroup][google.cloud.dataproc.v1.NodeGroup] resource.**
    * 
* * Protobuf type {@code google.cloud.dataproc.v1.NodeGroupAffinity} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupName.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupName.java new file mode 100644 index 000000000000..24daa0f3255d --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class NodeGroupName implements ResourceName { + private static final PathTemplate PROJECT_REGION_CLUSTER_NODE_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}"); + private volatile Map fieldValuesMap; + private final String project; + private final String region; + private final String cluster; + private final String nodeGroup; + + @Deprecated + protected NodeGroupName() { + project = null; + region = null; + cluster = null; + nodeGroup = null; + } + + private NodeGroupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + region = Preconditions.checkNotNull(builder.getRegion()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + nodeGroup = Preconditions.checkNotNull(builder.getNodeGroup()); + } + + public String getProject() { + return project; + } + + public String getRegion() { + return region; + } + + public String getCluster() { + return cluster; + } + + public String getNodeGroup() { + return nodeGroup; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NodeGroupName of(String project, String region, String cluster, String nodeGroup) { + return newBuilder() + .setProject(project) + .setRegion(region) + .setCluster(cluster) + .setNodeGroup(nodeGroup) + .build(); + } + + public static String format(String project, String region, String cluster, String nodeGroup) { + return newBuilder() + .setProject(project) + .setRegion(region) + .setCluster(cluster) + .setNodeGroup(nodeGroup) + .build() + .toString(); + } + + public static NodeGroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_REGION_CLUSTER_NODE_GROUP.validatedMatch( + formattedString, "NodeGroupName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("region"), + matchMap.get("cluster"), + matchMap.get("node_group")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NodeGroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_REGION_CLUSTER_NODE_GROUP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (region != null) { + fieldMapBuilder.put("region", region); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + if (nodeGroup != null) { + fieldMapBuilder.put("node_group", nodeGroup); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_REGION_CLUSTER_NODE_GROUP.instantiate( + "project", project, "region", region, "cluster", cluster, "node_group", nodeGroup); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NodeGroupName that = ((NodeGroupName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.region, that.region) + && Objects.equals(this.cluster, that.cluster) + && Objects.equals(this.nodeGroup, that.nodeGroup); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(region); + h *= 1000003; + h ^= Objects.hashCode(cluster); + h *= 1000003; + h ^= Objects.hashCode(nodeGroup); + return h; + } + + /** Builder for projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}. */ + public static class Builder { + private String project; + private String region; + private String cluster; + private String nodeGroup; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getRegion() { + return region; + } + + public String getCluster() { + return cluster; + } + + public String getNodeGroup() { + return nodeGroup; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setRegion(String region) { + this.region = region; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + public Builder setNodeGroup(String nodeGroup) { + this.nodeGroup = nodeGroup; + return this; + } + + private Builder(NodeGroupName nodeGroupName) { + this.project = nodeGroupName.project; + this.region = nodeGroupName.region; + this.cluster = nodeGroupName.cluster; + this.nodeGroup = nodeGroupName.nodeGroup; + } + + public NodeGroupName build() { + return new NodeGroupName(this); + } + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOperationMetadata.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOperationMetadata.java new file mode 100644 index 000000000000..e7e2ad257553 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOperationMetadata.java @@ -0,0 +1,2798 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/operations.proto + +package com.google.cloud.dataproc.v1; + +/** + * + * + *
+ * Metadata describing the node group operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.NodeGroupOperationMetadata} + */ +public final class NodeGroupOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.NodeGroupOperationMetadata) + NodeGroupOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeGroupOperationMetadata.newBuilder() to construct. + private NodeGroupOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodeGroupOperationMetadata() { + nodeGroupId_ = ""; + clusterUuid_ = ""; + statusHistory_ = java.util.Collections.emptyList(); + operationType_ = 0; + description_ = ""; + warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodeGroupOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.OperationsProto + .internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.OperationsProto + .internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.class, + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.Builder.class); + } + + /** + * + * + *
+   * Operation type for node group resources.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType} + */ + public enum NodeGroupOperationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Node group operation type is unknown.
+     * 
+ * + * NODE_GROUP_OPERATION_TYPE_UNSPECIFIED = 0; + */ + NODE_GROUP_OPERATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Create node group operation type.
+     * 
+ * + * CREATE = 1; + */ + CREATE(1), + /** + * + * + *
+     * Update node group operation type.
+     * 
+ * + * UPDATE = 2; + */ + UPDATE(2), + /** + * + * + *
+     * Delete node group operation type.
+     * 
+ * + * DELETE = 3; + */ + DELETE(3), + /** + * + * + *
+     * Resize node group operation type.
+     * 
+ * + * RESIZE = 4; + */ + RESIZE(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Node group operation type is unknown.
+     * 
+ * + * NODE_GROUP_OPERATION_TYPE_UNSPECIFIED = 0; + */ + public static final int NODE_GROUP_OPERATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Create node group operation type.
+     * 
+ * + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * + * + *
+     * Update node group operation type.
+     * 
+ * + * UPDATE = 2; + */ + public static final int UPDATE_VALUE = 2; + /** + * + * + *
+     * Delete node group operation type.
+     * 
+ * + * DELETE = 3; + */ + public static final int DELETE_VALUE = 3; + /** + * + * + *
+     * Resize node group operation type.
+     * 
+ * + * RESIZE = 4; + */ + public static final int RESIZE_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NodeGroupOperationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NodeGroupOperationType forNumber(int value) { + switch (value) { + case 0: + return NODE_GROUP_OPERATION_TYPE_UNSPECIFIED; + case 1: + return CREATE; + case 2: + return UPDATE; + case 3: + return DELETE; + case 4: + return RESIZE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NodeGroupOperationType findValueByNumber(int number) { + return NodeGroupOperationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NodeGroupOperationType[] VALUES = values(); + + public static NodeGroupOperationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NodeGroupOperationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType) + } + + public static final int NODE_GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object nodeGroupId_; + /** + * + * + *
+   * Output only. Node group ID for the operation.
+   * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nodeGroupId. + */ + @java.lang.Override + public java.lang.String getNodeGroupId() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Node group ID for the operation.
+   * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for nodeGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNodeGroupIdBytes() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_UUID_FIELD_NUMBER = 2; + private volatile java.lang.Object clusterUuid_; + /** + * + * + *
+   * Output only. Cluster UUID associated with the node group operation.
+   * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterUuid. + */ + @java.lang.Override + public java.lang.String getClusterUuid() { + java.lang.Object ref = clusterUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUuid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cluster UUID associated with the node group operation.
+   * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterUuidBytes() { + java.lang.Object ref = clusterUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 3; + private com.google.cloud.dataproc.v1.ClusterOperationStatus status_; + /** + * + * + *
+   * Output only. Current operation status.
+   * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * Output only. Current operation status.
+   * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The status. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatus() { + return status_ == null + ? com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance() + : status_; + } + /** + * + * + *
+   * Output only. Current operation status.
+   * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int STATUS_HISTORY_FIELD_NUMBER = 4; + private java.util.List statusHistory_; + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getStatusHistoryList() { + return statusHistory_; + } + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getStatusHistoryOrBuilderList() { + return statusHistory_; + } + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getStatusHistoryCount() { + return statusHistory_.size(); + } + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatusHistory(int index) { + return statusHistory_.get(index); + } + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusHistoryOrBuilder( + int index) { + return statusHistory_.get(index); + } + + public static final int OPERATION_TYPE_FIELD_NUMBER = 5; + private int operationType_; + /** + * + * + *
+   * The operation type.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+   * The operation type.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType + getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType result = + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType.valueOf( + operationType_); + return result == null + ? com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType + .UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Output only. Short description of operation.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Short description of operation.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataproc.v1.OperationsProto + .internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int WARNINGS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList warnings_; + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the warnings. + */ + public com.google.protobuf.ProtocolStringList getWarningsList() { + return warnings_; + } + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of warnings. + */ + public int getWarningsCount() { + return warnings_.size(); + } + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The warnings at the given index. + */ + public java.lang.String getWarnings(int index) { + return warnings_.get(index); + } + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the warnings at the given index. + */ + public com.google.protobuf.ByteString getWarningsBytes(int index) { + return warnings_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodeGroupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterUuid_); + } + if (status_ != null) { + output.writeMessage(3, getStatus()); + } + for (int i = 0; i < statusHistory_.size(); i++) { + output.writeMessage(4, statusHistory_.get(i)); + } + if (operationType_ + != com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType + .NODE_GROUP_OPERATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, operationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + for (int i = 0; i < warnings_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, warnings_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodeGroupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterUuid_); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus()); + } + for (int i = 0; i < statusHistory_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, statusHistory_.get(i)); + } + if (operationType_ + != com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType + .NODE_GROUP_OPERATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, operationType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + { + int dataSize = 0; + for (int i = 0; i < warnings_.size(); i++) { + dataSize += computeStringSizeNoTag(warnings_.getRaw(i)); + } + size += dataSize; + size += 1 * getWarningsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataproc.v1.NodeGroupOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata other = + (com.google.cloud.dataproc.v1.NodeGroupOperationMetadata) obj; + + if (!getNodeGroupId().equals(other.getNodeGroupId())) return false; + if (!getClusterUuid().equals(other.getClusterUuid())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!getStatusHistoryList().equals(other.getStatusHistoryList())) return false; + if (operationType_ != other.operationType_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getWarningsList().equals(other.getWarningsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroupId().hashCode(); + hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; + hash = (53 * hash) + getClusterUuid().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (getStatusHistoryCount() > 0) { + hash = (37 * hash) + STATUS_HISTORY_FIELD_NUMBER; + hash = (53 * hash) + getStatusHistoryList().hashCode(); + } + hash = (37 * hash) + OPERATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + operationType_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getWarningsCount() > 0) { + hash = (37 * hash) + WARNINGS_FIELD_NUMBER; + hash = (53 * hash) + getWarningsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata describing the node group operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.NodeGroupOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.NodeGroupOperationMetadata) + com.google.cloud.dataproc.v1.NodeGroupOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.OperationsProto + .internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.OperationsProto + .internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.class, + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + nodeGroupId_ = ""; + + clusterUuid_ = ""; + + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (statusHistoryBuilder_ == null) { + statusHistory_ = java.util.Collections.emptyList(); + } else { + statusHistory_ = null; + statusHistoryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + operationType_ = 0; + + description_ = ""; + + internalGetMutableLabels().clear(); + warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataproc.v1.OperationsProto + .internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOperationMetadata build() { + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOperationMetadata buildPartial() { + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata result = + new com.google.cloud.dataproc.v1.NodeGroupOperationMetadata(this); + int from_bitField0_ = bitField0_; + result.nodeGroupId_ = nodeGroupId_; + result.clusterUuid_ = clusterUuid_; + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (statusHistoryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.statusHistory_ = statusHistory_; + } else { + result.statusHistory_ = statusHistoryBuilder_.build(); + } + result.operationType_ = operationType_; + result.description_ = description_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (((bitField0_ & 0x00000004) != 0)) { + warnings_ = warnings_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.warnings_ = warnings_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataproc.v1.NodeGroupOperationMetadata) { + return mergeFrom((com.google.cloud.dataproc.v1.NodeGroupOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataproc.v1.NodeGroupOperationMetadata other) { + if (other == com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.getDefaultInstance()) + return this; + if (!other.getNodeGroupId().isEmpty()) { + nodeGroupId_ = other.nodeGroupId_; + onChanged(); + } + if (!other.getClusterUuid().isEmpty()) { + clusterUuid_ = other.clusterUuid_; + onChanged(); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (statusHistoryBuilder_ == null) { + if (!other.statusHistory_.isEmpty()) { + if (statusHistory_.isEmpty()) { + statusHistory_ = other.statusHistory_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStatusHistoryIsMutable(); + statusHistory_.addAll(other.statusHistory_); + } + onChanged(); + } + } else { + if (!other.statusHistory_.isEmpty()) { + if (statusHistoryBuilder_.isEmpty()) { + statusHistoryBuilder_.dispose(); + statusHistoryBuilder_ = null; + statusHistory_ = other.statusHistory_; + bitField0_ = (bitField0_ & ~0x00000001); + statusHistoryBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStatusHistoryFieldBuilder() + : null; + } else { + statusHistoryBuilder_.addAllMessages(other.statusHistory_); + } + } + } + if (other.operationType_ != 0) { + setOperationTypeValue(other.getOperationTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.warnings_.isEmpty()) { + if (warnings_.isEmpty()) { + warnings_ = other.warnings_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureWarningsIsMutable(); + warnings_.addAll(other.warnings_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + nodeGroupId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + clusterUuid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.cloud.dataproc.v1.ClusterOperationStatus m = + input.readMessage( + com.google.cloud.dataproc.v1.ClusterOperationStatus.parser(), + extensionRegistry); + if (statusHistoryBuilder_ == null) { + ensureStatusHistoryIsMutable(); + statusHistory_.add(m); + } else { + statusHistoryBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: + { + operationType_ = input.readEnum(); + + break; + } // case 40 + case 50: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWarningsIsMutable(); + warnings_.add(s); + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object nodeGroupId_ = ""; + /** + * + * + *
+     * Output only. Node group ID for the operation.
+     * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nodeGroupId. + */ + public java.lang.String getNodeGroupId() { + java.lang.Object ref = nodeGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Node group ID for the operation.
+     * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for nodeGroupId. + */ + public com.google.protobuf.ByteString getNodeGroupIdBytes() { + java.lang.Object ref = nodeGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Node group ID for the operation.
+     * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The nodeGroupId to set. + * @return This builder for chaining. + */ + public Builder setNodeGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Node group ID for the operation.
+     * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearNodeGroupId() { + + nodeGroupId_ = getDefaultInstance().getNodeGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Node group ID for the operation.
+     * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for nodeGroupId to set. + * @return This builder for chaining. + */ + public Builder setNodeGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object clusterUuid_ = ""; + /** + * + * + *
+     * Output only. Cluster UUID associated with the node group operation.
+     * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterUuid. + */ + public java.lang.String getClusterUuid() { + java.lang.Object ref = clusterUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cluster UUID associated with the node group operation.
+     * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterUuid. + */ + public com.google.protobuf.ByteString getClusterUuidBytes() { + java.lang.Object ref = clusterUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cluster UUID associated with the node group operation.
+     * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The clusterUuid to set. + * @return This builder for chaining. + */ + public Builder setClusterUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterUuid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cluster UUID associated with the node group operation.
+     * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearClusterUuid() { + + clusterUuid_ = getDefaultInstance().getClusterUuid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cluster UUID associated with the node group operation.
+     * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for clusterUuid to set. + * @return This builder for chaining. + */ + public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterUuid_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dataproc.v1.ClusterOperationStatus status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.ClusterOperationStatus, + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The status. + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatus() { + if (statusBuilder_ == null) { + return status_ == null + ? com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance() + : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStatus(com.google.cloud.dataproc.v1.ClusterOperationStatus value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStatus( + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStatus(com.google.cloud.dataproc.v1.ClusterOperationStatus value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + com.google.cloud.dataproc.v1.ClusterOperationStatus.newBuilder(status_) + .mergeFrom(value) + .buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null + ? com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance() + : status_; + } + } + /** + * + * + *
+     * Output only. Current operation status.
+     * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.ClusterOperationStatus, + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataproc.v1.ClusterOperationStatus, + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder>( + getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + private java.util.List statusHistory_ = + java.util.Collections.emptyList(); + + private void ensureStatusHistoryIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + statusHistory_ = + new java.util.ArrayList( + statusHistory_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataproc.v1.ClusterOperationStatus, + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> + statusHistoryBuilder_; + + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getStatusHistoryList() { + if (statusHistoryBuilder_ == null) { + return java.util.Collections.unmodifiableList(statusHistory_); + } else { + return statusHistoryBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getStatusHistoryCount() { + if (statusHistoryBuilder_ == null) { + return statusHistory_.size(); + } else { + return statusHistoryBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatusHistory(int index) { + if (statusHistoryBuilder_ == null) { + return statusHistory_.get(index); + } else { + return statusHistoryBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStatusHistory( + int index, com.google.cloud.dataproc.v1.ClusterOperationStatus value) { + if (statusHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusHistoryIsMutable(); + statusHistory_.set(index, value); + onChanged(); + } else { + statusHistoryBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStatusHistory( + int index, com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { + if (statusHistoryBuilder_ == null) { + ensureStatusHistoryIsMutable(); + statusHistory_.set(index, builderForValue.build()); + onChanged(); + } else { + statusHistoryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStatusHistory(com.google.cloud.dataproc.v1.ClusterOperationStatus value) { + if (statusHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusHistoryIsMutable(); + statusHistory_.add(value); + onChanged(); + } else { + statusHistoryBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStatusHistory( + int index, com.google.cloud.dataproc.v1.ClusterOperationStatus value) { + if (statusHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusHistoryIsMutable(); + statusHistory_.add(index, value); + onChanged(); + } else { + statusHistoryBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStatusHistory( + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { + if (statusHistoryBuilder_ == null) { + ensureStatusHistoryIsMutable(); + statusHistory_.add(builderForValue.build()); + onChanged(); + } else { + statusHistoryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStatusHistory( + int index, com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { + if (statusHistoryBuilder_ == null) { + ensureStatusHistoryIsMutable(); + statusHistory_.add(index, builderForValue.build()); + onChanged(); + } else { + statusHistoryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllStatusHistory( + java.lang.Iterable values) { + if (statusHistoryBuilder_ == null) { + ensureStatusHistoryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, statusHistory_); + onChanged(); + } else { + statusHistoryBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStatusHistory() { + if (statusHistoryBuilder_ == null) { + statusHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + statusHistoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeStatusHistory(int index) { + if (statusHistoryBuilder_ == null) { + ensureStatusHistoryIsMutable(); + statusHistory_.remove(index); + onChanged(); + } else { + statusHistoryBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder getStatusHistoryBuilder( + int index) { + return getStatusHistoryFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusHistoryOrBuilder( + int index) { + if (statusHistoryBuilder_ == null) { + return statusHistory_.get(index); + } else { + return statusHistoryBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getStatusHistoryOrBuilderList() { + if (statusHistoryBuilder_ != null) { + return statusHistoryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(statusHistory_); + } + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder addStatusHistoryBuilder() { + return getStatusHistoryFieldBuilder() + .addBuilder(com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder addStatusHistoryBuilder( + int index) { + return getStatusHistoryFieldBuilder() + .addBuilder( + index, com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The previous operation status.
+     * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getStatusHistoryBuilderList() { + return getStatusHistoryFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataproc.v1.ClusterOperationStatus, + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> + getStatusHistoryFieldBuilder() { + if (statusHistoryBuilder_ == null) { + statusHistoryBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataproc.v1.ClusterOperationStatus, + com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder>( + statusHistory_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + statusHistory_ = null; + } + return statusHistoryBuilder_; + } + + private int operationType_ = 0; + /** + * + * + *
+     * The operation type.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+     * The operation type.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @param value The enum numeric value on the wire for operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationTypeValue(int value) { + + operationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation type.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType + getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType result = + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType.valueOf( + operationType_); + return result == null + ? com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The operation type.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @param value The operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationType( + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType value) { + if (value == null) { + throw new NullPointerException(); + } + + operationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The operation type.
+     * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearOperationType() { + + operationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Output only. Short description of operation.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Short description of operation.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Short description of operation.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Short description of operation.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Short description of operation.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Output only. Labels associated with the operation.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Output only. Labels associated with the operation.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Output only. Labels associated with the operation.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Labels associated with the operation.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Labels associated with the operation.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Output only. Labels associated with the operation.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. Labels associated with the operation.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList warnings_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureWarningsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + warnings_ = new com.google.protobuf.LazyStringArrayList(warnings_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the warnings. + */ + public com.google.protobuf.ProtocolStringList getWarningsList() { + return warnings_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of warnings. + */ + public int getWarningsCount() { + return warnings_.size(); + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The warnings at the given index. + */ + public java.lang.String getWarnings(int index) { + return warnings_.get(index); + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the warnings at the given index. + */ + public com.google.protobuf.ByteString getWarningsBytes(int index) { + return warnings_.getByteString(index); + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The warnings to set. + * @return This builder for chaining. + */ + public Builder setWarnings(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The warnings to add. + * @return This builder for chaining. + */ + public Builder addWarnings(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The warnings to add. + * @return This builder for chaining. + */ + public Builder addAllWarnings(java.lang.Iterable values) { + ensureWarningsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, warnings_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearWarnings() { + warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Errors encountered during operation execution.
+     * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the warnings to add. + * @return This builder for chaining. + */ + public Builder addWarningsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWarningsIsMutable(); + warnings_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.NodeGroupOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.NodeGroupOperationMetadata) + private static final com.google.cloud.dataproc.v1.NodeGroupOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.NodeGroupOperationMetadata(); + } + + public static com.google.cloud.dataproc.v1.NodeGroupOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeGroupOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.NodeGroupOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOperationMetadataOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..8c34454cece5 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOperationMetadataOrBuilder.java @@ -0,0 +1,342 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/operations.proto + +package com.google.cloud.dataproc.v1; + +public interface NodeGroupOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.NodeGroupOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Node group ID for the operation.
+   * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nodeGroupId. + */ + java.lang.String getNodeGroupId(); + /** + * + * + *
+   * Output only. Node group ID for the operation.
+   * 
+ * + * string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for nodeGroupId. + */ + com.google.protobuf.ByteString getNodeGroupIdBytes(); + + /** + * + * + *
+   * Output only. Cluster UUID associated with the node group operation.
+   * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterUuid. + */ + java.lang.String getClusterUuid(); + /** + * + * + *
+   * Output only. Cluster UUID associated with the node group operation.
+   * 
+ * + * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterUuid. + */ + com.google.protobuf.ByteString getClusterUuidBytes(); + + /** + * + * + *
+   * Output only. Current operation status.
+   * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * Output only. Current operation status.
+   * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The status. + */ + com.google.cloud.dataproc.v1.ClusterOperationStatus getStatus(); + /** + * + * + *
+   * Output only. Current operation status.
+   * 
+ * + * + * .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getStatusHistoryList(); + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataproc.v1.ClusterOperationStatus getStatusHistory(int index); + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getStatusHistoryCount(); + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getStatusHistoryOrBuilderList(); + /** + * + * + *
+   * Output only. The previous operation status.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusHistoryOrBuilder(int index); + + /** + * + * + *
+   * The operation type.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @return The enum numeric value on the wire for operationType. + */ + int getOperationTypeValue(); + /** + * + * + *
+   * The operation type.
+   * 
+ * + * + * .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; + * + * + * @return The operationType. + */ + com.google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType getOperationType(); + + /** + * + * + *
+   * Output only. Short description of operation.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Output only. Short description of operation.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Output only. Labels associated with the operation.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the warnings. + */ + java.util.List getWarningsList(); + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of warnings. + */ + int getWarningsCount(); + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The warnings at the given index. + */ + java.lang.String getWarnings(int index); + /** + * + * + *
+   * Output only. Errors encountered during operation execution.
+   * 
+ * + * repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the warnings at the given index. + */ + com.google.protobuf.ByteString getWarningsBytes(int index); +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOrBuilder.java new file mode 100644 index 000000000000..c60cb4bf4601 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupOrBuilder.java @@ -0,0 +1,253 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/clusters.proto + +package com.google.cloud.dataproc.v1; + +public interface NodeGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.NodeGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Node group [resource name](https://aip.dev/122).
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The Node group [resource name](https://aip.dev/122).
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the roles. + */ + java.util.List getRolesList(); + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of roles. + */ + int getRolesCount(); + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The roles at the given index. + */ + com.google.cloud.dataproc.v1.NodeGroup.Role getRoles(int index); + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for roles. + */ + java.util.List getRolesValueList(); + /** + * + * + *
+   * Required. Node group roles.
+   * 
+ * + * + * repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of roles at the given index. + */ + int getRolesValue(int index); + + /** + * + * + *
+   * Optional. The node group instance group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nodeGroupConfig field is set. + */ + boolean hasNodeGroupConfig(); + /** + * + * + *
+   * Optional. The node group instance group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nodeGroupConfig. + */ + com.google.cloud.dataproc.v1.InstanceGroupConfig getNodeGroupConfig(); + /** + * + * + *
+   * Optional. The node group instance group configuration.
+   * 
+ * + * + * .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getNodeGroupConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Node group labels.
+   * * Label **keys** must consist of from 1 to 63 characters and conform to
+   *   [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * * Label **values** can be empty. If specified, they must consist of from
+   *   1 to 63 characters and conform to [RFC 1035]
+   *   (https://www.ietf.org/rfc/rfc1035.txt).
+   * * The node group must have no more than 32 labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupsProto.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupsProto.java new file mode 100644 index 000000000000..82bd2bc4e393 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupsProto.java @@ -0,0 +1,155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/node_groups.proto + +package com.google.cloud.dataproc.v1; + +public final class NodeGroupsProto { + private NodeGroupsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/cloud/dataproc/v1/node_groups.p" + + "roto\022\030google.cloud.dataproc.v1\032\034google/a" + + "pi/annotations.proto\032\027google/api/client." + + "proto\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032\'google/cloud/" + + "dataproc/v1/clusters.proto\032#google/longr" + + "unning/operations.proto\032\036google/protobuf" + + "/duration.proto\"\306\001\n\026CreateNodeGroupReque" + + "st\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!dataproc.goo" + + "gleapis.com/NodeGroup\022<\n\nnode_group\030\002 \001(" + + "\0132#.google.cloud.dataproc.v1.NodeGroupB\003" + + "\340A\002\022\032\n\rnode_group_id\030\004 \001(\tB\003\340A\001\022\027\n\nreque" + + "st_id\030\003 \001(\tB\003\340A\001\"\236\001\n\026ResizeNodeGroupRequ" + + "est\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\021\n\004size\030\002 \001(\005B\003\340A" + + "\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\022E\n\035graceful_d" + + "ecommission_timeout\030\004 \001(\0132\031.google.proto" + + "buf.DurationB\003\340A\001\"N\n\023GetNodeGroupRequest" + + "\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!dataproc.googlea" + + "pis.com/NodeGroup2\247\006\n\023NodeGroupControlle" + + "r\022\225\002\n\017CreateNodeGroup\0220.google.cloud.dat" + + "aproc.v1.CreateNodeGroupRequest\032\035.google" + + ".longrunning.Operation\"\260\001\202\323\344\223\002E\"7/v1/{pa" + + "rent=projects/*/regions/*/clusters/*}/no" + + "deGroups:\nnode_group\332A\037parent,node_group" + + ",node_group_id\312A@\n\tNodeGroup\0223google.clo" + + "ud.dataproc.v1.NodeGroupOperationMetadat" + + "a\022\375\001\n\017ResizeNodeGroup\0220.google.cloud.dat" + + "aproc.v1.ResizeNodeGroupRequest\032\035.google" + + ".longrunning.Operation\"\230\001\202\323\344\223\002C\">/v1/{na" + + "me=projects/*/regions/*/clusters/*/nodeG" + + "roups/*}:resize:\001*\332A\tname,size\312A@\n\tNodeG" + + "roup\0223google.cloud.dataproc.v1.NodeGroup" + + "OperationMetadata\022\252\001\n\014GetNodeGroup\022-.goo" + + "gle.cloud.dataproc.v1.GetNodeGroupReques" + + "t\032#.google.cloud.dataproc.v1.NodeGroup\"F" + + "\202\323\344\223\0029\0227/v1/{name=projects/*/regions/*/c" + + "lusters/*/nodeGroups/*}\332A\004name\032K\312A\027datap" + + "roc.googleapis.com\322A.https://www.googlea" + + "pis.com/auth/cloud-platformB\325\001\n\034com.goog" + + "le.cloud.dataproc.v1B\017NodeGroupsProtoP\001Z" + + "@google.golang.org/genproto/googleapis/c" + + "loud/dataproc/v1;dataproc\352A_\n%dataproc.g" + + "oogleapis.com/ClusterRegion\0226projects/{p" + + "roject}/regions/{region}/clusters/{clust" + + "er}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dataproc.v1.ClustersProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_CreateNodeGroupRequest_descriptor, + new java.lang.String[] { + "Parent", "NodeGroup", "NodeGroupId", "RequestId", + }); + internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_descriptor, + new java.lang.String[] { + "Name", "Size", "RequestId", "GracefulDecommissionTimeout", + }); + internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_GetNodeGroupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dataproc.v1.ClustersProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java index bda660402bb0..db2a987680d2 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java @@ -47,6 +47,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_LabelsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -89,10 +97,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "le.cloud.dataproc.v1.ClusterOperationMet" + "adata.LabelsEntryB\003\340A\003\022\025\n\010warnings\030\016 \003(\t" + "B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001Bs\n\034com.google.cloud.datapro" - + "c.v1B\017OperationsProtoP\001Z@google.golang.o" - + "rg/genproto/googleapis/cloud/dataproc/v1" - + ";dataprocb\006proto3" + + "ue\030\002 \001(\t:\0028\001\"\372\004\n\032NodeGroupOperationMetad" + + "ata\022\032\n\rnode_group_id\030\001 \001(\tB\003\340A\003\022\031\n\014clust" + + "er_uuid\030\002 \001(\tB\003\340A\003\022E\n\006status\030\003 \001(\01320.goo" + + "gle.cloud.dataproc.v1.ClusterOperationSt" + + "atusB\003\340A\003\022M\n\016status_history\030\004 \003(\01320.goog" + + "le.cloud.dataproc.v1.ClusterOperationSta" + + "tusB\003\340A\003\022c\n\016operation_type\030\005 \001(\0162K.googl" + + "e.cloud.dataproc.v1.NodeGroupOperationMe" + + "tadata.NodeGroupOperationType\022\030\n\013descrip" + + "tion\030\006 \001(\tB\003\340A\003\022U\n\006labels\030\007 \003(\0132@.google" + + ".cloud.dataproc.v1.NodeGroupOperationMet" + + "adata.LabelsEntryB\003\340A\003\022\025\n\010warnings\030\010 \003(\t" + + "B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"s\n\026NodeGroupOperationType\022)" + + "\n%NODE_GROUP_OPERATION_TYPE_UNSPECIFIED\020" + + "\000\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003\022\n\n" + + "\006RESIZE\020\004Bs\n\034com.google.cloud.dataproc.v" + + "1B\017OperationsProtoP\001Z@google.golang.org/" + + "genproto/googleapis/cloud/dataproc/v1;da" + + "taprocb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -159,6 +183,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_descriptor, + new java.lang.String[] { + "NodeGroupId", + "ClusterUuid", + "Status", + "StatusHistory", + "OperationType", + "Description", + "Labels", + "Warnings", + }); + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_LabelsEntry_descriptor = + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataproc_v1_NodeGroupOperationMetadata_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ResizeNodeGroupRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ResizeNodeGroupRequest.java new file mode 100644 index 000000000000..d646ca328974 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ResizeNodeGroupRequest.java @@ -0,0 +1,1385 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/node_groups.proto + +package com.google.cloud.dataproc.v1; + +/** + * + * + *
+ * A request to resize a node group.
+ * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.ResizeNodeGroupRequest} + */ +public final class ResizeNodeGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ResizeNodeGroupRequest) + ResizeNodeGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResizeNodeGroupRequest.newBuilder() to construct. + private ResizeNodeGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResizeNodeGroupRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResizeNodeGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.class, + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the node group to resize.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the node group to resize.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 2; + private int size_; + /** + * + * + *
+   * Required. The number of running instances for the node group to maintain.
+   * The group adds or removes instances to maintain the number of instances
+   * specified by this parameter.
+   * 
+ * + * int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER = 4; + private com.google.protobuf.Duration gracefulDecommissionTimeout_; + /** + * + * + *
+   * Optional. Timeout for graceful YARN decommissioning. [Graceful
+   * decommissioning]
+   * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+   * allows the removal of nodes from the Compute Engine node group
+   * without interrupting jobs in progress. This timeout specifies how long to
+   * wait for jobs in progress to finish before forcefully removing nodes (and
+   * potentially interrupting jobs). Default timeout is 0 (for forceful
+   * decommission), and the maximum allowed timeout is 1 day. (see JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+   * Only supported on Dataproc image versions 1.2 and higher.
+   * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gracefulDecommissionTimeout field is set. + */ + @java.lang.Override + public boolean hasGracefulDecommissionTimeout() { + return gracefulDecommissionTimeout_ != null; + } + /** + * + * + *
+   * Optional. Timeout for graceful YARN decommissioning. [Graceful
+   * decommissioning]
+   * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+   * allows the removal of nodes from the Compute Engine node group
+   * without interrupting jobs in progress. This timeout specifies how long to
+   * wait for jobs in progress to finish before forcefully removing nodes (and
+   * potentially interrupting jobs). Default timeout is 0 (for forceful
+   * decommission), and the maximum allowed timeout is 1 day. (see JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+   * Only supported on Dataproc image versions 1.2 and higher.
+   * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gracefulDecommissionTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getGracefulDecommissionTimeout() { + return gracefulDecommissionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : gracefulDecommissionTimeout_; + } + /** + * + * + *
+   * Optional. Timeout for graceful YARN decommissioning. [Graceful
+   * decommissioning]
+   * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+   * allows the removal of nodes from the Compute Engine node group
+   * without interrupting jobs in progress. This timeout specifies how long to
+   * wait for jobs in progress to finish before forcefully removing nodes (and
+   * potentially interrupting jobs). Default timeout is 0 (for forceful
+   * decommission), and the maximum allowed timeout is 1 day. (see JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+   * Only supported on Dataproc image versions 1.2 and higher.
+   * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder() { + return getGracefulDecommissionTimeout(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (size_ != 0) { + output.writeInt32(2, size_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (gracefulDecommissionTimeout_ != null) { + output.writeMessage(4, getGracefulDecommissionTimeout()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (size_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, size_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (gracefulDecommissionTimeout_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getGracefulDecommissionTimeout()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataproc.v1.ResizeNodeGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest other = + (com.google.cloud.dataproc.v1.ResizeNodeGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getSize() != other.getSize()) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (hasGracefulDecommissionTimeout() != other.hasGracefulDecommissionTimeout()) return false; + if (hasGracefulDecommissionTimeout()) { + if (!getGracefulDecommissionTimeout().equals(other.getGracefulDecommissionTimeout())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + getSize(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + if (hasGracefulDecommissionTimeout()) { + hash = (37 * hash) + GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getGracefulDecommissionTimeout().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dataproc.v1.ResizeNodeGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to resize a node group.
+   * 
+ * + * Protobuf type {@code google.cloud.dataproc.v1.ResizeNodeGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ResizeNodeGroupRequest) + com.google.cloud.dataproc.v1.ResizeNodeGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.class, + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + size_ = 0; + + requestId_ = ""; + + if (gracefulDecommissionTimeoutBuilder_ == null) { + gracefulDecommissionTimeout_ = null; + } else { + gracefulDecommissionTimeout_ = null; + gracefulDecommissionTimeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataproc.v1.NodeGroupsProto + .internal_static_google_cloud_dataproc_v1_ResizeNodeGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.ResizeNodeGroupRequest getDefaultInstanceForType() { + return com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.ResizeNodeGroupRequest build() { + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.ResizeNodeGroupRequest buildPartial() { + com.google.cloud.dataproc.v1.ResizeNodeGroupRequest result = + new com.google.cloud.dataproc.v1.ResizeNodeGroupRequest(this); + result.name_ = name_; + result.size_ = size_; + result.requestId_ = requestId_; + if (gracefulDecommissionTimeoutBuilder_ == null) { + result.gracefulDecommissionTimeout_ = gracefulDecommissionTimeout_; + } else { + result.gracefulDecommissionTimeout_ = gracefulDecommissionTimeoutBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataproc.v1.ResizeNodeGroupRequest) { + return mergeFrom((com.google.cloud.dataproc.v1.ResizeNodeGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataproc.v1.ResizeNodeGroupRequest other) { + if (other == com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getSize() != 0) { + setSize(other.getSize()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.hasGracefulDecommissionTimeout()) { + mergeGracefulDecommissionTimeout(other.getGracefulDecommissionTimeout()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + size_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage( + getGracefulDecommissionTimeoutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the node group to resize.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the node group to resize.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the node group to resize.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the node group to resize.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the node group to resize.
+     * Format:
+     * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int size_; + /** + * + * + *
+     * Required. The number of running instances for the node group to maintain.
+     * The group adds or removes instances to maintain the number of instances
+     * specified by this parameter.
+     * 
+ * + * int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + /** + * + * + *
+     * Required. The number of running instances for the node group to maintain.
+     * The group adds or removes instances to maintain the number of instances
+     * specified by this parameter.
+     * 
+ * + * int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(int value) { + + size_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The number of running instances for the node group to maintain.
+     * The group adds or removes instances to maintain the number of instances
+     * specified by this parameter.
+     * 
+ * + * int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A unique ID used to identify the request. If the server receives
+     * two
+     * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+     * with the same ID, the second request is ignored and the
+     * first [google.longrunning.Operation][google.longrunning.Operation] created
+     * and stored in the backend is returned.
+     * Recommendation: Set this value to a
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+     * underscores (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration gracefulDecommissionTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + gracefulDecommissionTimeoutBuilder_; + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gracefulDecommissionTimeout field is set. + */ + public boolean hasGracefulDecommissionTimeout() { + return gracefulDecommissionTimeoutBuilder_ != null || gracefulDecommissionTimeout_ != null; + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gracefulDecommissionTimeout. + */ + public com.google.protobuf.Duration getGracefulDecommissionTimeout() { + if (gracefulDecommissionTimeoutBuilder_ == null) { + return gracefulDecommissionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : gracefulDecommissionTimeout_; + } else { + return gracefulDecommissionTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGracefulDecommissionTimeout(com.google.protobuf.Duration value) { + if (gracefulDecommissionTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gracefulDecommissionTimeout_ = value; + onChanged(); + } else { + gracefulDecommissionTimeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGracefulDecommissionTimeout( + com.google.protobuf.Duration.Builder builderForValue) { + if (gracefulDecommissionTimeoutBuilder_ == null) { + gracefulDecommissionTimeout_ = builderForValue.build(); + onChanged(); + } else { + gracefulDecommissionTimeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGracefulDecommissionTimeout(com.google.protobuf.Duration value) { + if (gracefulDecommissionTimeoutBuilder_ == null) { + if (gracefulDecommissionTimeout_ != null) { + gracefulDecommissionTimeout_ = + com.google.protobuf.Duration.newBuilder(gracefulDecommissionTimeout_) + .mergeFrom(value) + .buildPartial(); + } else { + gracefulDecommissionTimeout_ = value; + } + onChanged(); + } else { + gracefulDecommissionTimeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGracefulDecommissionTimeout() { + if (gracefulDecommissionTimeoutBuilder_ == null) { + gracefulDecommissionTimeout_ = null; + onChanged(); + } else { + gracefulDecommissionTimeout_ = null; + gracefulDecommissionTimeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getGracefulDecommissionTimeoutBuilder() { + + onChanged(); + return getGracefulDecommissionTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder() { + if (gracefulDecommissionTimeoutBuilder_ != null) { + return gracefulDecommissionTimeoutBuilder_.getMessageOrBuilder(); + } else { + return gracefulDecommissionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : gracefulDecommissionTimeout_; + } + } + /** + * + * + *
+     * Optional. Timeout for graceful YARN decommissioning. [Graceful
+     * decommissioning]
+     * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+     * allows the removal of nodes from the Compute Engine node group
+     * without interrupting jobs in progress. This timeout specifies how long to
+     * wait for jobs in progress to finish before forcefully removing nodes (and
+     * potentially interrupting jobs). Default timeout is 0 (for forceful
+     * decommission), and the maximum allowed timeout is 1 day. (see JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+     * Only supported on Dataproc image versions 1.2 and higher.
+     * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getGracefulDecommissionTimeoutFieldBuilder() { + if (gracefulDecommissionTimeoutBuilder_ == null) { + gracefulDecommissionTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getGracefulDecommissionTimeout(), getParentForChildren(), isClean()); + gracefulDecommissionTimeout_ = null; + } + return gracefulDecommissionTimeoutBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.ResizeNodeGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ResizeNodeGroupRequest) + private static final com.google.cloud.dataproc.v1.ResizeNodeGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ResizeNodeGroupRequest(); + } + + public static com.google.cloud.dataproc.v1.ResizeNodeGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResizeNodeGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dataproc.v1.ResizeNodeGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ResizeNodeGroupRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ResizeNodeGroupRequestOrBuilder.java new file mode 100644 index 000000000000..2509d054b4c4 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ResizeNodeGroupRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dataproc/v1/node_groups.proto + +package com.google.cloud.dataproc.v1; + +public interface ResizeNodeGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ResizeNodeGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the node group to resize.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the node group to resize.
+   * Format:
+   * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The number of running instances for the node group to maintain.
+   * The group adds or removes instances to maintain the number of instances
+   * specified by this parameter.
+   * 
+ * + * int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The size. + */ + int getSize(); + + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A unique ID used to identify the request. If the server receives
+   * two
+   * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
+   * with the same ID, the second request is ignored and the
+   * first [google.longrunning.Operation][google.longrunning.Operation] created
+   * and stored in the backend is returned.
+   * Recommendation: Set this value to a
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
+   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
+   * underscores (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. Timeout for graceful YARN decommissioning. [Graceful
+   * decommissioning]
+   * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+   * allows the removal of nodes from the Compute Engine node group
+   * without interrupting jobs in progress. This timeout specifies how long to
+   * wait for jobs in progress to finish before forcefully removing nodes (and
+   * potentially interrupting jobs). Default timeout is 0 (for forceful
+   * decommission), and the maximum allowed timeout is 1 day. (see JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+   * Only supported on Dataproc image versions 1.2 and higher.
+   * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gracefulDecommissionTimeout field is set. + */ + boolean hasGracefulDecommissionTimeout(); + /** + * + * + *
+   * Optional. Timeout for graceful YARN decommissioning. [Graceful
+   * decommissioning]
+   * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+   * allows the removal of nodes from the Compute Engine node group
+   * without interrupting jobs in progress. This timeout specifies how long to
+   * wait for jobs in progress to finish before forcefully removing nodes (and
+   * potentially interrupting jobs). Default timeout is 0 (for forceful
+   * decommission), and the maximum allowed timeout is 1 day. (see JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+   * Only supported on Dataproc image versions 1.2 and higher.
+   * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gracefulDecommissionTimeout. + */ + com.google.protobuf.Duration getGracefulDecommissionTimeout(); + /** + * + * + *
+   * Optional. Timeout for graceful YARN decommissioning. [Graceful
+   * decommissioning]
+   * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
+   * allows the removal of nodes from the Compute Engine node group
+   * without interrupting jobs in progress. This timeout specifies how long to
+   * wait for jobs in progress to finish before forcefully removing nodes (and
+   * potentially interrupting jobs). Default timeout is 0 (for forceful
+   * decommission), and the maximum allowed timeout is 1 day. (see JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
+   * Only supported on Dataproc image versions 1.2 and higher.
+   * 
+ * + * + * .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder(); +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java index 1fda8ba56714..34af05d6d360 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java @@ -22,7 +22,7 @@ * * *
- * A Dataproc job for running [Apache Spark](http://spark.apache.org/)
+ * A Dataproc job for running [Apache Spark](https://spark.apache.org/)
  * applications on YARN.
  * 
* @@ -991,7 +991,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A Dataproc job for running [Apache Spark](http://spark.apache.org/)
+   * A Dataproc job for running [Apache Spark](https://spark.apache.org/)
    * applications on YARN.
    * 
* diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java index 4946523c306e..7b4e8c18f443 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java @@ -23,7 +23,7 @@ * *
  * A Dataproc job for running [Apache Spark
- * SQL](http://spark.apache.org/sql/) queries.
+ * SQL](https://spark.apache.org/sql/) queries.
  * 
* * Protobuf type {@code google.cloud.dataproc.v1.SparkSqlJob} @@ -839,7 +839,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A Dataproc job for running [Apache Spark
-   * SQL](http://spark.apache.org/sql/) queries.
+   * SQL](https://spark.apache.org/sql/) queries.
    * 
* * Protobuf type {@code google.cloud.dataproc.v1.SparkSqlJob} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java index bce3949828bd..8fad0e81c12a 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java @@ -281,8 +281,8 @@ public com.google.protobuf.ByteString getClusterUuidBytes() { * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -313,8 +313,8 @@ public java.lang.String getRequestId() { * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1199,8 +1199,8 @@ public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1230,8 +1230,8 @@ public java.lang.String getRequestId() { * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1261,8 +1261,8 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1291,8 +1291,8 @@ public Builder setRequestId(java.lang.String value) { * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1317,8 +1317,8 @@ public Builder clearRequestId() { * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java index 9a483467e5fd..11582245a54e 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java @@ -135,8 +135,8 @@ public interface StartClusterRequestOrBuilder * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -156,8 +156,8 @@ public interface StartClusterRequestOrBuilder * receives two * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java index 306a1a810e40..916ecc60aefa 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java @@ -281,8 +281,8 @@ public com.google.protobuf.ByteString getClusterUuidBytes() { * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -313,8 +313,8 @@ public java.lang.String getRequestId() { * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1199,8 +1199,8 @@ public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1230,8 +1230,8 @@ public java.lang.String getRequestId() { * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1261,8 +1261,8 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1291,8 +1291,8 @@ public Builder setRequestId(java.lang.String value) { * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -1317,8 +1317,8 @@ public Builder clearRequestId() { * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java index 8b9a12970aef..ec9a1c19d7f0 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java @@ -135,8 +135,8 @@ public interface StopClusterRequestOrBuilder * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -156,8 +156,8 @@ public interface StopClusterRequestOrBuilder * receives two * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * Recommendation: Set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java index ac73fe75a626..b49efd6ab0eb 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java @@ -543,8 +543,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -575,8 +575,8 @@ public java.lang.String getRequestId() { * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -2519,8 +2519,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -2550,8 +2550,8 @@ public java.lang.String getRequestId() { * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -2581,8 +2581,8 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -2611,8 +2611,8 @@ public Builder setRequestId(java.lang.String value) { * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -2637,8 +2637,8 @@ public Builder clearRequestId() { * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java index fb1ecbc5f5be..d3ae4455e35e 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java @@ -387,8 +387,8 @@ public interface UpdateClusterRequestOrBuilder * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), @@ -408,8 +408,8 @@ public interface UpdateClusterRequestOrBuilder * receives two * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - * backend is returned. + * first [google.longrunning.Operation][google.longrunning.Operation] created + * and stored in the backend is returned. * It is recommended to always set this value to a * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). * The ID must contain only letters (a-z, A-Z), numbers (0-9), diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfig.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfig.java index f6dfead332fc..f2b6bfdc03c9 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfig.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfig.java @@ -22,9 +22,9 @@ * * *
- * Dataproc cluster config for a cluster that does not directly control the
+ * The Dataproc cluster config for a cluster that does not directly control the
  * underlying compute resources, such as a [Dataproc-on-GKE
- * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
+ * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
  * 
* * Protobuf type {@code google.cloud.dataproc.v1.VirtualClusterConfig} @@ -119,7 +119,7 @@ public InfrastructureConfigCase getInfrastructureConfigCase() { * * *
-   * Optional. A Storage bucket used to stage job
+   * Optional. A Cloud Storage bucket used to stage job
    * dependencies, config files, and job driver console output.
    * If you do not specify a staging bucket, Cloud
    * Dataproc will determine a Cloud Storage location (US,
@@ -152,7 +152,7 @@ public java.lang.String getStagingBucket() {
    *
    *
    * 
-   * Optional. A Storage bucket used to stage job
+   * Optional. A Cloud Storage bucket used to stage job
    * dependencies, config files, and job driver console output.
    * If you do not specify a staging bucket, Cloud
    * Dataproc will determine a Cloud Storage location (US,
@@ -187,7 +187,8 @@ public com.google.protobuf.ByteString getStagingBucketBytes() {
    *
    *
    * 
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
+   * Required. The configuration for running the Dataproc cluster on
+   * Kubernetes.
    * 
* * @@ -204,7 +205,8 @@ public boolean hasKubernetesClusterConfig() { * * *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
+   * Required. The configuration for running the Dataproc cluster on
+   * Kubernetes.
    * 
* * @@ -224,7 +226,8 @@ public com.google.cloud.dataproc.v1.KubernetesClusterConfig getKubernetesCluster * * *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
+   * Required. The configuration for running the Dataproc cluster on
+   * Kubernetes.
    * 
* * @@ -498,9 +501,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Dataproc cluster config for a cluster that does not directly control the
+   * The Dataproc cluster config for a cluster that does not directly control the
    * underlying compute resources, such as a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
+   * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke).
    * 
* * Protobuf type {@code google.cloud.dataproc.v1.VirtualClusterConfig} @@ -738,7 +741,7 @@ public Builder clearInfrastructureConfig() { * * *
-     * Optional. A Storage bucket used to stage job
+     * Optional. A Cloud Storage bucket used to stage job
      * dependencies, config files, and job driver console output.
      * If you do not specify a staging bucket, Cloud
      * Dataproc will determine a Cloud Storage location (US,
@@ -770,7 +773,7 @@ public java.lang.String getStagingBucket() {
      *
      *
      * 
-     * Optional. A Storage bucket used to stage job
+     * Optional. A Cloud Storage bucket used to stage job
      * dependencies, config files, and job driver console output.
      * If you do not specify a staging bucket, Cloud
      * Dataproc will determine a Cloud Storage location (US,
@@ -802,7 +805,7 @@ public com.google.protobuf.ByteString getStagingBucketBytes() {
      *
      *
      * 
-     * Optional. A Storage bucket used to stage job
+     * Optional. A Cloud Storage bucket used to stage job
      * dependencies, config files, and job driver console output.
      * If you do not specify a staging bucket, Cloud
      * Dataproc will determine a Cloud Storage location (US,
@@ -833,7 +836,7 @@ public Builder setStagingBucket(java.lang.String value) {
      *
      *
      * 
-     * Optional. A Storage bucket used to stage job
+     * Optional. A Cloud Storage bucket used to stage job
      * dependencies, config files, and job driver console output.
      * If you do not specify a staging bucket, Cloud
      * Dataproc will determine a Cloud Storage location (US,
@@ -860,7 +863,7 @@ public Builder clearStagingBucket() {
      *
      *
      * 
-     * Optional. A Storage bucket used to stage job
+     * Optional. A Cloud Storage bucket used to stage job
      * dependencies, config files, and job driver console output.
      * If you do not specify a staging bucket, Cloud
      * Dataproc will determine a Cloud Storage location (US,
@@ -898,7 +901,8 @@ public Builder setStagingBucketBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -915,7 +919,8 @@ public boolean hasKubernetesClusterConfig() { * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -942,7 +947,8 @@ public com.google.cloud.dataproc.v1.KubernetesClusterConfig getKubernetesCluster * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -967,7 +973,8 @@ public Builder setKubernetesClusterConfig( * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -989,7 +996,8 @@ public Builder setKubernetesClusterConfig( * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -1025,7 +1033,8 @@ public Builder mergeKubernetesClusterConfig( * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -1052,7 +1061,8 @@ public Builder clearKubernetesClusterConfig() { * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -1067,7 +1077,8 @@ public Builder clearKubernetesClusterConfig() { * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * @@ -1090,7 +1101,8 @@ public Builder clearKubernetesClusterConfig() { * * *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
+     * Required. The configuration for running the Dataproc cluster on
+     * Kubernetes.
      * 
* * diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfigOrBuilder.java b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfigOrBuilder.java index 83736cd245d7..10fd29f6c8d8 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfigOrBuilder.java +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfigOrBuilder.java @@ -27,7 +27,7 @@ public interface VirtualClusterConfigOrBuilder * * *
-   * Optional. A Storage bucket used to stage job
+   * Optional. A Cloud Storage bucket used to stage job
    * dependencies, config files, and job driver console output.
    * If you do not specify a staging bucket, Cloud
    * Dataproc will determine a Cloud Storage location (US,
@@ -49,7 +49,7 @@ public interface VirtualClusterConfigOrBuilder
    *
    *
    * 
-   * Optional. A Storage bucket used to stage job
+   * Optional. A Cloud Storage bucket used to stage job
    * dependencies, config files, and job driver console output.
    * If you do not specify a staging bucket, Cloud
    * Dataproc will determine a Cloud Storage location (US,
@@ -72,7 +72,8 @@ public interface VirtualClusterConfigOrBuilder
    *
    *
    * 
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
+   * Required. The configuration for running the Dataproc cluster on
+   * Kubernetes.
    * 
* * @@ -86,7 +87,8 @@ public interface VirtualClusterConfigOrBuilder * * *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
+   * Required. The configuration for running the Dataproc cluster on
+   * Kubernetes.
    * 
* * @@ -100,7 +102,8 @@ public interface VirtualClusterConfigOrBuilder * * *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
+   * Required. The configuration for running the Dataproc cluster on
+   * Kubernetes.
    * 
* * diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto index 9550278b9996..11611fbf680f 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto @@ -43,12 +43,14 @@ option (google.api.resource_definition) = { // of Compute Engine instances. service ClusterController { option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates a cluster in a project. The returned // [Operation.metadata][google.longrunning.Operation.metadata] will be // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { + rpc CreateCluster(CreateClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/clusters" body: "cluster" @@ -63,14 +65,17 @@ service ClusterController { // Updates a cluster in a project. The returned // [Operation.metadata][google.longrunning.Operation.metadata] will be // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - // The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error + // The cluster must be in a + // [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error // is returned. - rpc UpdateCluster(UpdateClusterRequest) returns (google.longrunning.Operation) { + rpc UpdateCluster(UpdateClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" body: "cluster" }; - option (google.api.method_signature) = "project_id,region,cluster_name,cluster,update_mask"; + option (google.api.method_signature) = + "project_id,region,cluster_name,cluster,update_mask"; option (google.longrunning.operation_info) = { response_type: "Cluster" metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" @@ -104,7 +109,8 @@ service ClusterController { // Deletes a cluster in a project. The returned // [Operation.metadata][google.longrunning.Operation.metadata] will be // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) { + rpc DeleteCluster(DeleteClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" }; @@ -139,7 +145,8 @@ service ClusterController { // [Operation.response][google.longrunning.Operation.response] // contains // [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - rpc DiagnoseCluster(DiagnoseClusterRequest) returns (google.longrunning.Operation) { + rpc DiagnoseCluster(DiagnoseClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose" body: "*" @@ -158,8 +165,10 @@ message Cluster { // Required. The Google Cloud Platform project ID that the cluster belongs to. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The cluster name. Cluster names within a project must be - // unique. Names of deleted clusters can be reused. + // Required. The cluster name, which must be unique within a project. + // The name must start with a lowercase letter, and can contain + // up to 51 lowercase letters, numbers, and hyphens. It cannot end + // with a hyphen. The name of a deleted cluster can be reused. string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. The cluster config for a cluster of Compute Engine Instances. @@ -167,14 +176,17 @@ message Cluster { // when clusters are updated. ClusterConfig config = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The virtual cluster config, used when creating a Dataproc cluster that - // does not directly control the underlying compute resources, for example, - // when creating a [Dataproc-on-GKE - // cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster). - // Note that Dataproc may set default values, and values may change when - // clusters are updated. Exactly one of config or virtualClusterConfig must be - // specified. - VirtualClusterConfig virtual_cluster_config = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The virtual cluster config is used when creating a Dataproc + // cluster that does not directly control the underlying compute resources, + // for example, when creating a [Dataproc-on-GKE + // cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke). + // Dataproc may set default values, and values may change when + // clusters are updated. Exactly one of + // [config][google.cloud.dataproc.v1.Cluster.config] or + // [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] + // must be specified. + VirtualClusterConfig virtual_cluster_config = 10 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The labels to associate with this cluster. // Label **keys** must contain 1 to 63 characters, and must conform to @@ -189,7 +201,8 @@ message Cluster { ClusterStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous cluster status. - repeated ClusterStatus status_history = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ClusterStatus status_history = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A cluster UUID (Unique Universal Identifier). Dataproc // generates this value when it creates the cluster. @@ -217,15 +230,13 @@ message ClusterConfig { // a Cloud Storage bucket.** string config_bucket = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data, - // such as Spark and MapReduce history files. - // If you do not specify a temp bucket, - // Dataproc will determine a Cloud Storage location (US, - // ASIA, or EU) for your cluster's temp bucket according to the - // Compute Engine zone where your cluster is deployed, and then create - // and manage this project-level, per-location bucket. The default bucket has - // a TTL of 90 days, but you can use any TTL (or none) if you specify a - // bucket (see + // Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs + // data, such as Spark and MapReduce history files. If you do not specify a + // temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or + // EU) for your cluster's temp bucket according to the Compute Engine zone + // where your cluster is deployed, and then create and manage this + // project-level, per-location bucket. The default bucket has a TTL of 90 + // days, but you can use any TTL (or none) if you specify a bucket (see // [Dataproc staging and temp // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to @@ -234,19 +245,23 @@ message ClusterConfig { // Optional. The shared Compute Engine config settings for // all instances in a cluster. - GceClusterConfig gce_cluster_config = 8 [(google.api.field_behavior) = OPTIONAL]; + GceClusterConfig gce_cluster_config = 8 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // the cluster's master instance. - InstanceGroupConfig master_config = 9 [(google.api.field_behavior) = OPTIONAL]; + InstanceGroupConfig master_config = 9 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // the cluster's worker instances. - InstanceGroupConfig worker_config = 10 [(google.api.field_behavior) = OPTIONAL]; + InstanceGroupConfig worker_config = 10 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine config settings for // a cluster's secondary worker instances - InstanceGroupConfig secondary_worker_config = 12 [(google.api.field_behavior) = OPTIONAL]; + InstanceGroupConfig secondary_worker_config = 12 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The config settings for cluster software. SoftwareConfig software_config = 13 [(google.api.field_behavior) = OPTIONAL]; @@ -264,36 +279,46 @@ message ClusterConfig { // else // ... worker specific actions ... // fi - repeated NodeInitializationAction initialization_actions = 11 [(google.api.field_behavior) = OPTIONAL]; + repeated NodeInitializationAction initialization_actions = 11 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Encryption settings for the cluster. - EncryptionConfig encryption_config = 15 [(google.api.field_behavior) = OPTIONAL]; + EncryptionConfig encryption_config = 15 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Autoscaling config for the policy associated with the cluster. // Cluster does not autoscale if this field is unset. - AutoscalingConfig autoscaling_config = 18 [(google.api.field_behavior) = OPTIONAL]; + AutoscalingConfig autoscaling_config = 18 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Security settings for the cluster. SecurityConfig security_config = 16 [(google.api.field_behavior) = OPTIONAL]; // Optional. Lifecycle setting for the cluster. - LifecycleConfig lifecycle_config = 17 [(google.api.field_behavior) = OPTIONAL]; + LifecycleConfig lifecycle_config = 17 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Port/endpoint configuration for this cluster EndpointConfig endpoint_config = 19 [(google.api.field_behavior) = OPTIONAL]; // Optional. Metastore configuration. - MetastoreConfig metastore_config = 20 [(google.api.field_behavior) = OPTIONAL]; + MetastoreConfig metastore_config = 20 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The config for Dataproc metrics. - DataprocMetricConfig dataproc_metric_config = 23 [(google.api.field_behavior) = OPTIONAL]; + DataprocMetricConfig dataproc_metric_config = 23 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The node group settings. + repeated AuxiliaryNodeGroup auxiliary_node_groups = 25 + [(google.api.field_behavior) = OPTIONAL]; } -// Dataproc cluster config for a cluster that does not directly control the +// The Dataproc cluster config for a cluster that does not directly control the // underlying compute resources, such as a [Dataproc-on-GKE -// cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster). +// cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke). message VirtualClusterConfig { - // Optional. A Storage bucket used to stage job + // Optional. A Cloud Storage bucket used to stage job // dependencies, config files, and job driver console output. // If you do not specify a staging bucket, Cloud // Dataproc will determine a Cloud Storage location (US, @@ -307,12 +332,15 @@ message VirtualClusterConfig { string staging_bucket = 1 [(google.api.field_behavior) = OPTIONAL]; oneof infrastructure_config { - // Required. The configuration for running the Dataproc cluster on Kubernetes. - KubernetesClusterConfig kubernetes_cluster_config = 6 [(google.api.field_behavior) = REQUIRED]; + // Required. The configuration for running the Dataproc cluster on + // Kubernetes. + KubernetesClusterConfig kubernetes_cluster_config = 6 + [(google.api.field_behavior) = REQUIRED]; } // Optional. Configuration of auxiliary services used by this cluster. - AuxiliaryServicesConfig auxiliary_services_config = 7 [(google.api.field_behavior) = OPTIONAL]; + AuxiliaryServicesConfig auxiliary_services_config = 7 + [(google.api.field_behavior) = OPTIONAL]; } // Auxiliary services configuration for a Cluster. @@ -321,14 +349,16 @@ message AuxiliaryServicesConfig { MetastoreConfig metastore_config = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Spark History Server configuration for the workload. - SparkHistoryServerConfig spark_history_server_config = 2 [(google.api.field_behavior) = OPTIONAL]; + SparkHistoryServerConfig spark_history_server_config = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Endpoint config for this cluster message EndpointConfig { // Output only. The map of port descriptions to URLs. Will only be populated // if enable_http_port_access is true. - map http_ports = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + map http_ports = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. If true, enable http access to specific ports on the cluster // from external sources. Defaults to false. @@ -366,7 +396,8 @@ message GceClusterConfig { // fields](https://cloud.google.com/compute/docs/reference/rest/v1/instances). enum PrivateIpv6GoogleAccess { // If unspecified, Compute Engine default behavior will apply, which - // is the same as [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK]. + // is the same as + // [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK]. PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; // Private access to and from Google Services configuration @@ -429,7 +460,8 @@ message GceClusterConfig { bool internal_ip_only = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The type of IPv6 access for a cluster. - PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(google.api.field_behavior) = OPTIONAL]; + PrivateIpv6GoogleAccess private_ipv6_google_access = 12 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The [Dataproc service // account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) @@ -458,7 +490,8 @@ message GceClusterConfig { // * https://www.googleapis.com/auth/bigtable.admin.table // * https://www.googleapis.com/auth/bigtable.data // * https://www.googleapis.com/auth/devstorage.full_control - repeated string service_account_scopes = 3 [(google.api.field_behavior) = OPTIONAL]; + repeated string service_account_scopes = 3 + [(google.api.field_behavior) = OPTIONAL]; // The Compute Engine tags to add to all instances (see [Tagging // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). @@ -470,21 +503,28 @@ message GceClusterConfig { map metadata = 5; // Optional. Reservation Affinity for consuming Zonal reservation. - ReservationAffinity reservation_affinity = 11 [(google.api.field_behavior) = OPTIONAL]; + ReservationAffinity reservation_affinity = 11 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Node Group Affinity for sole-tenant clusters. - NodeGroupAffinity node_group_affinity = 13 [(google.api.field_behavior) = OPTIONAL]; + NodeGroupAffinity node_group_affinity = 13 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. Shielded Instance Config for clusters using [Compute Engine Shielded + // Optional. Shielded Instance Config for clusters using [Compute Engine + // Shielded // VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). - ShieldedInstanceConfig shielded_instance_config = 14 [(google.api.field_behavior) = OPTIONAL]; + ShieldedInstanceConfig shielded_instance_config = 14 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Confidential Instance Config for clusters using [Confidential // VMs](https://cloud.google.com/compute/confidential-vm/docs). - ConfidentialInstanceConfig confidential_instance_config = 15 [(google.api.field_behavior) = OPTIONAL]; + ConfidentialInstanceConfig confidential_instance_config = 15 + [(google.api.field_behavior) = OPTIONAL]; } // Node Group Affinity for clusters using sole-tenant node groups. +// **The Dataproc `NodeGroupAffinity` resource is not related to the +// Dataproc [NodeGroup][google.cloud.dataproc.v1.NodeGroup] resource.** message NodeGroupAffinity { // Required. The URI of a // sole-tenant [node group @@ -515,17 +555,15 @@ message ShieldedInstanceConfig { // Confidential Instance Config for clusters using [Confidential // VMs](https://cloud.google.com/compute/confidential-vm/docs) message ConfidentialInstanceConfig { - // Optional. Defines whether the instance should have confidential compute enabled. + // Optional. Defines whether the instance should have confidential compute + // enabled. bool enable_confidential_compute = 1 [(google.api.field_behavior) = OPTIONAL]; } // The config settings for Compute Engine resources in // an instance group, such as a master or worker group. message InstanceGroupConfig { - // Controls the use of - // [preemptible instances] - // (https://cloud.google.com/compute/docs/instances/preemptible) - // within the group. + // Controls the use of preemptible instances within the group. enum Preemptibility { // Preemptibility is unspecified, the system will choose the // appropriate setting for each instance group. @@ -537,9 +575,12 @@ message InstanceGroupConfig { // value for Master and Worker instance groups. NON_PREEMPTIBLE = 1; - // Instances are preemptible. + // Instances are [preemptible] + // (https://cloud.google.com/compute/docs/instances/preemptible). // - // This option is allowed only for secondary worker groups. + // This option is allowed only for [secondary worker] + // (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms) + // groups. PREEMPTIBLE = 2; } @@ -553,7 +594,8 @@ message InstanceGroupConfig { // Output only. The list of instance names. Dataproc derives the names // from `cluster_name`, `num_instances`, and the instance group. - repeated string instance_names = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated string instance_names = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The Compute Engine image resource used for cluster instances. // @@ -609,11 +651,13 @@ message InstanceGroupConfig { // Output only. The config for Compute Engine Instance Group // Manager that manages this group. // This is only used for preemptible instance groups. - ManagedGroupConfig managed_group_config = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + ManagedGroupConfig managed_group_config = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The Compute Engine accelerator configuration for these // instances. - repeated AcceleratorConfig accelerators = 8 [(google.api.field_behavior) = OPTIONAL]; + repeated AcceleratorConfig accelerators = 8 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Specifies the minimum cpu platform for the Instance Group. // See [Dataproc -> Minimum CPU @@ -628,7 +672,8 @@ message ManagedGroupConfig { string instance_template_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the Instance Group Manager for this group. - string instance_group_manager_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + string instance_group_manager_name = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Specifies the type and number of accelerator cards attached to the instances @@ -669,7 +714,7 @@ message DiskConfig { // Optional. Size in GB of the boot disk (default is 500GB). int32 boot_disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Number of attached SSDs, from 0 to 4 (default is 0). + // Optional. Number of attached SSDs, from 0 to 8 (default is 0). // If SSDs are not attached, the boot disk is used to store runtime logs and // [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. // If one or more SSDs are attached, this runtime bulk @@ -685,6 +730,59 @@ message DiskConfig { string local_ssd_interface = 4 [(google.api.field_behavior) = OPTIONAL]; } +// Node group identification and configuration information. +message AuxiliaryNodeGroup { + // Required. Node group configuration. + NodeGroup node_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A node group ID. Generated if not specified. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), and hyphens (-). Cannot begin or end with underscore + // or hyphen. Must consist of from 3 to 33 characters. + string node_group_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Dataproc Node Group. +// **The Dataproc `NodeGroup` resource is not related to the +// Dataproc [NodeGroupAffinity][google.cloud.dataproc.v1.NodeGroupAffinity] +// resource.** +message NodeGroup { + option (google.api.resource) = { + type: "dataproc.googleapis.com/NodeGroup" + pattern: "projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}" + }; + + // Node group roles. + enum Role { + // Required unspecified role. + ROLE_UNSPECIFIED = 0; + + // Job drivers run on the node group. + DRIVER = 1; + } + + // The Node group [resource name](https://aip.dev/122). + string name = 1; + + // Required. Node group roles. + repeated Role roles = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The node group instance group configuration. + InstanceGroupConfig node_group_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Node group labels. + // + // * Label **keys** must consist of from 1 to 63 characters and conform to + // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + // * Label **values** can be empty. If specified, they must consist of from + // 1 to 63 characters and conform to [RFC 1035] + // (https://www.ietf.org/rfc/rfc1035.txt). + // * The node group must have no more than 32 labels. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; +} + // Specifies an executable to run on a fully configured node and a // timeout period for executable completion. message NodeInitializationAction { @@ -698,7 +796,8 @@ message NodeInitializationAction { // Cluster creation fails with an explanatory error message (the // name of the executable that caused the error and the exceeded timeout // period) if the executable is not completed at end of the timeout period. - google.protobuf.Duration execution_timeout = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration execution_timeout = 2 + [(google.api.field_behavior) = OPTIONAL]; } // The status of a cluster and its instances. @@ -771,7 +870,8 @@ message ClusterStatus { // Output only. Time when this state was entered (see JSON representation of // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp state_start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional state information that includes // status reported by the agent. @@ -790,13 +890,14 @@ message SecurityConfig { // Specifies Kerberos related configuration. message KerberosConfig { - // Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set - // this field to true to enable Kerberos on a cluster. + // Optional. Flag to indicate whether to Kerberize the cluster (default: + // false). Set this field to true to enable Kerberos on a cluster. bool enable_kerberos = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the root // principal password. - string root_principal_password_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + string root_principal_password_uri = 2 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The uri of the KMS key used to encrypt various sensitive // files. @@ -837,12 +938,14 @@ message KerberosConfig { // Optional. The admin server (IP or hostname) for the remote trusted realm in // a cross realm trust relationship. - string cross_realm_trust_admin_server = 11 [(google.api.field_behavior) = OPTIONAL]; + string cross_realm_trust_admin_server = 11 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the // shared password between the on-cluster Kerberos realm and the remote // trusted realm, in a cross realm trust relationship. - string cross_realm_trust_shared_password_uri = 12 [(google.api.field_behavior) = OPTIONAL]; + string cross_realm_trust_shared_password_uri = 12 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The Cloud Storage URI of a KMS encrypted file containing the // master key of the KDC database. @@ -862,7 +965,8 @@ message KerberosConfig { // secure multi-tenancy user mappings. message IdentityConfig { // Required. Map of user to service account. - map user_service_account_mapping = 1 [(google.api.field_behavior) = REQUIRED]; + map user_service_account_mapping = 1 + [(google.api.field_behavior) = REQUIRED]; } // Specifies the selection and config of software inside the cluster. @@ -897,7 +1001,8 @@ message SoftwareConfig { map properties = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The set of components to activate on the cluster. - repeated Component optional_components = 3 [(google.api.field_behavior) = OPTIONAL]; + repeated Component optional_components = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Specifies the cluster auto-delete schedule configuration. @@ -907,27 +1012,32 @@ message LifecycleConfig { // deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON // representation of // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Duration idle_delete_ttl = 1 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration idle_delete_ttl = 1 + [(google.api.field_behavior) = OPTIONAL]; // Either the exact time the cluster should be deleted at or // the cluster maximum age. oneof ttl { - // Optional. The time when cluster will be auto-deleted (see JSON representation of + // Optional. The time when cluster will be auto-deleted (see JSON + // representation of // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Timestamp auto_delete_time = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp auto_delete_time = 2 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The lifetime duration of cluster. The cluster will be // auto-deleted at the end of this period. Minimum value is 10 minutes; // maximum value is 14 days (see JSON representation of // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Duration auto_delete_ttl = 3 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration auto_delete_ttl = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Output only. The time when cluster became idle (most recent job finished) // and became eligible for deletion due to idleness (see JSON representation // of // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Timestamp idle_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp idle_start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Specifies a Metastore configuration. @@ -945,7 +1055,6 @@ message MetastoreConfig { ]; } - // Dataproc metric config. message DataprocMetricConfig { // A source for the collection of Dataproc OSS metrics (see [available OSS @@ -1014,7 +1123,8 @@ message DataprocMetricConfig { // sources is unaffected. For example, if both `SPARK` andd `YARN` metric // sources are enabled, and overrides are provided for Spark metrics only, // all default YARN metrics will be collected. - repeated string metric_overrides = 2 [(google.api.field_behavior) = OPTIONAL]; + repeated string metric_overrides = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Required. Metrics sources to enable. @@ -1045,11 +1155,12 @@ message CreateClusterRequest { // Required. The cluster to create. Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. A unique ID used to identify the request. If the server receives two + // Optional. A unique ID used to identify the request. If the server receives + // two // [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend - // is returned. + // first [google.longrunning.Operation][google.longrunning.Operation] created + // and stored in the backend is returned. // // It is recommended to always set this value to a // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). @@ -1059,7 +1170,8 @@ message CreateClusterRequest { string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Failure action when primary worker creation fails. - FailureAction action_on_failed_primary_workers = 5 [(google.api.field_behavior) = OPTIONAL]; + FailureAction action_on_failed_primary_workers = 5 + [(google.api.field_behavior) = OPTIONAL]; } // A request to update a cluster. @@ -1086,7 +1198,8 @@ message UpdateClusterRequest { // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). // // Only supported on Dataproc image versions 1.2 and higher. - google.protobuf.Duration graceful_decommission_timeout = 6 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration graceful_decommission_timeout = 6 + [(google.api.field_behavior) = OPTIONAL]; // Required. Specifies the path, relative to `Cluster`, of // the field to update. For example, to change the number of workers @@ -1139,14 +1252,15 @@ message UpdateClusterRequest { // // // - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; // Optional. A unique ID used to identify the request. If the server // receives two // [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. + // first [google.longrunning.Operation][google.longrunning.Operation] created + // and stored in the backend is returned. // // It is recommended to always set this value to a // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). @@ -1176,8 +1290,8 @@ message StopClusterRequest { // receives two // [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. + // first [google.longrunning.Operation][google.longrunning.Operation] created + // and stored in the backend is returned. // // Recommendation: Set this value to a // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). @@ -1207,8 +1321,8 @@ message StartClusterRequest { // receives two // [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. + // first [google.longrunning.Operation][google.longrunning.Operation] created + // and stored in the backend is returned. // // Recommendation: Set this value to a // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). @@ -1238,8 +1352,8 @@ message DeleteClusterRequest { // receives two // [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. + // first [google.longrunning.Operation][google.longrunning.Operation] created + // and stored in the backend is returned. // // It is recommended to always set this value to a // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto index 823a12cf8a82..e9dcf9cc6b80 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ option java_package = "com.google.cloud.dataproc.v1"; // The JobController provides methods to manage jobs. service JobController { option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Submits a job to a cluster. rpc SubmitJob(SubmitJobRequest) returns (Job) { @@ -44,7 +45,8 @@ service JobController { } // Submits job to a cluster. - rpc SubmitJobAsOperation(SubmitJobRequest) returns (google.longrunning.Operation) { + rpc SubmitJobAsOperation(SubmitJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/projects/{project_id}/regions/{region}/jobs:submitAsOperation" body: "*" @@ -198,7 +200,7 @@ message HadoopJob { LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; } -// A Dataproc job for running [Apache Spark](http://spark.apache.org/) +// A Dataproc job for running [Apache Spark](https://spark.apache.org/) // applications on YARN. message SparkJob { // Required. The specification of the main method to call to drive the job. @@ -323,7 +325,8 @@ message HiveJob { // Optional. Mapping of query variable names to values (equivalent to the // Hive command: `SET name="value";`). - map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; + map script_variables = 4 + [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names and values, used to configure Hive. // Properties that conflict with values set by the Dataproc API may be @@ -338,7 +341,7 @@ message HiveJob { } // A Dataproc job for running [Apache Spark -// SQL](http://spark.apache.org/sql/) queries. +// SQL](https://spark.apache.org/sql/) queries. message SparkSqlJob { // Required. The sequence of Spark SQL queries to execute, specified as // either an HCFS file URI or as a list of queries. @@ -352,7 +355,8 @@ message SparkSqlJob { // Optional. Mapping of query variable names to values (equivalent to the // Spark SQL command: SET `name="value";`). - map script_variables = 3 [(google.api.field_behavior) = OPTIONAL]; + map script_variables = 3 + [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure // Spark SQL's SparkConf. Properties that conflict with values set by the @@ -386,7 +390,8 @@ message PigJob { // Optional. Mapping of query variable names to values (equivalent to the Pig // command: `name=[value]`). - map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; + map script_variables = 4 + [(google.api.field_behavior) = OPTIONAL]; // Optional. A mapping of property names to values, used to configure Pig. // Properties that conflict with values set by the Dataproc API may be @@ -480,8 +485,10 @@ message JobPlacement { // the job is submitted. string cluster_uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Cluster labels to identify a cluster where the job will be submitted. - map cluster_labels = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Cluster labels to identify a cluster where the job will be + // submitted. + map cluster_labels = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Dataproc job status. @@ -560,7 +567,8 @@ message JobStatus { ]; // Output only. The time when this state was entered. - google.protobuf.Timestamp state_start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp state_start_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Additional state information, which includes // status reported by the agent. @@ -569,8 +577,8 @@ message JobStatus { // Encapsulates the full scoping used to reference a job. message JobReference { - // Optional. The ID of the Google Cloud Platform project that the job belongs to. If - // specified, must match the request project ID. + // Optional. The ID of the Google Cloud Platform project that the job belongs + // to. If specified, must match the request project ID. string project_id = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The job ID, which must be unique within the project. @@ -680,22 +688,26 @@ message Job { JobStatus status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous job status. - repeated JobStatus status_history = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated JobStatus status_history = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The collection of YARN applications spun up by this job. // // **Beta** Feature: This report is available for testing purposes only. It // may be changed before final release. - repeated YarnApplication yarn_applications = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated YarnApplication yarn_applications = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A URI pointing to the location of the stdout of the job's // driver program. - string driver_output_resource_uri = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + string driver_output_resource_uri = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If present, the location of miscellaneous control files // which may be used as part of job setup and handling. If not present, // control files may be placed in the same location as `driver_output_uri`. - string driver_control_files_uri = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + string driver_control_files_uri = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels to associate with this job. // Label **keys** must contain 1 to 63 characters, and must conform to @@ -714,11 +726,24 @@ message Job { // may be reused over time. string job_uuid = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Indicates whether the job is completed. If the value is `false`, - // the job is still in progress. If `true`, the job is completed, and + // Output only. Indicates whether the job is completed. If the value is + // `false`, the job is still in progress. If `true`, the job is completed, and // `status.state` field will indicate if it was successful, failed, // or cancelled. bool done = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Driver scheduling configuration. + DriverSchedulingConfig driver_scheduling_config = 27 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Driver scheduling configuration. +message DriverSchedulingConfig { + // Required. The amount of memory in MB the driver is requesting. + int32 memory_mb = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The number of vCPUs the driver is requesting. + int32 vcores = 2 [(google.api.field_behavior) = REQUIRED]; } // Job scheduling options. @@ -727,27 +752,26 @@ message JobScheduling { // a result of driver exiting with non-zero code before job is // reported failed. // - // A job may be reported as thrashing if driver exits with non-zero code - // 4 times within 10 minute window. + // A job may be reported as thrashing if the driver exits with a non-zero code + // four times within a 10-minute window. // // Maximum value is 10. // - // **Note:** Currently, this restartable job option is - // not supported in Dataproc - // [workflow - // template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - // jobs. + // **Note:** This restartable job option is not supported in Dataproc + // [workflow templates] + // (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). int32 max_failures_per_hour = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Maximum number of times in total a driver may be restarted as a result of - // driver exiting with non-zero code before job is reported failed. + // Optional. Maximum total number of times a driver may be restarted as a + // result of the driver exiting with a non-zero code. After the maximum number + // is reached, the job will be reported as failed. + // // Maximum value is 240. // // **Note:** Currently, this restartable job option is // not supported in Dataproc // [workflow - // template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - // jobs. + // templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). int32 max_failures_total = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -790,7 +814,8 @@ message JobMetadata { string operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Job submission time. - google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to get the resource representation for a job in a project. @@ -843,7 +868,8 @@ message ListJobsRequest { // (default = match ALL jobs). // // If `filter` is provided, `jobStateMatcher` will be ignored. - JobStateMatcher job_state_matcher = 5 [(google.api.field_behavior) = OPTIONAL]; + JobStateMatcher job_state_matcher = 5 + [(google.api.field_behavior) = OPTIONAL]; // Optional. A filter constraining the jobs to list. Filters are // case-sensitive and have the following syntax: @@ -883,7 +909,8 @@ message UpdateJobRequest { // labels, and the `PATCH` request body would specify the new // value. Note: Currently, labels is the only // field that can be updated. - google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 5 + [(google.api.field_behavior) = REQUIRED]; } // A list of jobs in a project. diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/node_groups.proto b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/node_groups.proto new file mode 100644 index 000000000000..0abc223820c3 --- /dev/null +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/node_groups.proto @@ -0,0 +1,174 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataproc.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataproc/v1/clusters.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; +option java_multiple_files = true; +option java_outer_classname = "NodeGroupsProto"; +option java_package = "com.google.cloud.dataproc.v1"; +option (google.api.resource_definition) = { + type: "dataproc.googleapis.com/ClusterRegion" + pattern: "projects/{project}/regions/{region}/clusters/{cluster}" +}; + +// The `NodeGroupControllerService` provides methods to manage node groups +// of Compute Engine managed instances. +service NodeGroupController { + option (google.api.default_host) = "dataproc.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a node group in a cluster. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] is + // [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + rpc CreateNodeGroup(CreateNodeGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/regions/*/clusters/*}/nodeGroups" + body: "node_group" + }; + option (google.api.method_signature) = "parent,node_group,node_group_id"; + option (google.longrunning.operation_info) = { + response_type: "NodeGroup" + metadata_type: "google.cloud.dataproc.v1.NodeGroupOperationMetadata" + }; + } + + // Resizes a node group in a cluster. The returned + // [Operation.metadata][google.longrunning.Operation.metadata] is + // [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). + rpc ResizeNodeGroup(ResizeNodeGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}:resize" + body: "*" + }; + option (google.api.method_signature) = "name,size"; + option (google.longrunning.operation_info) = { + response_type: "NodeGroup" + metadata_type: "google.cloud.dataproc.v1.NodeGroupOperationMetadata" + }; + } + + // Gets the resource representation for a node group in a + // cluster. + rpc GetNodeGroup(GetNodeGroupRequest) returns (NodeGroup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// A request to create a node group. +message CreateNodeGroupRequest { + // Required. The parent resource where this node group will be created. + // Format: `projects/{project}/regions/{region}/clusters/{cluster}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/NodeGroup" + } + ]; + + // Required. The node group to create. + NodeGroup node_group = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional node group ID. Generated if not specified. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), and hyphens (-). Cannot begin or end with underscore + // or hyphen. Must consist of from 3 to 33 characters. + string node_group_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A unique ID used to identify the request. If the server receives + // two + // [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) + // with the same ID, the second request is ignored and the + // first [google.longrunning.Operation][google.longrunning.Operation] created + // and stored in the backend is returned. + // + // Recommendation: Set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to resize a node group. +message ResizeNodeGroupRequest { + // Required. The name of the node group to resize. + // Format: + // `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The number of running instances for the node group to maintain. + // The group adds or removes instances to maintain the number of instances + // specified by this parameter. + int32 size = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A unique ID used to identify the request. If the server receives + // two + // [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) + // with the same ID, the second request is ignored and the + // first [google.longrunning.Operation][google.longrunning.Operation] created + // and stored in the backend is returned. + // + // Recommendation: Set this value to a + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Timeout for graceful YARN decommissioning. [Graceful + // decommissioning] + // (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) + // allows the removal of nodes from the Compute Engine node group + // without interrupting jobs in progress. This timeout specifies how long to + // wait for jobs in progress to finish before forcefully removing nodes (and + // potentially interrupting jobs). Default timeout is 0 (for forceful + // decommission), and the maximum allowed timeout is 1 day. (see JSON + // representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + // + // Only supported on Dataproc image versions 1.2 and higher. + google.protobuf.Duration graceful_decommission_timeout = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to get a node group . +message GetNodeGroupRequest { + // Required. The name of the node group to retrieve. + // Format: + // `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataproc.googleapis.com/NodeGroup" + } + ]; +} diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto index e12bd299a88c..854d9eda6ab6 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto +++ b/java-dataproc/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -87,7 +87,8 @@ message ClusterOperationStatus { string details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time this state was entered. - google.protobuf.Timestamp state_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp state_start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Metadata describing the operation. @@ -102,7 +103,8 @@ message ClusterOperationMetadata { ClusterOperationStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The previous operation status. - repeated ClusterOperationStatus status_history = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ClusterOperationStatus status_history = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The operation type. string operation_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -116,3 +118,49 @@ message ClusterOperationMetadata { // Output only. Errors encountered during operation execution. repeated string warnings = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Metadata describing the node group operation. +message NodeGroupOperationMetadata { + // Operation type for node group resources. + enum NodeGroupOperationType { + // Node group operation type is unknown. + NODE_GROUP_OPERATION_TYPE_UNSPECIFIED = 0; + + // Create node group operation type. + CREATE = 1; + + // Update node group operation type. + UPDATE = 2; + + // Delete node group operation type. + DELETE = 3; + + // Resize node group operation type. + RESIZE = 4; + } + + // Output only. Node group ID for the operation. + string node_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cluster UUID associated with the node group operation. + string cluster_uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current operation status. + ClusterOperationStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The previous operation status. + repeated ClusterOperationStatus status_history = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The operation type. + NodeGroupOperationType operation_type = 5; + + // Output only. Short description of operation. + string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Labels associated with the operation. + map labels = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered during operation execution. + repeated string warnings = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetCredentialsProvider.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..371ec78f340c --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupControllerSettings; +import com.google.cloud.dataproc.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupControllerSettings nodeGroupControllerSettings = + NodeGroupControllerSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NodeGroupControllerClient nodeGroupControllerClient = + NodeGroupControllerClient.create(nodeGroupControllerSettings); + } +} +// [END dataproc_v1_generated_NodeGroupController_Create_SetCredentialsProvider_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetCredentialsProvider1.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..692371b797f6 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_Create_SetCredentialsProvider1_sync] +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupControllerSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupControllerSettings nodeGroupControllerSettings = + NodeGroupControllerSettings.newHttpJsonBuilder().build(); + NodeGroupControllerClient nodeGroupControllerClient = + NodeGroupControllerClient.create(nodeGroupControllerSettings); + } +} +// [END dataproc_v1_generated_NodeGroupController_Create_SetCredentialsProvider1_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetEndpoint.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..deecc18fd9a4 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_Create_SetEndpoint_sync] +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupControllerSettings; +import com.google.cloud.dataproc.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupControllerSettings nodeGroupControllerSettings = + NodeGroupControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); + NodeGroupControllerClient nodeGroupControllerClient = + NodeGroupControllerClient.create(nodeGroupControllerSettings); + } +} +// [END dataproc_v1_generated_NodeGroupController_Create_SetEndpoint_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/AsyncCreateNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/AsyncCreateNodeGroup.java new file mode 100644 index 000000000000..4aeb7b68c931 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/AsyncCreateNodeGroup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_CreateNodeGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataproc.v1.ClusterRegionName; +import com.google.cloud.dataproc.v1.CreateNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.longrunning.Operation; + +public class AsyncCreateNodeGroup { + + public static void main(String[] args) throws Exception { + asyncCreateNodeGroup(); + } + + public static void asyncCreateNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + CreateNodeGroupRequest request = + CreateNodeGroupRequest.newBuilder() + .setParent(ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString()) + .setNodeGroup(NodeGroup.newBuilder().build()) + .setNodeGroupId("nodeGroupId1097129880") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + nodeGroupControllerClient.createNodeGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_CreateNodeGroup_async] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/AsyncCreateNodeGroupLRO.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/AsyncCreateNodeGroupLRO.java new file mode 100644 index 000000000000..235a862c8753 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/AsyncCreateNodeGroupLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_CreateNodeGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataproc.v1.ClusterRegionName; +import com.google.cloud.dataproc.v1.CreateNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupOperationMetadata; + +public class AsyncCreateNodeGroupLRO { + + public static void main(String[] args) throws Exception { + asyncCreateNodeGroupLRO(); + } + + public static void asyncCreateNodeGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + CreateNodeGroupRequest request = + CreateNodeGroupRequest.newBuilder() + .setParent(ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString()) + .setNodeGroup(NodeGroup.newBuilder().build()) + .setNodeGroupId("nodeGroupId1097129880") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + nodeGroupControllerClient.createNodeGroupOperationCallable().futureCall(request); + // Do something. + NodeGroup response = future.get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_CreateNodeGroup_LRO_async] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroup.java new file mode 100644 index 000000000000..d7ad02ad0884 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_CreateNodeGroup_sync] +import com.google.cloud.dataproc.v1.ClusterRegionName; +import com.google.cloud.dataproc.v1.CreateNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; + +public class SyncCreateNodeGroup { + + public static void main(String[] args) throws Exception { + syncCreateNodeGroup(); + } + + public static void syncCreateNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + CreateNodeGroupRequest request = + CreateNodeGroupRequest.newBuilder() + .setParent(ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString()) + .setNodeGroup(NodeGroup.newBuilder().build()) + .setNodeGroupId("nodeGroupId1097129880") + .setRequestId("requestId693933066") + .build(); + NodeGroup response = nodeGroupControllerClient.createNodeGroupAsync(request).get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_CreateNodeGroup_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroupClusterregionnameNodegroupString.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroupClusterregionnameNodegroupString.java new file mode 100644 index 000000000000..9b2a196a2061 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroupClusterregionnameNodegroupString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_CreateNodeGroup_ClusterregionnameNodegroupString_sync] +import com.google.cloud.dataproc.v1.ClusterRegionName; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; + +public class SyncCreateNodeGroupClusterregionnameNodegroupString { + + public static void main(String[] args) throws Exception { + syncCreateNodeGroupClusterregionnameNodegroupString(); + } + + public static void syncCreateNodeGroupClusterregionnameNodegroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + ClusterRegionName parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]"); + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + NodeGroup response = + nodeGroupControllerClient.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_CreateNodeGroup_ClusterregionnameNodegroupString_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroupStringNodegroupString.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroupStringNodegroupString.java new file mode 100644 index 000000000000..891b26190557 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/createnodegroup/SyncCreateNodeGroupStringNodegroupString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_CreateNodeGroup_StringNodegroupString_sync] +import com.google.cloud.dataproc.v1.ClusterRegionName; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; + +public class SyncCreateNodeGroupStringNodegroupString { + + public static void main(String[] args) throws Exception { + syncCreateNodeGroupStringNodegroupString(); + } + + public static void syncCreateNodeGroupStringNodegroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + String parent = ClusterRegionName.of("[PROJECT]", "[REGION]", "[CLUSTER]").toString(); + NodeGroup nodeGroup = NodeGroup.newBuilder().build(); + String nodeGroupId = "nodeGroupId1097129880"; + NodeGroup response = + nodeGroupControllerClient.createNodeGroupAsync(parent, nodeGroup, nodeGroupId).get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_CreateNodeGroup_StringNodegroupString_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/AsyncGetNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/AsyncGetNodeGroup.java new file mode 100644 index 000000000000..658551c7da9a --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/AsyncGetNodeGroup.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_GetNodeGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataproc.v1.GetNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupName; + +public class AsyncGetNodeGroup { + + public static void main(String[] args) throws Exception { + asyncGetNodeGroup(); + } + + public static void asyncGetNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + GetNodeGroupRequest request = + GetNodeGroupRequest.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .build(); + ApiFuture future = + nodeGroupControllerClient.getNodeGroupCallable().futureCall(request); + // Do something. + NodeGroup response = future.get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_GetNodeGroup_async] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroup.java new file mode 100644 index 000000000000..755c62e10175 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_GetNodeGroup_sync] +import com.google.cloud.dataproc.v1.GetNodeGroupRequest; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupName; + +public class SyncGetNodeGroup { + + public static void main(String[] args) throws Exception { + syncGetNodeGroup(); + } + + public static void syncGetNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + GetNodeGroupRequest request = + GetNodeGroupRequest.newBuilder() + .setName( + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString()) + .build(); + NodeGroup response = nodeGroupControllerClient.getNodeGroup(request); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_GetNodeGroup_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroupNodegroupname.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroupNodegroupname.java new file mode 100644 index 000000000000..c601f1bb84a9 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroupNodegroupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_GetNodeGroup_Nodegroupname_sync] +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupName; + +public class SyncGetNodeGroupNodegroupname { + + public static void main(String[] args) throws Exception { + syncGetNodeGroupNodegroupname(); + } + + public static void syncGetNodeGroupNodegroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"); + NodeGroup response = nodeGroupControllerClient.getNodeGroup(name); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_GetNodeGroup_Nodegroupname_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroupString.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroupString.java new file mode 100644 index 000000000000..d5c522133f9b --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/getnodegroup/SyncGetNodeGroupString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_GetNodeGroup_String_sync] +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupName; + +public class SyncGetNodeGroupString { + + public static void main(String[] args) throws Exception { + syncGetNodeGroupString(); + } + + public static void syncGetNodeGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + String name = + NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]").toString(); + NodeGroup response = nodeGroupControllerClient.getNodeGroup(name); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_GetNodeGroup_String_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/AsyncResizeNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/AsyncResizeNodeGroup.java new file mode 100644 index 000000000000..207f095d08d6 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/AsyncResizeNodeGroup.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.ResizeNodeGroupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Duration; + +public class AsyncResizeNodeGroup { + + public static void main(String[] args) throws Exception { + asyncResizeNodeGroup(); + } + + public static void asyncResizeNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + ResizeNodeGroupRequest request = + ResizeNodeGroupRequest.newBuilder() + .setName("name3373707") + .setSize(3530753) + .setRequestId("requestId693933066") + .setGracefulDecommissionTimeout(Duration.newBuilder().build()) + .build(); + ApiFuture future = + nodeGroupControllerClient.resizeNodeGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_async] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/AsyncResizeNodeGroupLRO.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/AsyncResizeNodeGroupLRO.java new file mode 100644 index 000000000000..68c77440f1a4 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/AsyncResizeNodeGroupLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.NodeGroupOperationMetadata; +import com.google.cloud.dataproc.v1.ResizeNodeGroupRequest; +import com.google.protobuf.Duration; + +public class AsyncResizeNodeGroupLRO { + + public static void main(String[] args) throws Exception { + asyncResizeNodeGroupLRO(); + } + + public static void asyncResizeNodeGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + ResizeNodeGroupRequest request = + ResizeNodeGroupRequest.newBuilder() + .setName("name3373707") + .setSize(3530753) + .setRequestId("requestId693933066") + .setGracefulDecommissionTimeout(Duration.newBuilder().build()) + .build(); + OperationFuture future = + nodeGroupControllerClient.resizeNodeGroupOperationCallable().futureCall(request); + // Do something. + NodeGroup response = future.get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_LRO_async] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/SyncResizeNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/SyncResizeNodeGroup.java new file mode 100644 index 000000000000..684609e5dfdb --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/SyncResizeNodeGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_sync] +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; +import com.google.cloud.dataproc.v1.ResizeNodeGroupRequest; +import com.google.protobuf.Duration; + +public class SyncResizeNodeGroup { + + public static void main(String[] args) throws Exception { + syncResizeNodeGroup(); + } + + public static void syncResizeNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + ResizeNodeGroupRequest request = + ResizeNodeGroupRequest.newBuilder() + .setName("name3373707") + .setSize(3530753) + .setRequestId("requestId693933066") + .setGracefulDecommissionTimeout(Duration.newBuilder().build()) + .build(); + NodeGroup response = nodeGroupControllerClient.resizeNodeGroupAsync(request).get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/SyncResizeNodeGroupStringInt.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/SyncResizeNodeGroupStringInt.java new file mode 100644 index 000000000000..1e51183d6a89 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontroller/resizenodegroup/SyncResizeNodeGroupStringInt.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_StringInt_sync] +import com.google.cloud.dataproc.v1.NodeGroup; +import com.google.cloud.dataproc.v1.NodeGroupControllerClient; + +public class SyncResizeNodeGroupStringInt { + + public static void main(String[] args) throws Exception { + syncResizeNodeGroupStringInt(); + } + + public static void syncResizeNodeGroupStringInt() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { + String name = "name3373707"; + int size = 3530753; + NodeGroup response = nodeGroupControllerClient.resizeNodeGroupAsync(name, size).get(); + } + } +} +// [END dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_StringInt_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontrollersettings/getnodegroup/SyncGetNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontrollersettings/getnodegroup/SyncGetNodeGroup.java new file mode 100644 index 000000000000..4fe206f5d426 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/nodegroupcontrollersettings/getnodegroup/SyncGetNodeGroup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.samples; + +// [START dataproc_v1_generated_NodeGroupControllerSettings_GetNodeGroup_sync] +import com.google.cloud.dataproc.v1.NodeGroupControllerSettings; +import java.time.Duration; + +public class SyncGetNodeGroup { + + public static void main(String[] args) throws Exception { + syncGetNodeGroup(); + } + + public static void syncGetNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupControllerSettings.Builder nodeGroupControllerSettingsBuilder = + NodeGroupControllerSettings.newBuilder(); + nodeGroupControllerSettingsBuilder + .getNodeGroupSettings() + .setRetrySettings( + nodeGroupControllerSettingsBuilder.getNodeGroupSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeGroupControllerSettings nodeGroupControllerSettings = + nodeGroupControllerSettingsBuilder.build(); + } +} +// [END dataproc_v1_generated_NodeGroupControllerSettings_GetNodeGroup_sync] diff --git a/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/stub/nodegroupcontrollerstubsettings/getnodegroup/SyncGetNodeGroup.java b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/stub/nodegroupcontrollerstubsettings/getnodegroup/SyncGetNodeGroup.java new file mode 100644 index 000000000000..8eb4a9b5ae50 --- /dev/null +++ b/java-dataproc/samples/snippets/generated/com/google/cloud/dataproc/v1/stub/nodegroupcontrollerstubsettings/getnodegroup/SyncGetNodeGroup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1.stub.samples; + +// [START dataproc_v1_generated_NodeGroupControllerStubSettings_GetNodeGroup_sync] +import com.google.cloud.dataproc.v1.stub.NodeGroupControllerStubSettings; +import java.time.Duration; + +public class SyncGetNodeGroup { + + public static void main(String[] args) throws Exception { + syncGetNodeGroup(); + } + + public static void syncGetNodeGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupControllerStubSettings.Builder nodeGroupControllerSettingsBuilder = + NodeGroupControllerStubSettings.newBuilder(); + nodeGroupControllerSettingsBuilder + .getNodeGroupSettings() + .setRetrySettings( + nodeGroupControllerSettingsBuilder.getNodeGroupSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeGroupControllerStubSettings nodeGroupControllerSettings = + nodeGroupControllerSettingsBuilder.build(); + } +} +// [END dataproc_v1_generated_NodeGroupControllerStubSettings_GetNodeGroup_sync]