diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceClient.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceClient.java index de718d1..2ee145f 100644 --- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceClient.java +++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceClient.java @@ -56,8 +56,11 @@ * calls that map to API methods. Sample code to get started: * *
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Job job = Job.newBuilder().build();
@@ -95,8 +98,11 @@
* To customize credentials:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings batchServiceSettings =
* BatchServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -107,8 +113,11 @@
* To customize the endpoint:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings batchServiceSettings =
* BatchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* BatchServiceClient batchServiceClient = BatchServiceClient.create(batchServiceSettings);
@@ -118,8 +127,11 @@
* the wire:
*
* {@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings batchServiceSettings =
* BatchServiceSettings.newBuilder()
* .setTransportChannelProvider(
@@ -211,8 +223,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Job job = Job.newBuilder().build();
@@ -249,8 +264,11 @@ public final Job createJob(LocationName parent, Job job, String jobId) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* Job job = Job.newBuilder().build();
@@ -283,8 +301,11 @@ public final Job createJob(String parent, Job job, String jobId) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* CreateJobRequest request =
* CreateJobRequest.newBuilder()
@@ -311,8 +332,11 @@ public final Job createJob(CreateJobRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* CreateJobRequest request =
* CreateJobRequest.newBuilder()
@@ -338,8 +362,11 @@ public final UnaryCallable createJobCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
* Job response = batchServiceClient.getJob(name);
@@ -362,8 +389,11 @@ public final Job getJob(JobName name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString();
* Job response = batchServiceClient.getJob(name);
@@ -385,8 +415,11 @@ public final Job getJob(String name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetJobRequest request =
* GetJobRequest.newBuilder()
@@ -410,8 +443,11 @@ public final Job getJob(GetJobRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetJobRequest request =
* GetJobRequest.newBuilder()
@@ -434,8 +470,11 @@ public final UnaryCallable getJobCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String name = "name3373707";
* batchServiceClient.deleteJobAsync(name).get();
@@ -457,8 +496,11 @@ public final OperationFuture deleteJobAsync(String nam
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* DeleteJobRequest request =
* DeleteJobRequest.newBuilder()
@@ -484,8 +526,11 @@ public final OperationFuture deleteJobAsync(DeleteJobR
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* DeleteJobRequest request =
* DeleteJobRequest.newBuilder()
@@ -512,8 +557,11 @@ public final OperationFuture deleteJobAsync(DeleteJobR
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* DeleteJobRequest request =
* DeleteJobRequest.newBuilder()
@@ -538,8 +586,11 @@ public final UnaryCallable deleteJobCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String parent = "parent-995424086";
* for (Job element : batchServiceClient.listJobs(parent).iterateAll()) {
@@ -563,8 +614,11 @@ public final ListJobsPagedResponse listJobs(String parent) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListJobsRequest request =
* ListJobsRequest.newBuilder()
@@ -593,8 +647,11 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListJobsRequest request =
* ListJobsRequest.newBuilder()
@@ -622,8 +679,11 @@ public final UnaryCallable listJobsPaged
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListJobsRequest request =
* ListJobsRequest.newBuilder()
@@ -658,8 +718,11 @@ public final UnaryCallable listJobsCallable()
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]");
* Task response = batchServiceClient.getTask(name);
@@ -682,8 +745,11 @@ public final Task getTask(TaskName name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String name =
* TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]").toString();
@@ -706,8 +772,11 @@ public final Task getTask(String name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetTaskRequest request =
* GetTaskRequest.newBuilder()
@@ -733,8 +802,11 @@ public final Task getTask(GetTaskRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetTaskRequest request =
* GetTaskRequest.newBuilder()
@@ -759,8 +831,11 @@ public final UnaryCallable getTaskCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TaskGroupName parent = TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]");
* for (Task element : batchServiceClient.listTasks(parent).iterateAll()) {
@@ -786,8 +861,11 @@ public final ListTasksPagedResponse listTasks(TaskGroupName parent) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String parent =
* TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]").toString();
@@ -813,8 +891,11 @@ public final ListTasksPagedResponse listTasks(String parent) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListTasksRequest request =
* ListTasksRequest.newBuilder()
@@ -844,8 +925,11 @@ public final ListTasksPagedResponse listTasks(ListTasksRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListTasksRequest request =
* ListTasksRequest.newBuilder()
@@ -874,8 +958,11 @@ public final UnaryCallable listTasksPa
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListTasksRequest request =
* ListTasksRequest.newBuilder()
@@ -911,8 +998,11 @@ public final UnaryCallable listTasksCallabl
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
@@ -941,8 +1031,11 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
@@ -972,8 +1065,11 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
@@ -1008,8 +1104,11 @@ public final UnaryCallable listLoca
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
* Location response = batchServiceClient.getLocation(request);
@@ -1030,8 +1129,11 @@ public final Location getLocation(GetLocationRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
* ApiFuture future = batchServiceClient.getLocationCallable().futureCall(request);
@@ -1053,8 +1155,11 @@ public final UnaryCallable getLocationCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
@@ -1082,8 +1187,11 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
@@ -1109,8 +1217,11 @@ public final UnaryCallable setIamPolicyCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
@@ -1136,8 +1247,11 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
@@ -1166,8 +1280,11 @@ public final UnaryCallable getIamPolicyCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
@@ -1197,8 +1314,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java
index 596d09a..8db69ee 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java
@@ -67,16 +67,16 @@
* For example, to set the total timeout of createJob to 30 seconds:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings.Builder batchServiceSettingsBuilder = BatchServiceSettings.newBuilder();
* batchServiceSettingsBuilder
* .createJobSettings()
* .setRetrySettings(
- * batchServiceSettingsBuilder
- * .createJobSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * batchServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* BatchServiceSettings batchServiceSettings = batchServiceSettingsBuilder.build();
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java
index e675510..4662f0d 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/package-info.java
@@ -27,8 +27,11 @@
* Sample for BatchServiceClient:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Job job = Job.newBuilder().build();
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java
index d05a7a3..cf7136c 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStubSettings.java
@@ -98,17 +98,17 @@
* For example, to set the total timeout of createJob to 30 seconds:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceStubSettings.Builder batchServiceSettingsBuilder =
* BatchServiceStubSettings.newBuilder();
* batchServiceSettingsBuilder
* .createJobSettings()
* .setRetrySettings(
- * batchServiceSettingsBuilder
- * .createJobSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * batchServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* BatchServiceStubSettings batchServiceSettings = batchServiceSettingsBuilder.build();
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java
index 76e9229..33de228 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/HttpJsonBatchServiceStub.java
@@ -107,7 +107,8 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
return fields;
})
.setRequestBodyExtractor(
- request -> ProtoRestSerializer.create().toBody("job", request.getJob()))
+ request ->
+ ProtoRestSerializer.create().toBody("job", request.getJob(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -385,7 +386,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearResource().build()))
+ .toBody("*", request.toBuilder().clearResource().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -460,7 +461,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearResource().build()))
+ .toBody("*", request.toBuilder().clearResource().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceClient.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceClient.java
index 76b44ba..6c036c1 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceClient.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceClient.java
@@ -56,8 +56,11 @@
* calls that map to API methods. Sample code to get started:
*
* {@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Job job = Job.newBuilder().build();
@@ -95,8 +98,11 @@
* To customize credentials:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings batchServiceSettings =
* BatchServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -107,8 +113,11 @@
* To customize the endpoint:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings batchServiceSettings =
* BatchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* BatchServiceClient batchServiceClient = BatchServiceClient.create(batchServiceSettings);
@@ -118,8 +127,11 @@
* the wire:
*
* {@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings batchServiceSettings =
* BatchServiceSettings.newBuilder()
* .setTransportChannelProvider(
@@ -212,8 +224,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Job job = Job.newBuilder().build();
@@ -250,8 +265,11 @@ public final Job createJob(LocationName parent, Job job, String jobId) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* Job job = Job.newBuilder().build();
@@ -284,8 +302,11 @@ public final Job createJob(String parent, Job job, String jobId) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* CreateJobRequest request =
* CreateJobRequest.newBuilder()
@@ -312,8 +333,11 @@ public final Job createJob(CreateJobRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* CreateJobRequest request =
* CreateJobRequest.newBuilder()
@@ -339,8 +363,11 @@ public final UnaryCallable createJobCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
* Job response = batchServiceClient.getJob(name);
@@ -363,8 +390,11 @@ public final Job getJob(JobName name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString();
* Job response = batchServiceClient.getJob(name);
@@ -386,8 +416,11 @@ public final Job getJob(String name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetJobRequest request =
* GetJobRequest.newBuilder()
@@ -411,8 +444,11 @@ public final Job getJob(GetJobRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetJobRequest request =
* GetJobRequest.newBuilder()
@@ -435,8 +471,11 @@ public final UnaryCallable getJobCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String name = "name3373707";
* batchServiceClient.deleteJobAsync(name).get();
@@ -458,8 +497,11 @@ public final OperationFuture deleteJobAsync(String nam
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* DeleteJobRequest request =
* DeleteJobRequest.newBuilder()
@@ -485,8 +527,11 @@ public final OperationFuture deleteJobAsync(DeleteJobR
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* DeleteJobRequest request =
* DeleteJobRequest.newBuilder()
@@ -513,8 +558,11 @@ public final OperationFuture deleteJobAsync(DeleteJobR
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* DeleteJobRequest request =
* DeleteJobRequest.newBuilder()
@@ -539,8 +587,11 @@ public final UnaryCallable deleteJobCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String parent = "parent-995424086";
* for (Job element : batchServiceClient.listJobs(parent).iterateAll()) {
@@ -564,8 +615,11 @@ public final ListJobsPagedResponse listJobs(String parent) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListJobsRequest request =
* ListJobsRequest.newBuilder()
@@ -594,8 +648,11 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListJobsRequest request =
* ListJobsRequest.newBuilder()
@@ -623,8 +680,11 @@ public final UnaryCallable listJobsPaged
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListJobsRequest request =
* ListJobsRequest.newBuilder()
@@ -659,8 +719,11 @@ public final UnaryCallable listJobsCallable()
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]");
* Task response = batchServiceClient.getTask(name);
@@ -683,8 +746,11 @@ public final Task getTask(TaskName name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String name =
* TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]").toString();
@@ -707,8 +773,11 @@ public final Task getTask(String name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetTaskRequest request =
* GetTaskRequest.newBuilder()
@@ -734,8 +803,11 @@ public final Task getTask(GetTaskRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetTaskRequest request =
* GetTaskRequest.newBuilder()
@@ -760,8 +832,11 @@ public final UnaryCallable getTaskCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TaskGroupName parent = TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]");
* for (Task element : batchServiceClient.listTasks(parent).iterateAll()) {
@@ -787,8 +862,11 @@ public final ListTasksPagedResponse listTasks(TaskGroupName parent) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* String parent =
* TaskGroupName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]").toString();
@@ -814,8 +892,11 @@ public final ListTasksPagedResponse listTasks(String parent) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListTasksRequest request =
* ListTasksRequest.newBuilder()
@@ -845,8 +926,11 @@ public final ListTasksPagedResponse listTasks(ListTasksRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListTasksRequest request =
* ListTasksRequest.newBuilder()
@@ -875,8 +959,11 @@ public final UnaryCallable listTasksPa
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListTasksRequest request =
* ListTasksRequest.newBuilder()
@@ -912,8 +999,11 @@ public final UnaryCallable listTasksCallabl
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
@@ -942,8 +1032,11 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
@@ -973,8 +1066,11 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
@@ -1009,8 +1105,11 @@ public final UnaryCallable listLoca
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
* Location response = batchServiceClient.getLocation(request);
@@ -1031,8 +1130,11 @@ public final Location getLocation(GetLocationRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
* ApiFuture future = batchServiceClient.getLocationCallable().futureCall(request);
@@ -1054,8 +1156,11 @@ public final UnaryCallable getLocationCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
@@ -1083,8 +1188,11 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
@@ -1110,8 +1218,11 @@ public final UnaryCallable setIamPolicyCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
@@ -1137,8 +1248,11 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
@@ -1167,8 +1281,11 @@ public final UnaryCallable getIamPolicyCallable() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
@@ -1198,8 +1315,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceSettings.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceSettings.java
index 9e23db9..5cacdde 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceSettings.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/BatchServiceSettings.java
@@ -67,16 +67,16 @@
* For example, to set the total timeout of createJob to 30 seconds:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceSettings.Builder batchServiceSettingsBuilder = BatchServiceSettings.newBuilder();
* batchServiceSettingsBuilder
* .createJobSettings()
* .setRetrySettings(
- * batchServiceSettingsBuilder
- * .createJobSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * batchServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* BatchServiceSettings batchServiceSettings = batchServiceSettingsBuilder.build();
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/package-info.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/package-info.java
index 0989c13..2c72ddb 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/package-info.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/package-info.java
@@ -27,8 +27,11 @@
* Sample for BatchServiceClient:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Job job = Job.newBuilder().build();
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/BatchServiceStubSettings.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/BatchServiceStubSettings.java
index 378c83c..5805c56 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/BatchServiceStubSettings.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/BatchServiceStubSettings.java
@@ -98,17 +98,17 @@
* For example, to set the total timeout of createJob to 30 seconds:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* BatchServiceStubSettings.Builder batchServiceSettingsBuilder =
* BatchServiceStubSettings.newBuilder();
* batchServiceSettingsBuilder
* .createJobSettings()
* .setRetrySettings(
- * batchServiceSettingsBuilder
- * .createJobSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * batchServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* BatchServiceStubSettings batchServiceSettings = batchServiceSettingsBuilder.build();
diff --git a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/HttpJsonBatchServiceStub.java b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/HttpJsonBatchServiceStub.java
index 83e1f59..e043888 100644
--- a/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/HttpJsonBatchServiceStub.java
+++ b/google-cloud-batch/src/main/java/com/google/cloud/batch/v1alpha/stub/HttpJsonBatchServiceStub.java
@@ -107,7 +107,8 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
return fields;
})
.setRequestBodyExtractor(
- request -> ProtoRestSerializer.create().toBody("job", request.getJob()))
+ request ->
+ ProtoRestSerializer.create().toBody("job", request.getJob(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -385,7 +386,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearResource().build()))
+ .toBody("*", request.toBuilder().clearResource().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -460,7 +461,7 @@ public class HttpJsonBatchServiceStub extends BatchServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearResource().build()))
+ .toBody("*", request.toBuilder().clearResource().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()