diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java index 42681501..d85ce9d3 100644 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java +++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java @@ -5,7 +5,7 @@ * 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 + * 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, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.dataproc.v1; import com.google.api.core.ApiFunction; @@ -34,24 +35,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: The API interface for managing autoscaling policies in the Dataproc API. * *
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: * - *
- *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
- * }
- *
- *
- *
- * Note: close() needs to be called on the autoscalingPolicyServiceClient object to clean up + *
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(). * @@ -80,30 +71,28 @@ * *
To customize credentials: * - *
- *
+ * {@code
* AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
* AutoscalingPolicyServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
* AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
- *
- *
+ * }
*
- * To customize the endpoint:
+ * 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. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class AutoscalingPolicyServiceClient implements BackgroundResource { private final AutoscalingPolicyServiceSettings settings; private final AutoscalingPolicyServiceStub stub; @@ -125,7 +114,7 @@ public static final AutoscalingPolicyServiceClient create( /** * Constructs an instance of AutoscalingPolicyServiceClient, using the given stub for making - * calls. This is for advanced usage - prefer to use AutoscalingPolicyServiceSettings}. + * 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) { @@ -158,31 +147,26 @@ public AutoscalingPolicyServiceStub getStub() { return stub; } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates new autoscaling policy. * - *
Sample 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.
- * * For `projects.regions.autoscalingPolicies.create`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
* For `projects.locations.autoscalingPolicies.create`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` + *
Sample 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.
- * * For `projects.regions.autoscalingPolicies.create`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
* For `projects.locations.autoscalingPolicies.create`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent.toString(), policy);
- * }
- *
- *
* @param parent Required. The "resource name" of the region or location, as described in
* https://cloud.google.com/apis/design/resource_names.
- * * For `projects.regions.autoscalingPolicies.create`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
* For `projects.locations.autoscalingPolicies.create`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
- * .setParent(parent.toString())
- * .setPolicy(policy)
- * .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
*/
@@ -278,46 +238,23 @@ public final AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRe
return createAutoscalingPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new autoscaling policy.
*
* Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
- * .setParent(parent.toString())
- * .setPolicy(policy)
- * .build();
- * ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.createAutoscalingPolicyCallable().futureCall(request);
- * // Do something
- * AutoscalingPolicy response = future.get();
- * }
- *
*/
public final UnaryCallableDisabled check for update_mask, because all updates will be full replacements. * - *
Sample 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
*/
@@ -327,24 +264,12 @@ public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy)
return updateAutoscalingPolicy(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates (replaces) autoscaling policy.
*
* Disabled check for update_mask, because all updates will be full replacements. * - *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
- * .setPolicy(policy)
- * .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
*/
@@ -352,52 +277,36 @@ public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRe
return updateAutoscalingPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates (replaces) autoscaling policy.
*
* Disabled check for update_mask, because all updates will be full replacements. * *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
- * .setPolicy(policy)
- * .build();
- * ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request);
- * // Do something
- * AutoscalingPolicy response = future.get();
- * }
- *
*/
public final UnaryCallableSample 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.
- * * For `projects.regions.autoscalingPolicies.get`, the resource name of the policy - * has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
* For `projects.locations.autoscalingPolicies.get`, the resource name of the policy - * has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
- * AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name.toString());
- * }
- *
- *
* @param name Required. The "resource name" of the autoscaling policy, as described in
* https://cloud.google.com/apis/design/resource_names.
- * * For `projects.regions.autoscalingPolicies.get`, the resource name of the policy - * has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
* For `projects.locations.autoscalingPolicies.get`, the resource name of the policy - * has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
- * GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
- * .setName(name.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
*/
@@ -460,53 +353,35 @@ public final AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest
return getAutoscalingPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves autoscaling policy.
*
* Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
- * GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.getAutoscalingPolicyCallable().futureCall(request);
- * // Do something
- * AutoscalingPolicy response = future.get();
- * }
- *
*/
public final UnaryCallableSample 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.
- * * For `projects.regions.autoscalingPolicies.list`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
* For `projects.locations.autoscalingPolicies.list`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` + *
Sample 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.
- * * For `projects.regions.autoscalingPolicies.list`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
* For `projects.locations.autoscalingPolicies.list`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(parent.toString()).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.
- * * For `projects.regions.autoscalingPolicies.list`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
* For `projects.locations.autoscalingPolicies.list`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
- * .setParent(parent.toString())
- * .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
*/
@@ -600,85 +449,46 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
return listAutoscalingPoliciesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists autoscaling policies in the project.
*
* Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListAutoscalingPoliciesPagedResponse> future = autoscalingPolicyServiceClient.listAutoscalingPoliciesPagedCallable().futureCall(request);
- * // Do something
- * for (AutoscalingPolicy element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListAutoscalingPoliciesResponse response = autoscalingPolicyServiceClient.listAutoscalingPoliciesCallable().call(request);
- * for (AutoscalingPolicy element : response.getPoliciesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
*/
public final UnaryCallableSample 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.
- * * For `projects.regions.autoscalingPolicies.delete`, the resource name of the policy - * has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
* For `projects.locations.autoscalingPolicies.delete`, the resource name of the - * policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
- * autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name.toString());
- * }
- *
- *
* @param name Required. The "resource name" of the autoscaling policy, as described in
* https://cloud.google.com/apis/design/resource_names.
- * * For `projects.regions.autoscalingPolicies.delete`, the resource name of the policy - * has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
* For `projects.locations.autoscalingPolicies.delete`, the resource name of the - * policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + *
Sample code: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
- * DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
- * .setName(name.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
*/
@@ -743,24 +537,12 @@ public final void deleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest request
deleteAutoscalingPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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: - * - *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
- * DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = autoscalingPolicyServiceClient.deleteAutoscalingPolicyCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
*/
public final UnaryCallableFor example, to set the total timeout of createAutoscalingPolicy to 30 seconds: * - *
- *
+ * {@code
* AutoscalingPolicyServiceSettings.Builder autoscalingPolicyServiceSettingsBuilder =
* AutoscalingPolicyServiceSettings.newBuilder();
* autoscalingPolicyServiceSettingsBuilder
* .createAutoscalingPolicySettings()
* .setRetrySettings(
- * autoscalingPolicyServiceSettingsBuilder.createAutoscalingPolicySettings().getRetrySettings().toBuilder()
+ * autoscalingPolicyServiceSettingsBuilder
+ * .createAutoscalingPolicySettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = autoscalingPolicyServiceSettingsBuilder.build();
- *
- *
+ * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
+ * autoscalingPolicyServiceSettingsBuilder.build();
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class AutoscalingPolicyServiceSettings
extends ClientSettingsThis 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: * - *
- *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- *
- *
- *
- * Note: close() needs to be called on the clusterControllerClient object to clean up resources + *
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(). * @@ -87,30 +77,28 @@ * *
To customize credentials: * - *
- *
+ * {@code
* ClusterControllerSettings clusterControllerSettings =
* ClusterControllerSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* ClusterControllerClient clusterControllerClient =
* ClusterControllerClient.create(clusterControllerSettings);
- *
- *
+ * }
*
- * To customize the endpoint:
+ * To customize the endpoint: * - *
- *
+ * {@code
* ClusterControllerSettings clusterControllerSettings =
* ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
* ClusterControllerClient clusterControllerClient =
* ClusterControllerClient.create(clusterControllerSettings);
- *
- *
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class ClusterControllerClient implements BackgroundResource { private final ClusterControllerSettings settings; private final ClusterControllerStub stub; @@ -132,7 +120,7 @@ public static final ClusterControllerClient create(ClusterControllerSettings set /** * Constructs an instance of ClusterControllerClient, using the given stub for making calls. This - * is for advanced usage - prefer to use ClusterControllerSettings}. + * 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) { @@ -170,37 +158,22 @@ public ClusterControllerStub getStub() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public final OperationsClient getOperationsClient() { return operationsClient; } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a cluster in a project. The returned * [Operation.metadata][google.longrunning.Operation.metadata] will be * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). * - *
Sample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * 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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * CreateClusterRequest request = CreateClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setCluster(cluster)
- * .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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * CreateClusterRequest request = CreateClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setCluster(cluster)
- * .build();
- * OperationFuture<Cluster, ClusterOperationMetadata> future = clusterControllerClient.createClusterOperationCallable().futureCall(request);
- * // Do something
- * Cluster response = future.get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * CreateClusterRequest request = CreateClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setCluster(cluster)
- * .build();
- * ApiFuture<Operation> future = clusterControllerClient.createClusterCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * 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.
@@ -348,8 +257,6 @@ public final UnaryCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .setCluster(cluster)
- * .setUpdateMask(updateMask)
- * .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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .setCluster(cluster)
- * .setUpdateMask(updateMask)
- * .build();
- * OperationFuture<Cluster, ClusterOperationMetadata> future = clusterControllerClient.updateClusterOperationCallable().futureCall(request);
- * // Do something
- * Cluster response = future.get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .setCluster(cluster)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Operation> future = clusterControllerClient.updateClusterCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * 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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .build();
- * OperationFuture<Empty, ClusterOperationMetadata> future = clusterControllerClient.deleteClusterOperationCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .build();
- * ApiFuture<Operation> future = clusterControllerClient.deleteClusterCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * DiagnoseClusterResults response = 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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFutureSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .build();
- * DiagnoseClusterResults response = 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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFutureSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .build();
- * OperationFuture<DiagnoseClusterResults, ClusterOperationMetadata> future = clusterControllerClient.diagnoseClusterOperationCallable().futureCall(request);
- * // Do something
- * DiagnoseClusterResults response = future.get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata>
- diagnoseClusterOperationCallable() {
- return stub.diagnoseClusterOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Gets cluster diagnostic information. The returned
- * [Operation.metadata][google.longrunning.Operation.metadata] will be
- * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
- * After the operation completes, [Operation.response][google.longrunning.Operation.response]
- * contains
- * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
- *
- * Sample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .build();
- * ApiFuture<Operation> future = clusterControllerClient.diagnoseClusterCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- */
- public final UnaryCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * 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.
@@ -761,26 +391,10 @@ public final Cluster getCluster(String projectId, String region, String clusterN
return getCluster(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the resource representation for a cluster in a project.
*
- * Sample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * GetClusterRequest request = GetClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .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
*/
@@ -788,48 +402,20 @@ public final Cluster getCluster(GetClusterRequest request) {
return getClusterCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the resource representation for a cluster in a project.
*
* Sample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * GetClusterRequest request = GetClusterRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setClusterName(clusterName)
- * .build();
- * ApiFuture<Cluster> future = clusterControllerClient.getClusterCallable().futureCall(request);
- * // Do something
- * Cluster response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * 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.
@@ -841,23 +427,10 @@ public final ListClustersPagedResponse listClusters(String projectId, String reg
return listClusters(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all regions/{region}/clusters in a project alphabetically.
*
- * Sample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String filter = "";
- * 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.
@@ -888,26 +461,10 @@ public final ListClustersPagedResponse listClusters(
return listClusters(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all regions/{region}/clusters in a project alphabetically.
*
- * Sample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * ListClustersRequest request = ListClustersRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .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
*/
@@ -915,66 +472,102 @@ public final ListClustersPagedResponse listClusters(ListClustersRequest request)
return listClustersPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all regions/{region}/clusters in a project alphabetically.
*
* Sample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * ListClustersRequest request = ListClustersRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .build();
- * ApiFuture<ListClustersPagedResponse> future = clusterControllerClient.listClustersPagedCallable().futureCall(request);
- * // Do something
- * for (Cluster element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * ListClustersRequest request = ListClustersRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .build();
- * while (true) {
- * ListClustersResponse response = clusterControllerClient.listClustersCallable().call(request);
- * for (Cluster element : response.getClustersList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
*/
public final UnaryCallableSample code: + */ + public final OperationCallable< + DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> + diagnoseClusterOperationCallable() { + return stub.diagnoseClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets cluster diagnostic information. The returned + * [Operation.metadata][google.longrunning.Operation.metadata] will be + * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). + * After the operation completes, [Operation.response][google.longrunning.Operation.response] + * contains + * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). + * + *
Sample code:
+ */
+ public final UnaryCallable For example, to set the total timeout of getCluster to 30 seconds:
*
- * 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
+ * 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
@@ -84,30 +74,26 @@
*
* To customize credentials:
*
- * To customize the endpoint:
*
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator")
public class JobControllerClient implements BackgroundResource {
private final JobControllerSettings settings;
private final JobControllerStub stub;
@@ -129,7 +115,7 @@ public static final JobControllerClient create(JobControllerSettings settings)
/**
* Constructs an instance of JobControllerClient, using the given stub for making calls. This is
- * for advanced usage - prefer to use JobControllerSettings}.
+ * 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) {
@@ -167,27 +153,14 @@ public JobControllerStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationsClient getOperationsClient() {
return operationsClient;
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * For example, to set the total timeout of submitJob to 30 seconds:
*
- * 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
+ * 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().
*
@@ -85,30 +76,28 @@
*
* To customize credentials:
*
- * To customize the endpoint:
*
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator")
public class WorkflowTemplateServiceClient implements BackgroundResource {
private final WorkflowTemplateServiceSettings settings;
private final WorkflowTemplateServiceStub stub;
@@ -130,7 +119,7 @@ public static final WorkflowTemplateServiceClient create(WorkflowTemplateService
/**
* Constructs an instance of WorkflowTemplateServiceClient, using the given stub for making calls.
- * This is for advanced usage - prefer to use WorkflowTemplateServiceSettings}.
+ * 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) {
@@ -169,13 +158,195 @@ public WorkflowTemplateServiceStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationsClient getOperationsClient() {
return operationsClient;
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates new workflow template.
+ *
+ * @param parent Required. The resource name of the region or location, as described in
+ * https://cloud.google.com/apis/design/resource_names.
+ * Sample code:
+ */
+ public final UnaryCallable Can retrieve previously instantiated template by specifying optional version parameter.
+ *
+ * @param name Required. The resource name of the workflow template, as described in
+ * https://cloud.google.com/apis/design/resource_names.
+ * Can retrieve previously instantiated template by specifying optional version parameter.
+ *
+ * @param name Required. The resource name of the workflow template, as described in
+ * https://cloud.google.com/apis/design/resource_names.
+ * Can retrieve previously instantiated template by specifying optional version parameter.
+ *
+ * @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.
+ *
+ * Can retrieve previously instantiated template by specifying optional version parameter.
+ *
+ * Sample code:
+ */
+ public final UnaryCallable On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
+ * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
+ * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
+ * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
+ * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates,instantiateinline`, the resource name of
- * the region has the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.instantiateinline`, the resource name of
- * the location has the following format: `projects/{project_id}/locations/{location}`
+ * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates,instantiateinline`, the resource name of
- * the region has the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.instantiateinline`, the resource name of
- * the location has the following format: `projects/{project_id}/locations/{location}`
+ * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates,instantiateinline`, the resource name of
- * the region has the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.instantiateinline`, the resource name of
- * the location has the following format: `projects/{project_id}/locations/{location}`
+ * On successful completion, [Operation.response][google.longrunning.Operation.response] will
* be [Empty][google.protobuf.Empty].
*
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates,create`, the resource name of the region
- * has the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.create`, the resource name of the
- * location has the following format: `projects/{project_id}/locations/{location}`
- * @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.
- *
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates,create`, the resource name of the region
- * has the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.create`, the resource name of the
- * location has the following format: `projects/{project_id}/locations/{location}`
- * @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.
- *
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates,create`, the resource name of the region
- * has the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.create`, the resource name of the
- * location has the following format: `projects/{project_id}/locations/{location}`
- * @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.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates.get`, the resource name of the template
- * has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.get`, the resource name of the template
- * has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
- * @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.
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates.get`, the resource name of the template
- * has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.get`, the resource name of the template
- * has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
- * @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.
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * Sample code:
- *
- * Can retrieve previously instantiated template by specifying optional version parameter.
- *
- * 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
@@ -1095,23 +867,11 @@ public final WorkflowTemplate updateWorkflowTemplate(WorkflowTemplate template)
return updateWorkflowTemplate(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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:
- *
- * * For `projects.regions.workflowTemplates,list`, the resource name of the region has
- * the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.list`, the resource name of the location
- * has the following format: `projects/{project_id}/locations/{location}`
+ * Sample code:
- *
- * * For `projects.regions.workflowTemplates,list`, the resource name of the region has
- * the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.list`, the resource name of the location
- * has the following format: `projects/{project_id}/locations/{location}`
+ * Sample code:
- *
- * * For `projects.regions.workflowTemplates,list`, the resource name of the region has
- * the following format: `projects/{project_id}/regions/{region}`
- * * For `projects.locations.workflowTemplates.list`, the resource name of the location
- * has the following format: `projects/{project_id}/locations/{location}`
+ * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * * For `projects.regions.workflowTemplates.delete`, the resource name of the template
- * has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
+ * Sample code:
- *
- * * For `projects.regions.workflowTemplates.delete`, the resource name of the template
- * has the following format:
- * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
- * * For `projects.locations.workflowTemplates.instantiate`, the resource name of the
- * template has the following format:
- * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
+ * Sample code:
- *
- * Sample code:
- *
- * For example, to set the total timeout of createWorkflowTemplate to 30 seconds:
*
- * The interfaces provided are listed below, along with usage samples.
- *
- * ============================== AutoscalingPolicyServiceClient ==============================
+ * ======================= AutoscalingPolicyServiceClient =======================
*
* Service Description: The API interface for managing autoscaling policies in the 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.
*/
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class AutoscalingPolicyServiceStub implements BackgroundResource {
public UnaryCallable For example, to set the total timeout of createAutoscalingPolicy to 30 seconds:
*
- * This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class ClusterControllerStub implements BackgroundResource {
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable For example, to set the total timeout of getCluster to 30 seconds:
*
- * This class is for advanced usage.
*/
@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public class GrpcAutoscalingPolicyServiceCallableFactory implements GrpcStubCallableFactory {
+
@Override
public
- *
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class ClusterControllerSettings extends ClientSettings
+ *
- * {@code
* ClusterControllerSettings.Builder clusterControllerSettingsBuilder =
* ClusterControllerSettings.newBuilder();
* clusterControllerSettingsBuilder
* .getClusterSettings()
* .setRetrySettings(
- * clusterControllerSettingsBuilder.getClusterSettings().getRetrySettings().toBuilder()
+ * clusterControllerSettingsBuilder
+ * .getClusterSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ClusterControllerSettings clusterControllerSettings = clusterControllerSettingsBuilder.build();
- *
- *
- *
- *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- *
- *
- *
+ * JobControllerClient jobControllerClient = JobControllerClient.create(jobControllerSettings);
+ * }
*
- * To customize the endpoint:
+ *
+ *
- * {@code
* JobControllerSettings jobControllerSettings =
* JobControllerSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
- * JobControllerClient jobControllerClient =
- * JobControllerClient.create(jobControllerSettings);
- *
- *
+ * JobControllerClient jobControllerClient = JobControllerClient.create(jobControllerSettings);
+ * }
+ *
+ *
+ *
- * {@code
* JobControllerSettings jobControllerSettings =
* JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * JobControllerClient jobControllerClient =
- * JobControllerClient.create(jobControllerSettings);
- *
- *
* @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.
@@ -199,26 +172,10 @@ public final Job submitJob(String projectId, String region, Job job) {
return submitJob(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Submits a job to a cluster.
*
- *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- *
- *
* @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
*/
@@ -226,54 +183,25 @@ public final Job submitJob(SubmitJobRequest request) {
return submitJobCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Submits a job to a cluster.
*
*
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * SubmitJobRequest request = SubmitJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJob(job)
- * .build();
- * Job response = jobControllerClient.submitJob(request);
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * SubmitJobRequest request = SubmitJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJob(job)
- * .build();
- * ApiFuture<Job> future = jobControllerClient.submitJobCallable().futureCall(request);
- * // Do something
- * Job response = future.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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJobAsOperationAsync(projectId, region, job).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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * SubmitJobRequest request = SubmitJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJob(job)
- * .build();
- * Job response = jobControllerClient.submitJobAsOperationAsync(request).get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * SubmitJobRequest request = SubmitJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJob(job)
- * .build();
- * OperationFuture<Job, JobMetadata> future = jobControllerClient.submitJobAsOperationOperationCallable().futureCall(request);
- * // Do something
- * Job response = future.get();
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * SubmitJobRequest request = SubmitJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJob(job)
- * .build();
- * ApiFuture<Operation> future = jobControllerClient.submitJobAsOperationCallable().futureCall(request);
- * // Do something
- * Operation response = future.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 jobId Required. The job ID.
@@ -395,26 +261,10 @@ public final Job getJob(String projectId, String region, String jobId) {
return getJob(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the resource representation for a job in a project.
*
- *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * Job response = jobControllerClient.getJob(projectId, region, jobId);
- * }
- *
- *
* @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
*/
@@ -422,48 +272,20 @@ public final Job getJob(GetJobRequest request) {
return getJobCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the resource representation for a job in a project.
*
*
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * GetJobRequest request = GetJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .build();
- * Job response = jobControllerClient.getJob(request);
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * GetJobRequest request = GetJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .build();
- * ApiFuture<Job> future = jobControllerClient.getJobCallable().futureCall(request);
- * // Do something
- * Job response = future.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.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -474,23 +296,10 @@ public final ListJobsPagedResponse listJobs(String projectId, String region) {
return listJobs(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists regions/{region}/jobs in a project.
*
- *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * 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.
* @param filter Optional. A filter constraining the jobs to list. Filters are case-sensitive and
@@ -514,26 +323,10 @@ public final ListJobsPagedResponse listJobs(String projectId, String region, Str
return listJobs(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists regions/{region}/jobs in a project.
*
- *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String filter = "";
- * for (Job element : jobControllerClient.listJobs(projectId, region, filter).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
*/
@@ -541,89 +334,30 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) {
return listJobsPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists regions/{region}/jobs in a project.
*
*
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * ListJobsRequest request = ListJobsRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .build();
- * for (Job element : jobControllerClient.listJobs(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * ListJobsRequest request = ListJobsRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .build();
- * ApiFuture<ListJobsPagedResponse> future = jobControllerClient.listJobsPagedCallable().futureCall(request);
- * // Do something
- * for (Job element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * ListJobsRequest request = ListJobsRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .build();
- * while (true) {
- * ListJobsResponse response = jobControllerClient.listJobsCallable().call(request);
- * for (Job element : response.getJobsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
- *
* @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
*/
@@ -631,54 +365,23 @@ public final Job updateJob(UpdateJobRequest request) {
return updateJobCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a job in a project.
*
*
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * Job job = Job.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateJobRequest request = UpdateJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .setJob(job)
- * .setUpdateMask(updateMask)
- * .build();
- * Job response = jobControllerClient.updateJob(request);
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * Job job = Job.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateJobRequest request = UpdateJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .setJob(job)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Job> future = jobControllerClient.updateJobCallable().futureCall(request);
- * // Do something
- * Job response = future.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 jobId Required. The job ID.
@@ -694,29 +397,13 @@ public final Job cancelJob(String projectId, String region, String jobId) {
return cancelJob(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts a job cancellation request. To access the job resource after cancellation, call
* [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
* or
* [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
*
- *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * Job response = jobControllerClient.cancelJob(projectId, region, jobId);
- * }
- *
- *
* @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
*/
@@ -724,7 +411,7 @@ public final Job cancelJob(CancelJobRequest request) {
return cancelJobCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts a job cancellation request. To access the job resource after cancellation, call
* [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
@@ -732,43 +419,16 @@ public final Job cancelJob(CancelJobRequest request) {
* [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
*
*
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * CancelJobRequest request = CancelJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .build();
- * Job response = jobControllerClient.cancelJob(request);
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * CancelJobRequest request = CancelJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .build();
- * ApiFuture<Job> future = jobControllerClient.cancelJobCallable().futureCall(request);
- * // Do something
- * Job response = future.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 jobId Required. The job ID.
@@ -784,27 +444,11 @@ public final void deleteJob(String projectId, String region, String jobId) {
deleteJob(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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`.
*
- *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * jobControllerClient.deleteJob(projectId, region, jobId);
- * }
- *
- *
* @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
*/
@@ -812,28 +456,12 @@ public final void deleteJob(DeleteJobRequest request) {
deleteJobCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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`.
*
*
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * DeleteJobRequest request = DeleteJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .build();
- * jobControllerClient.deleteJob(request);
- * }
- *
*/
public final UnaryCallable
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String jobId = "";
- * DeleteJobRequest request = DeleteJobRequest.newBuilder()
- * .setProjectId(projectId)
- * .setRegion(region)
- * .setJobId(jobId)
- * .build();
- * ApiFuture<Void> future = jobControllerClient.deleteJobCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- *
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class JobControllerSettings extends ClientSettings
- * JobControllerSettings.Builder jobControllerSettingsBuilder =
- * JobControllerSettings.newBuilder();
+ *
- * {@code
+ * JobControllerSettings.Builder jobControllerSettingsBuilder = JobControllerSettings.newBuilder();
* jobControllerSettingsBuilder
* .submitJobSettings()
* .setRetrySettings(
- * jobControllerSettingsBuilder.submitJobSettings().getRetrySettings().toBuilder()
+ * jobControllerSettingsBuilder
+ * .submitJobSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* JobControllerSettings jobControllerSettings = jobControllerSettingsBuilder.build();
- *
- *
- *
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- *
- *
- *
+ * }
*
- * To customize the endpoint:
+ *
+ *
- * {@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);
- *
+ *
+ *
+ *
+ *
+ * @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.
+ *
+ * @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.
+ *
+ * @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.
+ *
+ * @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.
+ *
+ *
+ *
+ *
+ *
+ *
+ * @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.
+ *
+ *
+ *
+ *
+ *
+ *
+ * @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.
+ *
+ *
- *
* @param name Required. The resource name of the workflow template, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name).get();
- * }
- *
+ *
+ *
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- *
* @param name Required. The resource name of the workflow template, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString()).get();
- * }
- *
+ *
+ *
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- *
* @param name Required. The resource name of the workflow template, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * Map<String, String> parameters = new HashMap<>();
- * workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name, parameters).get();
- * }
- *
+ *
+ *
+ *
+ *
* @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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- *
* @param name Required. The resource name of the workflow template, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * Map<String, String> parameters = new HashMap<>();
- * workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString(), parameters).get();
- * }
- *
+ *
+ *
+ *
+ *
* @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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- *
* @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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(request).get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<Empty, WorkflowMetadata> future = workflowTemplateServiceClient.instantiateWorkflowTemplateOperationCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
*/
public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = workflowTemplateServiceClient.instantiateWorkflowTemplateCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- *
* @param parent Required. The resource name of the region or location, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
- * }
- *
+ *
+ *
+ *
+ *
* @param template Required. The workflow template to instantiate.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- *
* @param parent Required. The resource name of the region or location, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
- * }
- *
+ *
+ *
+ *
+ *
* @param template Required. The workflow template to instantiate.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- *
* @param parent Required. The resource name of the region or location, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent.toString(), template).get();
- * }
- *
+ *
+ *
+ *
+ *
* @param template Required. The workflow template to instantiate.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- *
* @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
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTemplate(template)
- * .build();
- * workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(request).get();
- * }
- *
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTemplate(template)
- * .build();
- * OperationFuture<Empty, WorkflowMetadata> future = workflowTemplateServiceClient.instantiateInlineWorkflowTemplateOperationCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
*/
public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTemplate(template)
- * .build();
- * ApiFuture<Operation> future = workflowTemplateServiceClient.instantiateInlineWorkflowTemplateCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the region or location, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- * 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.
- *
- * 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.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent.toString(), template);
- * }
- *
- *
- * @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.
- *
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * CreateWorkflowTemplateRequest request = CreateWorkflowTemplateRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTemplate(template)
- * .build();
- * WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(request);
- * }
- *
- */
- public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * CreateWorkflowTemplateRequest request = CreateWorkflowTemplateRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTemplate(template)
- * .build();
- * ApiFuture<WorkflowTemplate> future = workflowTemplateServiceClient.createWorkflowTemplateCallable().futureCall(request);
- * // Do something
- * WorkflowTemplate response = future.get();
- * }
- *
- *
- * @param name Required. The resource name of the workflow template, as described in
- * https://cloud.google.com/apis/design/resource_names.
- *
- * 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.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name.toString());
- * }
- *
- *
- * @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.
- *
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(request);
- * }
- *
- */
- public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<WorkflowTemplate> future = workflowTemplateServiceClient.getWorkflowTemplateCallable().futureCall(request);
- * // Do something
- * WorkflowTemplate response = future.get();
- * }
- *
- *
* @param template Required. The updated workflow template.
*
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response = workflowTemplateServiceClient.updateWorkflowTemplate(template);
- * }
- *
- *
* @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
*/
@@ -1119,54 +879,36 @@ public final WorkflowTemplate updateWorkflowTemplate(UpdateWorkflowTemplateReque
return updateWorkflowTemplateCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates (replaces) workflow template. The updated template must contain version that matches
* the current server version.
*
*
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * UpdateWorkflowTemplateRequest request = UpdateWorkflowTemplateRequest.newBuilder()
- * .setTemplate(template)
- * .build();
- * WorkflowTemplate response = workflowTemplateServiceClient.updateWorkflowTemplate(request);
- * }
- *
*/
public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * UpdateWorkflowTemplateRequest request = UpdateWorkflowTemplateRequest.newBuilder()
- * .setTemplate(template)
- * .build();
- * ApiFuture<WorkflowTemplate> future = workflowTemplateServiceClient.updateWorkflowTemplateCallable().futureCall(request);
- * // Do something
- * WorkflowTemplate response = future.get();
- * }
- *
- *
* @param parent Required. The resource name of the region or location, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
+ *
+ *
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(RegionName parent) {
+ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(LocationName parent) {
ListWorkflowTemplatesRequest request =
ListWorkflowTemplatesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
@@ -1174,30 +916,24 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(RegionName
return listWorkflowTemplates(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists workflows that match the specified filter in the request.
*
- *
- *
* @param parent Required. The resource name of the region or location, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
+ *
+ *
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(LocationName parent) {
+ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(RegionName parent) {
ListWorkflowTemplatesRequest request =
ListWorkflowTemplatesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
@@ -1205,27 +941,21 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(LocationNa
return listWorkflowTemplates(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists workflows that match the specified filter in the request.
*
- *
- *
* @param parent Required. The resource name of the region or location, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(parent.toString()).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
+ *
+ *
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(String parent) {
@@ -1234,24 +964,10 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(String par
return listWorkflowTemplates(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists workflows that match the specified filter in the 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
*/
@@ -1260,84 +976,45 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(
return listWorkflowTemplatesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists workflows that match the specified filter in the request.
*
*
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListWorkflowTemplatesPagedResponse> future = workflowTemplateServiceClient.listWorkflowTemplatesPagedCallable().futureCall(request);
- * // Do something
- * for (WorkflowTemplate element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
*/
public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListWorkflowTemplatesResponse response = workflowTemplateServiceClient.listWorkflowTemplatesCallable().call(request);
- * for (WorkflowTemplate element : response.getTemplatesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
- *
* @param name Required. The resource name of the workflow template, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * workflowTemplateServiceClient.deleteWorkflowTemplate(name);
- * }
- *
+ *
+ *
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteWorkflowTemplate(WorkflowTemplateName name) {
@@ -1348,27 +1025,23 @@ public final void deleteWorkflowTemplate(WorkflowTemplateName name) {
deleteWorkflowTemplate(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a workflow template. It does not cancel in-progress workflows.
*
- *
- *
* @param name Required. The resource name of the workflow template, as described in
* https://cloud.google.com/apis/design/resource_names.
- *
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * workflowTemplateServiceClient.deleteWorkflowTemplate(name.toString());
- * }
- *
+ *
+ *
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteWorkflowTemplate(String name) {
@@ -1377,22 +1050,10 @@ public final void deleteWorkflowTemplate(String name) {
deleteWorkflowTemplate(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a workflow template. It does not cancel in-progress workflows.
*
- *
- *
* @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
*/
@@ -1400,23 +1061,11 @@ public final void deleteWorkflowTemplate(DeleteWorkflowTemplateRequest request)
deleteWorkflowTemplateCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a workflow template. It does not cancel in-progress workflows.
*
*
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * workflowTemplateServiceClient.deleteWorkflowTemplate(request);
- * }
- *
*/
public final UnaryCallable
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
- * DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = workflowTemplateServiceClient.deleteWorkflowTemplateCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- *
+ * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
+ * workflowTemplateServiceSettingsBuilder.build();
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class WorkflowTemplateServiceSettings
extends ClientSettings
+ *
- * {@code
* WorkflowTemplateServiceSettings.Builder workflowTemplateServiceSettingsBuilder =
* WorkflowTemplateServiceSettings.newBuilder();
* workflowTemplateServiceSettingsBuilder
* .createWorkflowTemplateSettings()
* .setRetrySettings(
- * workflowTemplateServiceSettingsBuilder.createWorkflowTemplateSettings().getRetrySettings().toBuilder()
+ * workflowTemplateServiceSettingsBuilder
+ * .createWorkflowTemplateSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings = workflowTemplateServiceSettingsBuilder.build();
- *
- *
- *
- * ======================= ClusterControllerClient =======================
+ *
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- * AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
- * }
- *
- *
- *
- *
- * =================== JobControllerClient ===================
+ *
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * String clusterName = "";
- * Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- *
- *
- *
- *
- * ============================= WorkflowTemplateServiceClient =============================
+ *
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- * String projectId = "";
- * String region = "";
- * Job job = Job.newBuilder().build();
- * Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- *
- *
- *
*/
-@Generated("by gapic-generator")
+@Generated("by gapic-generator-java")
package com.google.cloud.dataproc.v1;
import javax.annotation.Generated;
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java
index 01685310..af1cf752 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.cloud.dataproc.v1.stub;
import static com.google.cloud.dataproc.v1.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.v1.AutoscalingPolicy;
@@ -30,14 +30,13 @@
import com.google.protobuf.Empty;
import javax.annotation.Generated;
-// AUTO-GENERATED DOCUMENTATION AND CLASS
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Base stub class for Cloud Dataproc API.
+ * Base stub class for the AutoscalingPolicyService service API.
*
*
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- * RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- * WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- * WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- *
- *
- *
+ * AutoscalingPolicyServiceStubSettings autoscalingPolicyServiceSettings =
+ * autoscalingPolicyServiceSettingsBuilder.build();
+ * }
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator-java")
public class AutoscalingPolicyServiceStubSettings
extends StubSettings
+ *
- * {@code
* AutoscalingPolicyServiceStubSettings.Builder autoscalingPolicyServiceSettingsBuilder =
* AutoscalingPolicyServiceStubSettings.newBuilder();
* autoscalingPolicyServiceSettingsBuilder
* .createAutoscalingPolicySettings()
* .setRetrySettings(
- * autoscalingPolicyServiceSettingsBuilder.createAutoscalingPolicySettings().getRetrySettings().toBuilder()
+ * autoscalingPolicyServiceSettingsBuilder
+ * .createAutoscalingPolicySettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
- * AutoscalingPolicyServiceStubSettings autoscalingPolicyServiceSettings = autoscalingPolicyServiceSettingsBuilder.build();
- *
- *
+ * ClusterControllerStubSettings clusterControllerSettings =
+ * clusterControllerSettingsBuilder.build();
+ * }
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator-java")
public class ClusterControllerStubSettings extends StubSettings
+ *
- * {@code
* ClusterControllerStubSettings.Builder clusterControllerSettingsBuilder =
* ClusterControllerStubSettings.newBuilder();
* clusterControllerSettingsBuilder
* .getClusterSettings()
* .setRetrySettings(
- * clusterControllerSettingsBuilder.getClusterSettings().getRetrySettings().toBuilder()
+ * clusterControllerSettingsBuilder
+ * .getClusterSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
- * ClusterControllerStubSettings clusterControllerSettings = clusterControllerSettingsBuilder.build();
- *