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 - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - * AutoscalingPolicy response = - * autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy); - * } - * }- * - *
Note: close() needs to be called on the AutoscalingPolicyServiceClient 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: - * - *
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 - * AutoscalingPolicyServiceSettings to create(). For example: - * - *
To customize credentials: - * - *
{@code - * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = - * AutoscalingPolicyServiceSettings.newBuilder() - * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - * .build(); - * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings); - * }- * - *
To customize the endpoint: - * - *
{@code - * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = - * AutoscalingPolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings); - * }- * - *
Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class AutoscalingPolicyServiceClient implements BackgroundResource { - private final AutoscalingPolicyServiceSettings settings; - private final AutoscalingPolicyServiceStub stub; - - /** Constructs an instance of AutoscalingPolicyServiceClient with default settings. */ - public static final AutoscalingPolicyServiceClient create() throws IOException { - return create(AutoscalingPolicyServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AutoscalingPolicyServiceClient, 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 AutoscalingPolicyServiceClient create( - AutoscalingPolicyServiceSettings settings) throws IOException { - return new AutoscalingPolicyServiceClient(settings); - } - - /** - * Constructs an instance of AutoscalingPolicyServiceClient, using the given stub for making - * calls. This is for advanced usage - prefer using create(AutoscalingPolicyServiceSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final AutoscalingPolicyServiceClient create(AutoscalingPolicyServiceStub stub) { - return new AutoscalingPolicyServiceClient(stub); - } - - /** - * Constructs an instance of AutoscalingPolicyServiceClient, 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 AutoscalingPolicyServiceClient(AutoscalingPolicyServiceSettings settings) - throws IOException { - this.settings = settings; - this.stub = ((AutoscalingPolicyServiceStubSettings) settings.getStubSettings()).createStub(); - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - protected AutoscalingPolicyServiceClient(AutoscalingPolicyServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final AutoscalingPolicyServiceSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public AutoscalingPolicyServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new autoscaling policy. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - * AutoscalingPolicy response = - * autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy); - * } - * }- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - * AutoscalingPolicy response = - * autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy); - * } - * }- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * String parent = - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString(); - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - * AutoscalingPolicy response = - * autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy); - * } - * }- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * CreateAutoscalingPolicyRequest request = - * CreateAutoscalingPolicyRequest.newBuilder() - * .setParent( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .setPolicy(AutoscalingPolicy.newBuilder().build()) - * .build(); - * AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(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 AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRequest request) { - return createAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new autoscaling policy. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * CreateAutoscalingPolicyRequest request = - * CreateAutoscalingPolicyRequest.newBuilder() - * .setParent( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .setPolicy(AutoscalingPolicy.newBuilder().build()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * autoscalingPolicyServiceClient.createAutoscalingPolicyCallable().futureCall(request); - * // Do something. - * AutoscalingPolicy response = future.get(); - * } - * }
Disabled check for update_mask, because all updates will be full replacements. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - * AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy); - * } - * }- * - * @param policy Required. The updated autoscaling policy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy) { - UpdateAutoscalingPolicyRequest request = - UpdateAutoscalingPolicyRequest.newBuilder().setPolicy(policy).build(); - return updateAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) autoscaling policy. - * - *
Disabled check for update_mask, because all updates will be full replacements. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * UpdateAutoscalingPolicyRequest request = - * UpdateAutoscalingPolicyRequest.newBuilder() - * .setPolicy(AutoscalingPolicy.newBuilder().build()) - * .build(); - * AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(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 AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request) { - return updateAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) autoscaling policy. - * - *
Disabled check for update_mask, because all updates will be full replacements. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * UpdateAutoscalingPolicyRequest request = - * UpdateAutoscalingPolicyRequest.newBuilder() - * .setPolicy(AutoscalingPolicy.newBuilder().build()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request); - * // Do something. - * AutoscalingPolicy response = future.get(); - * } - * }
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * AutoscalingPolicyName name = - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - * AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name); - * } - * }- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * String name = - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString(); - * AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name); - * } - * }- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * GetAutoscalingPolicyRequest request = - * GetAutoscalingPolicyRequest.newBuilder() - * .setName( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .build(); - * AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(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 AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest request) { - return getAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves autoscaling policy. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * GetAutoscalingPolicyRequest request = - * GetAutoscalingPolicyRequest.newBuilder() - * .setName( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * autoscalingPolicyServiceClient.getAutoscalingPolicyCallable().futureCall(request); - * // Do something. - * AutoscalingPolicy response = future.get(); - * } - * }
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - * for (AutoscalingPolicy element : - * autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - * for (AutoscalingPolicy element : - * autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * String parent = - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString(); - * for (AutoscalingPolicy element : - * autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * ListAutoscalingPoliciesRequest request = - * ListAutoscalingPoliciesRequest.newBuilder() - * .setParent( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * for (AutoscalingPolicy element : - * autoscalingPolicyServiceClient.listAutoscalingPolicies(request).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @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 ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies( - ListAutoscalingPoliciesRequest request) { - return listAutoscalingPoliciesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists autoscaling policies in the project. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * ListAutoscalingPoliciesRequest request = - * ListAutoscalingPoliciesRequest.newBuilder() - * .setParent( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * autoscalingPolicyServiceClient.listAutoscalingPoliciesPagedCallable().futureCall(request); - * // Do something. - * for (AutoscalingPolicy element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * }
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * ListAutoscalingPoliciesRequest request = - * ListAutoscalingPoliciesRequest.newBuilder() - * .setParent( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListAutoscalingPoliciesResponse response = - * autoscalingPolicyServiceClient.listAutoscalingPoliciesCallable().call(request); - * for (AutoscalingPolicy element : response.getResponsesList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } - * } - * }- */ - public final UnaryCallable
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * AutoscalingPolicyName name = - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - * autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name); - * } - * }- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * String name = - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString(); - * autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name); - * } - * }- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * DeleteAutoscalingPolicyRequest request = - * DeleteAutoscalingPolicyRequest.newBuilder() - * .setName( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .build(); - * autoscalingPolicyServiceClient.deleteAutoscalingPolicy(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 void deleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest request) { - deleteAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by - * one or more clusters. - * - *
Sample code: - * - *
{@code - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - * AutoscalingPolicyServiceClient.create()) { - * DeleteAutoscalingPolicyRequest request = - * DeleteAutoscalingPolicyRequest.newBuilder() - * .setName( - * AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - * "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - * .toString()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * autoscalingPolicyServiceClient.deleteAutoscalingPolicyCallable().futureCall(request); - * // Do something. - * future.get(); - * } - * }
The default instance has everything set to sensible defaults: - * - *
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 createAutoscalingPolicy to 30 seconds: - * - *
{@code - * AutoscalingPolicyServiceSettings.Builder autoscalingPolicyServiceSettingsBuilder = - * AutoscalingPolicyServiceSettings.newBuilder(); - * autoscalingPolicyServiceSettingsBuilder - * .createAutoscalingPolicySettings() - * .setRetrySettings( - * autoscalingPolicyServiceSettingsBuilder - * .createAutoscalingPolicySettings() - * .getRetrySettings() - * .toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)) - * .build()); - * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = - * autoscalingPolicyServiceSettingsBuilder.build(); - * }- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AutoscalingPolicyServiceSettings - extends ClientSettings
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction 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:
- *
- * Note: close() needs to be called on the ClusterControllerClient 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:
- *
- * 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 ClusterControllerSettings to
- * create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class ClusterControllerClient implements BackgroundResource {
- private final ClusterControllerSettings settings;
- private final ClusterControllerStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of ClusterControllerClient with default settings. */
- public static final ClusterControllerClient create() throws IOException {
- return create(ClusterControllerSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of ClusterControllerClient, 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 ClusterControllerClient create(ClusterControllerSettings settings)
- throws IOException {
- return new ClusterControllerClient(settings);
- }
-
- /**
- * Constructs an instance of ClusterControllerClient, using the given stub for making calls. This
- * is for advanced usage - prefer using create(ClusterControllerSettings).
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final ClusterControllerClient create(ClusterControllerStub stub) {
- return new ClusterControllerClient(stub);
- }
-
- /**
- * Constructs an instance of ClusterControllerClient, 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 ClusterControllerClient(ClusterControllerSettings settings) throws IOException {
- this.settings = settings;
- this.stub = ((ClusterControllerStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected ClusterControllerClient(ClusterControllerStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final ClusterControllerSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public ClusterControllerStub 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 OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a cluster in a project. The returned
- * [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * { "config":{ "workerConfig":{ "numInstances":"5" } } }
- * Similarly, to change the number of preemptible workers in a cluster to 5, the
- * `update_mask` parameter would be `config.secondary_worker_config.num_instances`, and the
- * `PATCH` request body would be set as follows:
- * { "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } }
- * <strong>Note:</strong> currently only the following fields can be updated:
- * <table> <tr>
- * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
- * </tr> <tr> <td>labels</td><td>Updates labels</td>
- * </tr> <tr>
- * <td>config.worker_config.num_instances</td><td>Resize primary worker
- * group</td> </tr> <tr>
- * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
- * worker group</td> </tr> <tr>
- * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
- * duration</td> </tr> <tr>
- * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
- * deletion timestamp</td> </tr> <tr>
- * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
- * duration</td> </tr> <tr>
- * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
- * change autoscaling policies</td> </tr> </table>
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * field = value [AND [field = value]] ...
- * where **field** is one of `status.state`, `clusterName`, or
- * `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `*` to
- * match all values. `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
- * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` contains the
- * `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` contains the `DELETING` and
- * `ERROR` states. `clusterName` is the name of the cluster provided at creation time. Only
- * the logical `AND` operator is supported; space-separated items are treated as having an
- * implicit `AND` operator.
- * Example filter:
- * status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND
- * labels.starred = *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListClustersPagedResponse listClusters(
- String projectId, String region, String filter) {
- ListClustersRequest request =
- ListClustersRequest.newBuilder()
- .setProjectId(projectId)
- .setRegion(region)
- .setFilter(filter)
- .build();
- return listClusters(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists all regions/{region}/clusters in a project alphabetically.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * 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 getCluster to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction 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:
- *
- * Note: close() needs to be called on the JobControllerClient 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:
- *
- * 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 JobControllerSettings to
- * create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class JobControllerClient implements BackgroundResource {
- private final JobControllerSettings settings;
- private final JobControllerStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of JobControllerClient with default settings. */
- public static final JobControllerClient create() throws IOException {
- return create(JobControllerSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of JobControllerClient, 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 JobControllerClient create(JobControllerSettings settings)
- throws IOException {
- return new JobControllerClient(settings);
- }
-
- /**
- * Constructs an instance of JobControllerClient, using the given stub for making calls. This is
- * for advanced usage - prefer using create(JobControllerSettings).
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final JobControllerClient create(JobControllerStub stub) {
- return new JobControllerClient(stub);
- }
-
- /**
- * Constructs an instance of JobControllerClient, 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 JobControllerClient(JobControllerSettings settings) throws IOException {
- this.settings = settings;
- this.stub = ((JobControllerStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected JobControllerClient(JobControllerStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final JobControllerSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public JobControllerStub 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 OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Submits a job to a cluster.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * [field = value] AND [field [= value]] ...
- * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a
- * label key. **value** can be `*` to match all values. `status.state` can
- * be either `ACTIVE` or `NON_ACTIVE`. Only the logical `AND` operator is supported;
- * space-separated items are treated as having an implicit `AND` operator.
- * Example filter:
- * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListJobsPagedResponse listJobs(String projectId, String region, String filter) {
- ListJobsRequest request =
- ListJobsRequest.newBuilder()
- .setProjectId(projectId)
- .setRegion(region)
- .setFilter(filter)
- .build();
- return listJobs(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists regions/{region}/jobs in a project.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * 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 submitJob to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction 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:
- *
- * Note: close() needs to be called on the WorkflowTemplateServiceClient 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:
- *
- * 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
- * WorkflowTemplateServiceSettings to create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class WorkflowTemplateServiceClient implements BackgroundResource {
- private final WorkflowTemplateServiceSettings settings;
- private final WorkflowTemplateServiceStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of WorkflowTemplateServiceClient with default settings. */
- public static final WorkflowTemplateServiceClient create() throws IOException {
- return create(WorkflowTemplateServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of WorkflowTemplateServiceClient, 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 WorkflowTemplateServiceClient create(WorkflowTemplateServiceSettings settings)
- throws IOException {
- return new WorkflowTemplateServiceClient(settings);
- }
-
- /**
- * Constructs an instance of WorkflowTemplateServiceClient, using the given stub for making calls.
- * This is for advanced usage - prefer using create(WorkflowTemplateServiceSettings).
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final WorkflowTemplateServiceClient create(WorkflowTemplateServiceStub stub) {
- return new WorkflowTemplateServiceClient(stub);
- }
-
- /**
- * Constructs an instance of WorkflowTemplateServiceClient, 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 WorkflowTemplateServiceClient(WorkflowTemplateServiceSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub = ((WorkflowTemplateServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected WorkflowTemplateServiceClient(WorkflowTemplateServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final WorkflowTemplateServiceSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public WorkflowTemplateServiceStub 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 OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates new workflow template.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * Sample code:
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * Sample code:
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * Sample code:
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * Sample code:
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata.
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata.
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata.
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata.
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata.
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata.
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata.
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * This method is equivalent to executing the sequence
- * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
- * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
- * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be
- * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * This method is equivalent to executing the sequence
- * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
- * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
- * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be
- * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * This method is equivalent to executing the sequence
- * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
- * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
- * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be
- * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * This method is equivalent to executing the sequence
- * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
- * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
- * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be
- * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * This method is equivalent to executing the sequence
- * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
- * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
- * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be
- * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * This method is equivalent to executing the sequence
- * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
- * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
- * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
- *
- * The returned Operation can be used to track execution of workflow by polling
- * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when
- * entire workflow is finished.
- *
- * The running workflow can be aborted via
- * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any
- * inflight jobs to be cancelled and workflow-owned clusters to be deleted.
- *
- * The [Operation.metadata][google.longrunning.Operation.metadata] will be
- * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
- * Also see [Using
- * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
- * be [Empty][google.protobuf.Empty].
- *
- * Sample code:
- *
- * Sample code:
- *
- * The `template.version` field must match the current version.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowTemplate updateWorkflowTemplate(WorkflowTemplate template) {
- UpdateWorkflowTemplateRequest request =
- UpdateWorkflowTemplateRequest.newBuilder().setTemplate(template).build();
- return updateWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates (replaces) workflow template. The updated template must contain version that matches
- * the current server version.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * 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 createWorkflowTemplate to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction ======================= AutoscalingPolicyServiceClient =======================
- *
- * Service Description: The API interface for managing autoscaling policies in the Cloud Dataproc
- * API.
- *
- * Sample for AutoscalingPolicyServiceClient:
- *
- * ======================= ClusterControllerClient =======================
- *
- * Service Description: The ClusterControllerService provides methods to manage clusters of
- * Compute Engine instances.
- *
- * Sample for ClusterControllerClient:
- *
- * ======================= JobControllerClient =======================
- *
- * Service Description: The JobController provides methods to manage jobs.
- *
- * Sample for JobControllerClient:
- *
- * ======================= WorkflowTemplateServiceClient =======================
- *
- * Service Description: The API interface for managing Workflow Templates in the Dataproc API.
- *
- * Sample for WorkflowTemplateServiceClient:
- *
- * This class is for advanced usage and reflects the underlying API directly.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public abstract class AutoscalingPolicyServiceStub implements BackgroundResource {
-
- public UnaryCallable The default instance has everything set to sensible defaults:
- *
- * 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 createAutoscalingPolicy to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class is for advanced usage and reflects the underlying API directly.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public abstract class ClusterControllerStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
- }
-
- public OperationCallable The default instance has everything set to sensible defaults:
- *
- * 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 getCluster to 30 seconds:
- *
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String clusterName = "clusterName-1141738587";
- * Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- * }
- *
- *
- *
- *
- * {@code
- * ClusterControllerSettings clusterControllerSettings =
- * ClusterControllerSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * ClusterControllerClient clusterControllerClient =
- * ClusterControllerClient.create(clusterControllerSettings);
- * }
- *
- * {@code
- * ClusterControllerSettings clusterControllerSettings =
- * ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ClusterControllerClient clusterControllerClient =
- * ClusterControllerClient.create(clusterControllerSettings);
- * }
- *
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * Cluster cluster = Cluster.newBuilder().build();
- * Cluster response =
- * clusterControllerClient.createClusterAsync(projectId, region, cluster).get();
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs
- * to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param cluster Required. The cluster to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * CreateClusterRequest request =
- * CreateClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setCluster(Cluster.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Cluster response = clusterControllerClient.createClusterAsync(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{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * CreateClusterRequest request =
- * CreateClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setCluster(Cluster.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * CreateClusterRequest request =
- * CreateClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setCluster(Cluster.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String clusterName = "clusterName-1141738587";
- * Cluster cluster = Cluster.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Cluster response =
- * clusterControllerClient
- * .updateClusterAsync(projectId, region, clusterName, cluster, updateMask)
- * .get();
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project the cluster belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param clusterName Required. The cluster name.
- * @param cluster Required. The changes to the cluster.
- * @param updateMask Required. Specifies the path, relative to `Cluster`, of the field to update.
- * For example, to change the number of workers in a cluster to 5, the `update_mask` parameter
- * would be specified as `config.worker_config.num_instances`, and the `PATCH` request body
- * would specify the new value, as follows:
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * UpdateClusterRequest request =
- * UpdateClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .setCluster(Cluster.newBuilder().build())
- * .setGracefulDecommissionTimeout(Duration.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Cluster response = clusterControllerClient.updateClusterAsync(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{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * UpdateClusterRequest request =
- * UpdateClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .setCluster(Cluster.newBuilder().build())
- * .setGracefulDecommissionTimeout(Duration.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * UpdateClusterRequest request =
- * UpdateClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .setCluster(Cluster.newBuilder().build())
- * .setGracefulDecommissionTimeout(Duration.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String clusterName = "clusterName-1141738587";
- * clusterControllerClient.deleteClusterAsync(projectId, region, clusterName).get();
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs
- * to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param clusterName Required. The cluster name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * DeleteClusterRequest request =
- * DeleteClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .setClusterUuid("clusterUuid-1141510955")
- * .setRequestId("requestId693933066")
- * .build();
- * clusterControllerClient.deleteClusterAsync(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{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * DeleteClusterRequest request =
- * DeleteClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .setClusterUuid("clusterUuid-1141510955")
- * .setRequestId("requestId693933066")
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * DeleteClusterRequest request =
- * DeleteClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .setClusterUuid("clusterUuid-1141510955")
- * .setRequestId("requestId693933066")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String clusterName = "clusterName-1141738587";
- * Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs
- * to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param clusterName Required. The cluster name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Cluster getCluster(String projectId, String region, String clusterName) {
- GetClusterRequest request =
- GetClusterRequest.newBuilder()
- .setProjectId(projectId)
- .setRegion(region)
- .setClusterName(clusterName)
- .build();
- return getCluster(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the resource representation for a cluster in a project.
- *
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * GetClusterRequest request =
- * GetClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .build();
- * Cluster response = clusterControllerClient.getCluster(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 Cluster getCluster(GetClusterRequest request) {
- return getClusterCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the resource representation for a cluster in a project.
- *
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * GetClusterRequest request =
- * GetClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * for (Cluster element : clusterControllerClient.listClusters(projectId, region).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs
- * to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListClustersPagedResponse listClusters(String projectId, String region) {
- ListClustersRequest request =
- ListClustersRequest.newBuilder().setProjectId(projectId).setRegion(region).build();
- return listClusters(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists all regions/{region}/clusters in a project alphabetically.
- *
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String filter = "filter-1274492040";
- * for (Cluster element :
- * clusterControllerClient.listClusters(projectId, region, filter).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs
- * to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param filter Optional. A filter constraining the clusters to list. Filters are case-sensitive
- * and have the following syntax:
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * ListClustersRequest request =
- * ListClustersRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Cluster element : clusterControllerClient.listClusters(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @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 ListClustersPagedResponse listClusters(ListClustersRequest request) {
- return listClustersPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists all regions/{region}/clusters in a project alphabetically.
- *
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * ListClustersRequest request =
- * ListClustersRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * ListClustersRequest request =
- * ListClustersRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListClustersResponse response =
- * clusterControllerClient.listClustersCallable().call(request);
- * for (Cluster element : response.getResponsesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String clusterName = "clusterName-1141738587";
- * clusterControllerClient.diagnoseClusterAsync(projectId, region, clusterName).get();
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs
- * to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param clusterName Required. The cluster name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * DiagnoseClusterRequest request =
- * DiagnoseClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .build();
- * clusterControllerClient.diagnoseClusterAsync(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{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * DiagnoseClusterRequest request =
- * DiagnoseClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * DiagnoseClusterRequest request =
- * DiagnoseClusterRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setClusterName("clusterName-1141738587")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable
- *
- *
- * {@code
- * ClusterControllerSettings.Builder clusterControllerSettingsBuilder =
- * ClusterControllerSettings.newBuilder();
- * clusterControllerSettingsBuilder
- * .getClusterSettings()
- * .setRetrySettings(
- * clusterControllerSettingsBuilder
- * .getClusterSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * ClusterControllerSettings clusterControllerSettings = clusterControllerSettingsBuilder.build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class ClusterControllerSettings extends ClientSettings{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- * }
- *
- *
- *
- *
- * {@code
- * JobControllerSettings jobControllerSettings =
- * JobControllerSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * JobControllerClient jobControllerClient = JobControllerClient.create(jobControllerSettings);
- * }
- *
- * {@code
- * JobControllerSettings jobControllerSettings =
- * JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * JobControllerClient jobControllerClient = JobControllerClient.create(jobControllerSettings);
- * }
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param job Required. The job resource.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Job submitJob(String projectId, String region, Job job) {
- SubmitJobRequest request =
- SubmitJobRequest.newBuilder().setProjectId(projectId).setRegion(region).setJob(job).build();
- return submitJob(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Submits a job to a cluster.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * SubmitJobRequest request =
- * SubmitJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJob(Job.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Job response = jobControllerClient.submitJob(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 Job submitJob(SubmitJobRequest request) {
- return submitJobCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Submits a job to a cluster.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * SubmitJobRequest request =
- * SubmitJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJob(Job.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJobAsOperationAsync(projectId, region, job).get();
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param job Required. The job resource.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * SubmitJobRequest request =
- * SubmitJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJob(Job.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Job response = jobControllerClient.submitJobAsOperationAsync(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{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * SubmitJobRequest request =
- * SubmitJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJob(Job.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * SubmitJobRequest request =
- * SubmitJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJob(Job.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String jobId = "jobId101296568";
- * Job response = jobControllerClient.getJob(projectId, region, jobId);
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param jobId Required. The job ID.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Job getJob(String projectId, String region, String jobId) {
- GetJobRequest request =
- GetJobRequest.newBuilder()
- .setProjectId(projectId)
- .setRegion(region)
- .setJobId(jobId)
- .build();
- return getJob(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the resource representation for a job in a project.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * GetJobRequest request =
- * GetJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .build();
- * Job response = jobControllerClient.getJob(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 Job getJob(GetJobRequest request) {
- return getJobCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the resource representation for a job in a project.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * GetJobRequest request =
- * GetJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * for (Job element : jobControllerClient.listJobs(projectId, region).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListJobsPagedResponse listJobs(String projectId, String region) {
- ListJobsRequest request =
- ListJobsRequest.newBuilder().setProjectId(projectId).setRegion(region).build();
- return listJobs(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists regions/{region}/jobs in a project.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String filter = "filter-1274492040";
- * for (Job element : jobControllerClient.listJobs(projectId, region, filter).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param filter Optional. A filter constraining the jobs to list. Filters are case-sensitive and
- * have the following syntax:
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * ListJobsRequest request =
- * ListJobsRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setClusterName("clusterName-1141738587")
- * .setFilter("filter-1274492040")
- * .build();
- * for (Job element : jobControllerClient.listJobs(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @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 ListJobsPagedResponse listJobs(ListJobsRequest request) {
- return listJobsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists regions/{region}/jobs in a project.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * ListJobsRequest request =
- * ListJobsRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setClusterName("clusterName-1141738587")
- * .setFilter("filter-1274492040")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * ListJobsRequest request =
- * ListJobsRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setClusterName("clusterName-1141738587")
- * .setFilter("filter-1274492040")
- * .build();
- * while (true) {
- * ListJobsResponse response = jobControllerClient.listJobsCallable().call(request);
- * for (Job element : response.getResponsesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * UpdateJobRequest request =
- * UpdateJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .setJob(Job.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Job response = jobControllerClient.updateJob(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 Job updateJob(UpdateJobRequest request) {
- return updateJobCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates a job in a project.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * UpdateJobRequest request =
- * UpdateJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .setJob(Job.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String jobId = "jobId101296568";
- * Job response = jobControllerClient.cancelJob(projectId, region, jobId);
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param jobId Required. The job ID.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Job cancelJob(String projectId, String region, String jobId) {
- CancelJobRequest request =
- CancelJobRequest.newBuilder()
- .setProjectId(projectId)
- .setRegion(region)
- .setJobId(jobId)
- .build();
- return cancelJob(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Starts a job cancellation request. To access the job resource after cancellation, call
- * regions/{region}/jobs.list or regions/{region}/jobs.get.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * CancelJobRequest request =
- * CancelJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .build();
- * Job response = jobControllerClient.cancelJob(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 Job cancelJob(CancelJobRequest request) {
- return cancelJobCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Starts a job cancellation request. To access the job resource after cancellation, call
- * regions/{region}/jobs.list or regions/{region}/jobs.get.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * CancelJobRequest request =
- * CancelJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String jobId = "jobId101296568";
- * jobControllerClient.deleteJob(projectId, region, jobId);
- * }
- * }
- *
- * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
- * @param region Required. The Dataproc region in which to handle the request.
- * @param jobId Required. The job ID.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteJob(String projectId, String region, String jobId) {
- DeleteJobRequest request =
- DeleteJobRequest.newBuilder()
- .setProjectId(projectId)
- .setRegion(region)
- .setJobId(jobId)
- .build();
- deleteJob(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes the job from the project. If the job is active, the delete fails, and the response
- * returns `FAILED_PRECONDITION`.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * DeleteJobRequest request =
- * DeleteJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .build();
- * jobControllerClient.deleteJob(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 void deleteJob(DeleteJobRequest request) {
- deleteJobCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes the job from the project. If the job is active, the delete fails, and the response
- * returns `FAILED_PRECONDITION`.
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * DeleteJobRequest request =
- * DeleteJobRequest.newBuilder()
- * .setProjectId("projectId-894832108")
- * .setRegion("region-934795532")
- * .setJobId("jobId101296568")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable
- *
- *
- * {@code
- * JobControllerSettings.Builder jobControllerSettingsBuilder = JobControllerSettings.newBuilder();
- * jobControllerSettingsBuilder
- * .submitJobSettings()
- * .setRetrySettings(
- * jobControllerSettingsBuilder
- * .submitJobSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * JobControllerSettings jobControllerSettings = jobControllerSettingsBuilder.build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class JobControllerSettings extends ClientSettings{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response =
- * workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * }
- *
- *
- *
- *
- * {@code
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- * WorkflowTemplateServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * }
- *
- * {@code
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- * WorkflowTemplateServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * }
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response =
- * workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param template Required. The Dataproc workflow template to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowTemplate createWorkflowTemplate(
- LocationName parent, WorkflowTemplate template) {
- CreateWorkflowTemplateRequest request =
- CreateWorkflowTemplateRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setTemplate(template)
- .build();
- return createWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates new workflow template.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response =
- * workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param template Required. The Dataproc workflow template to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowTemplate createWorkflowTemplate(
- RegionName parent, WorkflowTemplate template) {
- CreateWorkflowTemplateRequest request =
- CreateWorkflowTemplateRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setTemplate(template)
- .build();
- return createWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates new workflow template.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * String parent =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString();
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response =
- * workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param template Required. The Dataproc workflow template to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowTemplate createWorkflowTemplate(String parent, WorkflowTemplate template) {
- CreateWorkflowTemplateRequest request =
- CreateWorkflowTemplateRequest.newBuilder().setParent(parent).setTemplate(template).build();
- return createWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates new workflow template.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * CreateWorkflowTemplateRequest request =
- * CreateWorkflowTemplateRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setTemplate(WorkflowTemplate.newBuilder().build())
- * .build();
- * WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(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 WorkflowTemplate createWorkflowTemplate(CreateWorkflowTemplateRequest request) {
- return createWorkflowTemplateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates new workflow template.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * CreateWorkflowTemplateRequest request =
- * CreateWorkflowTemplateRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setTemplate(WorkflowTemplate.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name);
- * }
- * }
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowTemplate getWorkflowTemplate(WorkflowTemplateName name) {
- GetWorkflowTemplateRequest request =
- GetWorkflowTemplateRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Retrieves the latest workflow template.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * String name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString();
- * WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name);
- * }
- * }
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowTemplate getWorkflowTemplate(String name) {
- GetWorkflowTemplateRequest request =
- GetWorkflowTemplateRequest.newBuilder().setName(name).build();
- return getWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Retrieves the latest workflow template.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * GetWorkflowTemplateRequest request =
- * GetWorkflowTemplateRequest.newBuilder()
- * .setName(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setVersion(351608024)
- * .build();
- * WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(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 WorkflowTemplate getWorkflowTemplate(GetWorkflowTemplateRequest request) {
- return getWorkflowTemplateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Retrieves the latest workflow template.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * GetWorkflowTemplateRequest request =
- * GetWorkflowTemplateRequest.newBuilder()
- * .setName(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setVersion(351608024)
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name).get();
- * }
- * }
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * String name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString();
- * workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name).get();
- * }
- * }
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * Map
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param parameters Optional. Map from parameter names to values that should be used for those
- * parameters. Values may not exceed 100 characters.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * String name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString();
- * Map
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param parameters Optional. Map from parameter names to values that should be used for those
- * parameters. Values may not exceed 100 characters.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * InstantiateWorkflowTemplateRequest request =
- * InstantiateWorkflowTemplateRequest.newBuilder()
- * .setName(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setVersion(351608024)
- * .setInstanceId("instanceId902024336")
- * .setRequestId("requestId693933066")
- * .putAllParameters(new HashMap
- *
- * @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{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * InstantiateWorkflowTemplateRequest request =
- * InstantiateWorkflowTemplateRequest.newBuilder()
- * .setName(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setVersion(351608024)
- * .setInstanceId("instanceId902024336")
- * .setRequestId("requestId693933066")
- * .putAllParameters(new HashMap
- */
- public final OperationCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * InstantiateWorkflowTemplateRequest request =
- * InstantiateWorkflowTemplateRequest.newBuilder()
- * .setName(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setVersion(351608024)
- * .setInstanceId("instanceId902024336")
- * .setRequestId("requestId693933066")
- * .putAllParameters(new HashMap
- */
- public final UnaryCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param template Required. The workflow template to instantiate.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param template Required. The workflow template to instantiate.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * String parent =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString();
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @param template Required. The workflow template to instantiate.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * InstantiateInlineWorkflowTemplateRequest request =
- * InstantiateInlineWorkflowTemplateRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setTemplate(WorkflowTemplate.newBuilder().build())
- * .setInstanceId("instanceId902024336")
- * .setRequestId("requestId693933066")
- * .build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(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{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * InstantiateInlineWorkflowTemplateRequest request =
- * InstantiateInlineWorkflowTemplateRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setTemplate(WorkflowTemplate.newBuilder().build())
- * .setInstanceId("instanceId902024336")
- * .setRequestId("requestId693933066")
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * InstantiateInlineWorkflowTemplateRequest request =
- * InstantiateInlineWorkflowTemplateRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setTemplate(WorkflowTemplate.newBuilder().build())
- * .setInstanceId("instanceId902024336")
- * .setRequestId("requestId693933066")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response = workflowTemplateServiceClient.updateWorkflowTemplate(template);
- * }
- * }
- *
- * @param template Required. The updated workflow template.
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * UpdateWorkflowTemplateRequest request =
- * UpdateWorkflowTemplateRequest.newBuilder()
- * .setTemplate(WorkflowTemplate.newBuilder().build())
- * .build();
- * WorkflowTemplate response = workflowTemplateServiceClient.updateWorkflowTemplate(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 WorkflowTemplate updateWorkflowTemplate(UpdateWorkflowTemplateRequest request) {
- return updateWorkflowTemplateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates (replaces) workflow template. The updated template must contain version that matches
- * the current server version.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * UpdateWorkflowTemplateRequest request =
- * UpdateWorkflowTemplateRequest.newBuilder()
- * .setTemplate(WorkflowTemplate.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (WorkflowTemplate element :
- * workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(LocationName parent) {
- ListWorkflowTemplatesRequest request =
- ListWorkflowTemplatesRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listWorkflowTemplates(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists workflows that match the specified filter in the request.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * for (WorkflowTemplate element :
- * workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(RegionName parent) {
- ListWorkflowTemplatesRequest request =
- ListWorkflowTemplatesRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listWorkflowTemplates(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists workflows that match the specified filter in the request.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * String parent =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString();
- * for (WorkflowTemplate element :
- * workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(String parent) {
- ListWorkflowTemplatesRequest request =
- ListWorkflowTemplatesRequest.newBuilder().setParent(parent).build();
- return listWorkflowTemplates(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists workflows that match the specified filter in the request.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * ListWorkflowTemplatesRequest request =
- * ListWorkflowTemplatesRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (WorkflowTemplate element :
- * workflowTemplateServiceClient.listWorkflowTemplates(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @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 ListWorkflowTemplatesPagedResponse listWorkflowTemplates(
- ListWorkflowTemplatesRequest request) {
- return listWorkflowTemplatesPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists workflows that match the specified filter in the request.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * ListWorkflowTemplatesRequest request =
- * ListWorkflowTemplatesRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * ListWorkflowTemplatesRequest request =
- * ListWorkflowTemplatesRequest.newBuilder()
- * .setParent(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListWorkflowTemplatesResponse response =
- * workflowTemplateServiceClient.listWorkflowTemplatesCallable().call(request);
- * for (WorkflowTemplate element : response.getResponsesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * workflowTemplateServiceClient.deleteWorkflowTemplate(name);
- * }
- * }
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkflowTemplate(WorkflowTemplateName name) {
- DeleteWorkflowTemplateRequest request =
- DeleteWorkflowTemplateRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- deleteWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a workflow template. It does not cancel in-progress workflows.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * String name =
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString();
- * workflowTemplateServiceClient.deleteWorkflowTemplate(name);
- * }
- * }
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- *
- *
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkflowTemplate(String name) {
- DeleteWorkflowTemplateRequest request =
- DeleteWorkflowTemplateRequest.newBuilder().setName(name).build();
- deleteWorkflowTemplate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a workflow template. It does not cancel in-progress workflows.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * DeleteWorkflowTemplateRequest request =
- * DeleteWorkflowTemplateRequest.newBuilder()
- * .setName(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setVersion(351608024)
- * .build();
- * workflowTemplateServiceClient.deleteWorkflowTemplate(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 void deleteWorkflowTemplate(DeleteWorkflowTemplateRequest request) {
- deleteWorkflowTemplateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a workflow template. It does not cancel in-progress workflows.
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * DeleteWorkflowTemplateRequest request =
- * DeleteWorkflowTemplateRequest.newBuilder()
- * .setName(
- * WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
- * "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
- * .toString())
- * .setVersion(351608024)
- * .build();
- * ApiFuture
- */
- public final UnaryCallable
- *
- *
- * {@code
- * WorkflowTemplateServiceSettings.Builder workflowTemplateServiceSettingsBuilder =
- * WorkflowTemplateServiceSettings.newBuilder();
- * workflowTemplateServiceSettingsBuilder
- * .createWorkflowTemplateSettings()
- * .setRetrySettings(
- * workflowTemplateServiceSettingsBuilder
- * .createWorkflowTemplateSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- * workflowTemplateServiceSettingsBuilder.build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class WorkflowTemplateServiceSettings
- extends ClientSettings{@code
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- * AutoscalingPolicyServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * AutoscalingPolicy response =
- * autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
- * }
- * }
- *
- * {@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * String clusterName = "clusterName-1141738587";
- * Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- * }
- *
- * {@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "projectId-894832108";
- * String region = "region-934795532";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- * }
- *
- * {@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- * WorkflowTemplateServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response =
- * workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * }
- */
-@Generated("by gapic-generator-java")
-package com.google.cloud.dataproc.v1beta2;
-
-import javax.annotation.Generated;
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStub.java
deleted file mode 100644
index c51aa7c7..00000000
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStub.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2021 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.v1beta2.stub;
-
-import static com.google.cloud.dataproc.v1beta2.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.dataproc.v1beta2.AutoscalingPolicy;
-import com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest;
-import com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest;
-import com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest;
-import com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest;
-import com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse;
-import com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest;
-import com.google.protobuf.Empty;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS.
-/**
- * Base stub class for the AutoscalingPolicyService service API.
- *
- *
- *
- *
- * {@code
- * AutoscalingPolicyServiceStubSettings.Builder autoscalingPolicyServiceSettingsBuilder =
- * AutoscalingPolicyServiceStubSettings.newBuilder();
- * autoscalingPolicyServiceSettingsBuilder
- * .createAutoscalingPolicySettings()
- * .setRetrySettings(
- * autoscalingPolicyServiceSettingsBuilder
- * .createAutoscalingPolicySettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * AutoscalingPolicyServiceStubSettings autoscalingPolicyServiceSettings =
- * autoscalingPolicyServiceSettingsBuilder.build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class AutoscalingPolicyServiceStubSettings
- extends StubSettings
- *
- *
- * {@code
- * ClusterControllerStubSettings.Builder clusterControllerSettingsBuilder =
- * ClusterControllerStubSettings.newBuilder();
- * clusterControllerSettingsBuilder
- * .getClusterSettings()
- * .setRetrySettings(
- * clusterControllerSettingsBuilder
- * .getClusterSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * ClusterControllerStubSettings clusterControllerSettings =
- * clusterControllerSettingsBuilder.build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class ClusterControllerStubSettings extends StubSettings