From 9d68bde4508535aa85ba30135c49709816411cbc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 15:08:43 +0000 Subject: [PATCH] chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions (#745) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 472750037 Source-Link: https://github.com/googleapis/googleapis/commit/88f2ea3f53b9712f2e04f28f06210f6f77fa7e24 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9 --- .../create/SyncCreateSetCredentialsProvider.java | 7 +++++-- .../create/SyncCreateSetCredentialsProvider1.java | 7 +++++-- .../create/SyncCreateSetEndpoint.java | 7 +++++-- .../createqueue/AsyncCreateQueue.java | 7 +++++-- .../createqueue/SyncCreateQueue.java | 7 +++++-- .../SyncCreateQueueLocationnameQueue.java | 7 +++++-- .../createqueue/SyncCreateQueueStringQueue.java | 7 +++++-- .../cloudtasksclient/createtask/AsyncCreateTask.java | 7 +++++-- .../cloudtasksclient/createtask/SyncCreateTask.java | 7 +++++-- .../createtask/SyncCreateTaskQueuenameTask.java | 7 +++++-- .../createtask/SyncCreateTaskStringTask.java | 7 +++++-- .../deletequeue/AsyncDeleteQueue.java | 7 +++++-- .../deletequeue/SyncDeleteQueue.java | 7 +++++-- .../deletequeue/SyncDeleteQueueQueuename.java | 7 +++++-- .../deletequeue/SyncDeleteQueueString.java | 7 +++++-- .../cloudtasksclient/deletetask/AsyncDeleteTask.java | 7 +++++-- .../cloudtasksclient/deletetask/SyncDeleteTask.java | 7 +++++-- .../deletetask/SyncDeleteTaskString.java | 7 +++++-- .../deletetask/SyncDeleteTaskTaskname.java | 7 +++++-- .../getiampolicy/AsyncGetIamPolicy.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicy.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicyResourcename.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicyString.java | 7 +++++-- .../v2/cloudtasksclient/getqueue/AsyncGetQueue.java | 7 +++++-- .../v2/cloudtasksclient/getqueue/SyncGetQueue.java | 7 +++++-- .../getqueue/SyncGetQueueQueuename.java | 7 +++++-- .../getqueue/SyncGetQueueString.java | 7 +++++-- .../v2/cloudtasksclient/gettask/AsyncGetTask.java | 7 +++++-- .../v2/cloudtasksclient/gettask/SyncGetTask.java | 7 +++++-- .../cloudtasksclient/gettask/SyncGetTaskString.java | 7 +++++-- .../gettask/SyncGetTaskTaskname.java | 7 +++++-- .../cloudtasksclient/listqueues/AsyncListQueues.java | 7 +++++-- .../listqueues/AsyncListQueuesPaged.java | 7 +++++-- .../cloudtasksclient/listqueues/SyncListQueues.java | 7 +++++-- .../listqueues/SyncListQueuesLocationname.java | 7 +++++-- .../listqueues/SyncListQueuesString.java | 7 +++++-- .../cloudtasksclient/listtasks/AsyncListTasks.java | 7 +++++-- .../listtasks/AsyncListTasksPaged.java | 7 +++++-- .../v2/cloudtasksclient/listtasks/SyncListTasks.java | 7 +++++-- .../listtasks/SyncListTasksQueuename.java | 7 +++++-- .../listtasks/SyncListTasksString.java | 7 +++++-- .../cloudtasksclient/pausequeue/AsyncPauseQueue.java | 7 +++++-- .../cloudtasksclient/pausequeue/SyncPauseQueue.java | 7 +++++-- .../pausequeue/SyncPauseQueueQueuename.java | 7 +++++-- .../pausequeue/SyncPauseQueueString.java | 7 +++++-- .../cloudtasksclient/purgequeue/AsyncPurgeQueue.java | 7 +++++-- .../cloudtasksclient/purgequeue/SyncPurgeQueue.java | 7 +++++-- .../purgequeue/SyncPurgeQueueQueuename.java | 7 +++++-- .../purgequeue/SyncPurgeQueueString.java | 7 +++++-- .../resumequeue/AsyncResumeQueue.java | 7 +++++-- .../resumequeue/SyncResumeQueue.java | 7 +++++-- .../resumequeue/SyncResumeQueueQueuename.java | 7 +++++-- .../resumequeue/SyncResumeQueueString.java | 7 +++++-- .../v2/cloudtasksclient/runtask/AsyncRunTask.java | 7 +++++-- .../v2/cloudtasksclient/runtask/SyncRunTask.java | 7 +++++-- .../cloudtasksclient/runtask/SyncRunTaskString.java | 7 +++++-- .../runtask/SyncRunTaskTaskname.java | 7 +++++-- .../setiampolicy/AsyncSetIamPolicy.java | 7 +++++-- .../setiampolicy/SyncSetIamPolicy.java | 7 +++++-- .../SyncSetIamPolicyResourcenamePolicy.java | 7 +++++-- .../setiampolicy/SyncSetIamPolicyStringPolicy.java | 7 +++++-- .../testiampermissions/AsyncTestIamPermissions.java | 7 +++++-- .../testiampermissions/SyncTestIamPermissions.java | 7 +++++-- ...SyncTestIamPermissionsResourcenameListstring.java | 7 +++++-- .../SyncTestIamPermissionsStringListstring.java | 7 +++++-- .../updatequeue/AsyncUpdateQueue.java | 7 +++++-- .../updatequeue/SyncUpdateQueue.java | 7 +++++-- .../updatequeue/SyncUpdateQueueQueueFieldmask.java | 7 +++++-- .../v2/cloudtaskssettings/getqueue/SyncGetQueue.java | 12 ++++++------ .../getqueue/SyncGetQueue.java | 12 ++++++------ .../acknowledgetask/AsyncAcknowledgeTask.java | 7 +++++-- .../acknowledgetask/SyncAcknowledgeTask.java | 7 +++++-- .../SyncAcknowledgeTaskStringTimestamp.java | 7 +++++-- .../SyncAcknowledgeTaskTasknameTimestamp.java | 7 +++++-- .../cancellease/AsyncCancelLease.java | 7 +++++-- .../cancellease/SyncCancelLease.java | 7 +++++-- .../cancellease/SyncCancelLeaseStringTimestamp.java | 7 +++++-- .../SyncCancelLeaseTasknameTimestamp.java | 7 +++++-- .../create/SyncCreateSetCredentialsProvider.java | 7 +++++-- .../create/SyncCreateSetCredentialsProvider1.java | 7 +++++-- .../create/SyncCreateSetEndpoint.java | 7 +++++-- .../createqueue/AsyncCreateQueue.java | 7 +++++-- .../createqueue/SyncCreateQueue.java | 7 +++++-- .../SyncCreateQueueLocationnameQueue.java | 7 +++++-- .../createqueue/SyncCreateQueueStringQueue.java | 7 +++++-- .../cloudtasksclient/createtask/AsyncCreateTask.java | 7 +++++-- .../cloudtasksclient/createtask/SyncCreateTask.java | 7 +++++-- .../createtask/SyncCreateTaskQueuenameTask.java | 7 +++++-- .../createtask/SyncCreateTaskStringTask.java | 7 +++++-- .../deletequeue/AsyncDeleteQueue.java | 7 +++++-- .../deletequeue/SyncDeleteQueue.java | 7 +++++-- .../deletequeue/SyncDeleteQueueQueuename.java | 7 +++++-- .../deletequeue/SyncDeleteQueueString.java | 7 +++++-- .../cloudtasksclient/deletetask/AsyncDeleteTask.java | 7 +++++-- .../cloudtasksclient/deletetask/SyncDeleteTask.java | 7 +++++-- .../deletetask/SyncDeleteTaskString.java | 7 +++++-- .../deletetask/SyncDeleteTaskTaskname.java | 7 +++++-- .../getiampolicy/AsyncGetIamPolicy.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicy.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicyResourcename.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicyString.java | 7 +++++-- .../cloudtasksclient/getqueue/AsyncGetQueue.java | 7 +++++-- .../cloudtasksclient/getqueue/SyncGetQueue.java | 7 +++++-- .../getqueue/SyncGetQueueQueuename.java | 7 +++++-- .../getqueue/SyncGetQueueString.java | 7 +++++-- .../cloudtasksclient/gettask/AsyncGetTask.java | 7 +++++-- .../cloudtasksclient/gettask/SyncGetTask.java | 7 +++++-- .../cloudtasksclient/gettask/SyncGetTaskString.java | 7 +++++-- .../gettask/SyncGetTaskTaskname.java | 7 +++++-- .../cloudtasksclient/leasetasks/AsyncLeaseTasks.java | 7 +++++-- .../cloudtasksclient/leasetasks/SyncLeaseTasks.java | 7 +++++-- .../leasetasks/SyncLeaseTasksQueuenameDuration.java | 7 +++++-- .../leasetasks/SyncLeaseTasksStringDuration.java | 7 +++++-- .../cloudtasksclient/listqueues/AsyncListQueues.java | 7 +++++-- .../listqueues/AsyncListQueuesPaged.java | 7 +++++-- .../cloudtasksclient/listqueues/SyncListQueues.java | 7 +++++-- .../listqueues/SyncListQueuesLocationname.java | 7 +++++-- .../listqueues/SyncListQueuesString.java | 7 +++++-- .../cloudtasksclient/listtasks/AsyncListTasks.java | 7 +++++-- .../listtasks/AsyncListTasksPaged.java | 7 +++++-- .../cloudtasksclient/listtasks/SyncListTasks.java | 7 +++++-- .../listtasks/SyncListTasksQueuename.java | 7 +++++-- .../listtasks/SyncListTasksString.java | 7 +++++-- .../cloudtasksclient/pausequeue/AsyncPauseQueue.java | 7 +++++-- .../cloudtasksclient/pausequeue/SyncPauseQueue.java | 7 +++++-- .../pausequeue/SyncPauseQueueQueuename.java | 7 +++++-- .../pausequeue/SyncPauseQueueString.java | 7 +++++-- .../cloudtasksclient/purgequeue/AsyncPurgeQueue.java | 7 +++++-- .../cloudtasksclient/purgequeue/SyncPurgeQueue.java | 7 +++++-- .../purgequeue/SyncPurgeQueueQueuename.java | 7 +++++-- .../purgequeue/SyncPurgeQueueString.java | 7 +++++-- .../cloudtasksclient/renewlease/AsyncRenewLease.java | 7 +++++-- .../cloudtasksclient/renewlease/SyncRenewLease.java | 7 +++++-- .../SyncRenewLeaseStringTimestampDuration.java | 7 +++++-- .../SyncRenewLeaseTasknameTimestampDuration.java | 7 +++++-- .../resumequeue/AsyncResumeQueue.java | 7 +++++-- .../resumequeue/SyncResumeQueue.java | 7 +++++-- .../resumequeue/SyncResumeQueueQueuename.java | 7 +++++-- .../resumequeue/SyncResumeQueueString.java | 7 +++++-- .../cloudtasksclient/runtask/AsyncRunTask.java | 7 +++++-- .../cloudtasksclient/runtask/SyncRunTask.java | 7 +++++-- .../cloudtasksclient/runtask/SyncRunTaskString.java | 7 +++++-- .../runtask/SyncRunTaskTaskname.java | 7 +++++-- .../setiampolicy/AsyncSetIamPolicy.java | 7 +++++-- .../setiampolicy/SyncSetIamPolicy.java | 7 +++++-- .../SyncSetIamPolicyResourcenamePolicy.java | 7 +++++-- .../setiampolicy/SyncSetIamPolicyStringPolicy.java | 7 +++++-- .../testiampermissions/AsyncTestIamPermissions.java | 7 +++++-- .../testiampermissions/SyncTestIamPermissions.java | 7 +++++-- ...SyncTestIamPermissionsResourcenameListstring.java | 7 +++++-- .../SyncTestIamPermissionsStringListstring.java | 7 +++++-- .../updatequeue/AsyncUpdateQueue.java | 7 +++++-- .../updatequeue/SyncUpdateQueue.java | 7 +++++-- .../updatequeue/SyncUpdateQueueQueueFieldmask.java | 7 +++++-- .../cloudtaskssettings/getqueue/SyncGetQueue.java | 12 ++++++------ .../getqueue/SyncGetQueue.java | 12 ++++++------ .../create/SyncCreateSetCredentialsProvider.java | 7 +++++-- .../create/SyncCreateSetCredentialsProvider1.java | 7 +++++-- .../create/SyncCreateSetEndpoint.java | 7 +++++-- .../createqueue/AsyncCreateQueue.java | 7 +++++-- .../createqueue/SyncCreateQueue.java | 7 +++++-- .../SyncCreateQueueLocationnameQueue.java | 7 +++++-- .../createqueue/SyncCreateQueueStringQueue.java | 7 +++++-- .../cloudtasksclient/createtask/AsyncCreateTask.java | 7 +++++-- .../cloudtasksclient/createtask/SyncCreateTask.java | 7 +++++-- .../createtask/SyncCreateTaskQueuenameTask.java | 7 +++++-- .../createtask/SyncCreateTaskStringTask.java | 7 +++++-- .../deletequeue/AsyncDeleteQueue.java | 7 +++++-- .../deletequeue/SyncDeleteQueue.java | 7 +++++-- .../deletequeue/SyncDeleteQueueQueuename.java | 7 +++++-- .../deletequeue/SyncDeleteQueueString.java | 7 +++++-- .../cloudtasksclient/deletetask/AsyncDeleteTask.java | 7 +++++-- .../cloudtasksclient/deletetask/SyncDeleteTask.java | 7 +++++-- .../deletetask/SyncDeleteTaskString.java | 7 +++++-- .../deletetask/SyncDeleteTaskTaskname.java | 7 +++++-- .../getiampolicy/AsyncGetIamPolicy.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicy.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicyResourcename.java | 7 +++++-- .../getiampolicy/SyncGetIamPolicyString.java | 7 +++++-- .../cloudtasksclient/getqueue/AsyncGetQueue.java | 7 +++++-- .../cloudtasksclient/getqueue/SyncGetQueue.java | 7 +++++-- .../getqueue/SyncGetQueueQueuename.java | 7 +++++-- .../getqueue/SyncGetQueueString.java | 7 +++++-- .../cloudtasksclient/gettask/AsyncGetTask.java | 7 +++++-- .../cloudtasksclient/gettask/SyncGetTask.java | 7 +++++-- .../cloudtasksclient/gettask/SyncGetTaskString.java | 7 +++++-- .../gettask/SyncGetTaskTaskname.java | 7 +++++-- .../cloudtasksclient/listqueues/AsyncListQueues.java | 7 +++++-- .../listqueues/AsyncListQueuesPaged.java | 7 +++++-- .../cloudtasksclient/listqueues/SyncListQueues.java | 7 +++++-- .../listqueues/SyncListQueuesLocationname.java | 7 +++++-- .../listqueues/SyncListQueuesString.java | 7 +++++-- .../cloudtasksclient/listtasks/AsyncListTasks.java | 7 +++++-- .../listtasks/AsyncListTasksPaged.java | 7 +++++-- .../cloudtasksclient/listtasks/SyncListTasks.java | 7 +++++-- .../listtasks/SyncListTasksQueuename.java | 7 +++++-- .../listtasks/SyncListTasksString.java | 7 +++++-- .../cloudtasksclient/pausequeue/AsyncPauseQueue.java | 7 +++++-- .../cloudtasksclient/pausequeue/SyncPauseQueue.java | 7 +++++-- .../pausequeue/SyncPauseQueueQueuename.java | 7 +++++-- .../pausequeue/SyncPauseQueueString.java | 7 +++++-- .../cloudtasksclient/purgequeue/AsyncPurgeQueue.java | 7 +++++-- .../cloudtasksclient/purgequeue/SyncPurgeQueue.java | 7 +++++-- .../purgequeue/SyncPurgeQueueQueuename.java | 7 +++++-- .../purgequeue/SyncPurgeQueueString.java | 7 +++++-- .../resumequeue/AsyncResumeQueue.java | 7 +++++-- .../resumequeue/SyncResumeQueue.java | 7 +++++-- .../resumequeue/SyncResumeQueueQueuename.java | 7 +++++-- .../resumequeue/SyncResumeQueueString.java | 7 +++++-- .../cloudtasksclient/runtask/AsyncRunTask.java | 7 +++++-- .../cloudtasksclient/runtask/SyncRunTask.java | 7 +++++-- .../cloudtasksclient/runtask/SyncRunTaskString.java | 7 +++++-- .../runtask/SyncRunTaskTaskname.java | 7 +++++-- .../setiampolicy/AsyncSetIamPolicy.java | 7 +++++-- .../setiampolicy/SyncSetIamPolicy.java | 7 +++++-- .../SyncSetIamPolicyResourcenamePolicy.java | 7 +++++-- .../setiampolicy/SyncSetIamPolicyStringPolicy.java | 7 +++++-- .../testiampermissions/AsyncTestIamPermissions.java | 7 +++++-- .../testiampermissions/SyncTestIamPermissions.java | 7 +++++-- ...SyncTestIamPermissionsResourcenameListstring.java | 7 +++++-- .../SyncTestIamPermissionsStringListstring.java | 7 +++++-- .../updatequeue/AsyncUpdateQueue.java | 7 +++++-- .../updatequeue/SyncUpdateQueue.java | 7 +++++-- .../updatequeue/SyncUpdateQueueQueueFieldmask.java | 7 +++++-- .../cloudtaskssettings/getqueue/SyncGetQueue.java | 12 ++++++------ .../getqueue/SyncGetQueue.java | 12 ++++++------ 226 files changed, 1136 insertions(+), 476 deletions(-) diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java index 4e05d8c0e9e..f097d66a2dd 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java index 3851491237f..a5da0873544 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder() .setTransportChannelProvider( diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetEndpoint.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetEndpoint.java index 9da8f9ea3c2..902d57d11b6 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetEndpoint.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder().setEndpoint(myEndpoint).build(); CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/AsyncCreateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/AsyncCreateQueue.java index 1b2db3ddbfa..e1dd8293590 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/AsyncCreateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/AsyncCreateQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateQueueRequest request = CreateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueue.java index 11135004eda..24ac21c708f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateQueueRequest request = CreateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java index 9c9fcc92d32..3dbc0328534 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueueLocationnameQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Queue queue = Queue.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java index 721ffc9b46e..76afd65b30f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueueStringQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Queue queue = Queue.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/AsyncCreateTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/AsyncCreateTask.java index ccf2a479ea2..34daa0ac3f4 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/AsyncCreateTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/AsyncCreateTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateTaskRequest request = CreateTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTask.java index df58baee39e..73960c2b01c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateTaskRequest request = CreateTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java index a84eb460158..1baa3d2b1be 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTaskQueuenameTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Task task = Task.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java index 0860e29516d..560ab33bfcd 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTaskStringTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Task task = Task.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java index 9762594b013..ee8d9eaeefe 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteQueueRequest request = DeleteQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueue.java index da63071b5b1..3f370b97802 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteQueueRequest request = DeleteQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java index 694e60aae2f..960c94560f8 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); cloudTasksClient.deleteQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java index 8c7e82cf15c..b963df07fe8 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); cloudTasksClient.deleteQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/AsyncDeleteTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/AsyncDeleteTask.java index 632b3fabfaf..e259fe1021b 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/AsyncDeleteTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/AsyncDeleteTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteTaskRequest request = DeleteTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTask.java index fd2d3a75bb7..bf4c5a4af47 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteTaskRequest request = DeleteTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskString.java index 5871611c842..aeae8ccfe1a 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); cloudTasksClient.deleteTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java index 189c71cfd76..092b0ef7972 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); cloudTasksClient.deleteTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java index 60880005523..454f77ada7f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java index 493482e292b..95f353d038c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java index d463ab2e54b..949f438ff58 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicyResourcename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Policy response = cloudTasksClient.getIamPolicy(resource); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java index 979f61bcf73..58a98b0d526 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicyString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Policy response = cloudTasksClient.getIamPolicy(resource); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/AsyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/AsyncGetQueue.java index 0f432e89670..950fc984421 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/AsyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/AsyncGetQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetQueueRequest request = GetQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueue.java index 0fc5586a772..d8c186fb7ad 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetQueueRequest request = GetQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java index d080d45b3b5..9963770cb5b 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.getQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueString.java index 9ae887426f4..22dda68ee9d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.getQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/AsyncGetTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/AsyncGetTask.java index ffc0e6607bd..5e110eb608d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/AsyncGetTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/AsyncGetTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetTaskRequest request = GetTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTask.java index 1d470d4231a..b99a00ff5ac 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetTaskRequest request = GetTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskString.java index d571b3ec090..a1c9844c631 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Task response = cloudTasksClient.getTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskTaskname.java index 7047deb0595..fc687b2c127 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Task response = cloudTasksClient.getTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueues.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueues.java index e35753f3418..31f07c0a187 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueues.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueues.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListQueues() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java index be973228164..6370aba4ac4 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListQueuesPaged() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueues.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueues.java index 2b403ced637..2d8432561a3 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueues.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueues.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueues() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java index 306a8355877..93944890b82 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueuesLocationname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesString.java index 1ce53a05aab..21b0c38023c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueuesString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasks.java index f2b39a83a4d..40c31e55ebf 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasks.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasksPaged.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasksPaged.java index 95d3b4cb20e..518df7f0d9c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasksPaged.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasksPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListTasksPaged() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasks.java index 359dd06ae69..2972c9ea475 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasks.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksQueuename.java index 1c6ef375c87..a5c8d8cc41c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasksQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksString.java index ce21b31992c..c3338b8c4a6 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasksString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/AsyncPauseQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/AsyncPauseQueue.java index ef03e3f9901..6f44153c526 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/AsyncPauseQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/AsyncPauseQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPauseQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PauseQueueRequest request = PauseQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueue.java index a3186b778eb..3ca80bf4d18 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PauseQueueRequest request = PauseQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java index 218a3d5956a..ebccf9d4619 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.pauseQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueString.java index 0bfa1089381..caba7348349 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.pauseQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java index 0f9e2f86438..23616da38f0 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPurgeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PurgeQueueRequest request = PurgeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueue.java index a16236a5193..30356ca70b5 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PurgeQueueRequest request = PurgeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java index 3c864eaae43..1996b5bed1c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.purgeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java index 84007dc3d4d..7161a99a45d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.purgeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/AsyncResumeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/AsyncResumeQueue.java index 97db36cfbe2..c63525a9536 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/AsyncResumeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/AsyncResumeQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncResumeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResumeQueueRequest request = ResumeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueue.java index acdb269d478..995c34350b7 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResumeQueueRequest request = ResumeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java index 5526a4e8150..cbbc6986c3c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.resumeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueString.java index 0c29041fc8c..f2c84a586b2 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.resumeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/AsyncRunTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/AsyncRunTask.java index cde80c1c126..02ccf00eab6 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/AsyncRunTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/AsyncRunTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncRunTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RunTaskRequest request = RunTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTask.java index ea176710b93..5bce1fae389 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RunTaskRequest request = RunTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskString.java index 11b7fef8b33..cbe9660651e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Task response = cloudTasksClient.runTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskTaskname.java index 6e70b7b7f98..3b22e063695 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Task response = cloudTasksClient.runTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java index 5a0e28fa969..5160c33acbb 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncSetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java index 24d29467743..789562e7330 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java index 33cf4945469..3f24bd63313 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicyResourcenamePolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Policy policy = Policy.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java index b12bbe3f3b3..b5badab6e68 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicyStringPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Policy policy = Policy.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java index 0568b6398bb..c372a8d5cf0 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncTestIamPermissions() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java index f2f4170073d..34cf547a63d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissions() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java index 38b1f4d17db..c894eedcedd 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissionsResourcenameListstring() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); List permissions = new ArrayList<>(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java index 381af0ce2ff..1f757802a4d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissionsStringListstring() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); List permissions = new ArrayList<>(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java index 22494974d46..ceba1aa7211 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueue.java index 2038283ec20..85804280125 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java index 4788dbb39bb..c549376b050 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateQueueQueueFieldmask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { Queue queue = Queue.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtaskssettings/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtaskssettings/getqueue/SyncGetQueue.java index 0ffb477c88b..720367aa478 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtaskssettings/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtaskssettings/getqueue/SyncGetQueue.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 CloudTasksSettings.Builder cloudTasksSettingsBuilder = CloudTasksSettings.newBuilder(); cloudTasksSettingsBuilder .getQueueSettings() .setRetrySettings( - cloudTasksSettingsBuilder - .getQueueSettings() - .getRetrySettings() - .toBuilder() + cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); CloudTasksSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java index 7f7bda8f23e..51115470061 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 CloudTasksStubSettings.Builder cloudTasksSettingsBuilder = CloudTasksStubSettings.newBuilder(); cloudTasksSettingsBuilder .getQueueSettings() .setRetrySettings( - cloudTasksSettingsBuilder - .getQueueSettings() - .getRetrySettings() - .toBuilder() + cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); CloudTasksStubSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/AsyncAcknowledgeTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/AsyncAcknowledgeTask.java index ab1afa05ec6..fae03a61e7a 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/AsyncAcknowledgeTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/AsyncAcknowledgeTask.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAcknowledgeTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { AcknowledgeTaskRequest request = AcknowledgeTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTask.java index 3baa6f7ef65..8302c28061f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAcknowledgeTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { AcknowledgeTaskRequest request = AcknowledgeTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskStringTimestamp.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskStringTimestamp.java index 92f2d61fb45..0a89d2200a3 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskStringTimestamp.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskStringTimestamp.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAcknowledgeTaskStringTimestamp() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Timestamp scheduleTime = Timestamp.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskTasknameTimestamp.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskTasknameTimestamp.java index 762125bd376..82e330c243e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskTasknameTimestamp.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskTasknameTimestamp.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAcknowledgeTaskTasknameTimestamp() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Timestamp scheduleTime = Timestamp.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/AsyncCancelLease.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/AsyncCancelLease.java index da94e4537cb..e618e1f0190 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/AsyncCancelLease.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/AsyncCancelLease.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCancelLease() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CancelLeaseRequest request = CancelLeaseRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLease.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLease.java index 5ed165c2bd0..9323041baf6 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLease.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLease.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncCancelLease() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CancelLeaseRequest request = CancelLeaseRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseStringTimestamp.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseStringTimestamp.java index d4f1f1c4e12..b28a6da16a0 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseStringTimestamp.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseStringTimestamp.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCancelLeaseStringTimestamp() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Timestamp scheduleTime = Timestamp.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseTasknameTimestamp.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseTasknameTimestamp.java index 059088a1a6e..8bf8ed7c2ac 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseTasknameTimestamp.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseTasknameTimestamp.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCancelLeaseTasknameTimestamp() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Timestamp scheduleTime = Timestamp.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java index dbe6a904eec..9adafb3a8ff 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java index abb4e687a71..2970d6f9803 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder() .setTransportChannelProvider( diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetEndpoint.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetEndpoint.java index 4e47cdf5dd9..0e87ed2efc0 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetEndpoint.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder().setEndpoint(myEndpoint).build(); CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/AsyncCreateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/AsyncCreateQueue.java index e9bfc5f942e..107fdbc47b6 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/AsyncCreateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/AsyncCreateQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateQueueRequest request = CreateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueue.java index e34e8208e90..a2b1e6350cf 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateQueueRequest request = CreateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java index b2327f59734..6de0aff7842 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueueLocationnameQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Queue queue = Queue.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java index 2616093dd8b..56ce4232777 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueueStringQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Queue queue = Queue.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/AsyncCreateTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/AsyncCreateTask.java index e1b299a5770..30be5be4641 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/AsyncCreateTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/AsyncCreateTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateTaskRequest request = CreateTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTask.java index 390a437a54e..99aadb75281 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateTaskRequest request = CreateTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java index 62a070ae8da..fbe38473c3c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTaskQueuenameTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Task task = Task.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java index 73d350ceee6..0cac0e33fbe 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTaskStringTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Task task = Task.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java index af835c271fe..29d3c2cc50e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteQueueRequest request = DeleteQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueue.java index 32678f61971..de067ffdfba 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteQueueRequest request = DeleteQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java index 951b6511b87..5d3028aa5d3 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); cloudTasksClient.deleteQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java index 43f176ba586..ea5f346ea60 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); cloudTasksClient.deleteQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/AsyncDeleteTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/AsyncDeleteTask.java index f9274df2eb0..e256d5aa33a 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/AsyncDeleteTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/AsyncDeleteTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteTaskRequest request = DeleteTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTask.java index 36fe4ad3894..856a0e16695 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteTaskRequest request = DeleteTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskString.java index 0294a9a64c1..3e654f6207d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); cloudTasksClient.deleteTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java index 1f6b15ae6b1..3d12a3b0b82 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); cloudTasksClient.deleteTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java index d0f68b552e9..252125501dc 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java index ee3f1c6749a..47d0afd0515 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java index a8002081637..b773f9ad9fc 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicyResourcename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Policy response = cloudTasksClient.getIamPolicy(resource); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java index 6edf8501512..664e3ef25e0 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicyString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Policy response = cloudTasksClient.getIamPolicy(resource); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/AsyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/AsyncGetQueue.java index ae934132a1a..3f91261c134 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/AsyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/AsyncGetQueue.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetQueueRequest request = GetQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueue.java index 58d8f86ef33..5ffdcd888e1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetQueueRequest request = GetQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java index 06e7c5b8437..8e26d72c0a5 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.getQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueString.java index 8c83dbd477e..644874bbce3 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.getQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/AsyncGetTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/AsyncGetTask.java index 64cb85ce988..075be549e01 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/AsyncGetTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/AsyncGetTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetTaskRequest request = GetTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTask.java index f7ae4a589e3..f87863a9f09 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetTaskRequest request = GetTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskString.java index 36fb1cf3ec0..8937a692c9e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Task response = cloudTasksClient.getTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskTaskname.java index 517259c6217..7defa994a07 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Task response = cloudTasksClient.getTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/AsyncLeaseTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/AsyncLeaseTasks.java index a712847f0ad..6e0a7d7fdcc 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/AsyncLeaseTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/AsyncLeaseTasks.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncLeaseTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LeaseTasksRequest request = LeaseTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasks.java index 6f6a1b5e84f..f080538a995 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasks.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncLeaseTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LeaseTasksRequest request = LeaseTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksQueuenameDuration.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksQueuenameDuration.java index 2a935d86962..e54769b064d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksQueuenameDuration.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksQueuenameDuration.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncLeaseTasksQueuenameDuration() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Duration leaseDuration = Duration.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksStringDuration.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksStringDuration.java index a14af6420ad..66b6bf63eab 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksStringDuration.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksStringDuration.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncLeaseTasksStringDuration() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Duration leaseDuration = Duration.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueues.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueues.java index 0bd56057101..0fceeb02956 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueues.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueues.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListQueues() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java index a7ab7e1ae82..de86a5ed8cd 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListQueuesPaged() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueues.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueues.java index 1572c738d30..a4fa0906415 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueues.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueues.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueues() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java index b997ba49cd0..7bf6159134c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueuesLocationname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesString.java index ad6691a34c7..bacae6badbd 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueuesString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasks.java index 894fc4df52a..7989898261e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasks.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasksPaged.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasksPaged.java index b8612e2b754..2cd906dff3a 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasksPaged.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasksPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListTasksPaged() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasks.java index 558e80a5559..e41dcb3921d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasks.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksQueuename.java index 6877cc75be7..befebcdccd3 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasksQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksString.java index 48d68f826bc..299ff85a44f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasksString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/AsyncPauseQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/AsyncPauseQueue.java index 8d0f9560e35..047044b2129 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/AsyncPauseQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/AsyncPauseQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPauseQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PauseQueueRequest request = PauseQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueue.java index 7fa8ca8f474..7615206ada7 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PauseQueueRequest request = PauseQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java index 86f55e8daf6..b8887ed3d17 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.pauseQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueString.java index b821a4d609b..687bbde3dad 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.pauseQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java index 515451a99af..1f2a71bbee4 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPurgeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PurgeQueueRequest request = PurgeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueue.java index 2a7019c1be8..504ea5b1008 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PurgeQueueRequest request = PurgeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java index 66b1e90a76e..7bc29f3effd 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.purgeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java index 9f932af0705..53c1b0ca296 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.purgeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/AsyncRenewLease.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/AsyncRenewLease.java index 78690e088db..7b93b15d01f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/AsyncRenewLease.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/AsyncRenewLease.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncRenewLease() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RenewLeaseRequest request = RenewLeaseRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLease.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLease.java index 3645572a1c2..3493cea1cb7 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLease.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLease.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void syncRenewLease() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RenewLeaseRequest request = RenewLeaseRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseStringTimestampDuration.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseStringTimestampDuration.java index fcbc0c02d59..d52eeb68c37 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseStringTimestampDuration.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseStringTimestampDuration.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncRenewLeaseStringTimestampDuration() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Timestamp scheduleTime = Timestamp.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseTasknameTimestampDuration.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseTasknameTimestampDuration.java index 9811a9eac90..9e553755be7 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseTasknameTimestampDuration.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseTasknameTimestampDuration.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncRenewLeaseTasknameTimestampDuration() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Timestamp scheduleTime = Timestamp.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/AsyncResumeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/AsyncResumeQueue.java index 14c6db59d2a..a929b67ea57 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/AsyncResumeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/AsyncResumeQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncResumeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResumeQueueRequest request = ResumeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueue.java index 998644e55ee..44b55199af1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResumeQueueRequest request = ResumeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java index 165e4017501..c868c1979ad 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.resumeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueString.java index 7e00ccec5c8..c77f3a9d51f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.resumeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/AsyncRunTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/AsyncRunTask.java index 7f31a5b67f7..927e71ab7db 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/AsyncRunTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/AsyncRunTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncRunTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RunTaskRequest request = RunTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTask.java index df779a691dc..83dfefb57b0 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RunTaskRequest request = RunTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskString.java index 64f301529cf..fb583c724a6 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Task response = cloudTasksClient.runTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskTaskname.java index 68129a6bb88..54af3af7e42 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Task response = cloudTasksClient.runTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java index fd9321dfd5d..7564530cfc7 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncSetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java index 9a844bdd74d..390e72fa26d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java index 0fb2c9c1aa8..c6cb131d93f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicyResourcenamePolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Policy policy = Policy.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java index 76d66482c4e..c68a4241200 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicyStringPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Policy policy = Policy.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java index fb85bdfc468..9a608bf9eb8 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncTestIamPermissions() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java index 23e0592eeb6..6e0f87a3d74 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissions() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java index a36a8bc6760..4b47189404a 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissionsResourcenameListstring() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); List permissions = new ArrayList<>(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java index ca23ca6f93b..7329dca405d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissionsStringListstring() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); List permissions = new ArrayList<>(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java index 55067342ae7..52ecbe9a9d5 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueue.java index efa507ef30a..a44f3ef39b1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java index e4c8bd50d3b..935decf722b 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateQueueQueueFieldmask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { Queue queue = Queue.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtaskssettings/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtaskssettings/getqueue/SyncGetQueue.java index 1a243ce7709..dc1c35da4ee 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtaskssettings/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtaskssettings/getqueue/SyncGetQueue.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 CloudTasksSettings.Builder cloudTasksSettingsBuilder = CloudTasksSettings.newBuilder(); cloudTasksSettingsBuilder .getQueueSettings() .setRetrySettings( - cloudTasksSettingsBuilder - .getQueueSettings() - .getRetrySettings() - .toBuilder() + cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); CloudTasksSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java index 4b3c654b207..b652c10f596 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 CloudTasksStubSettings.Builder cloudTasksSettingsBuilder = CloudTasksStubSettings.newBuilder(); cloudTasksSettingsBuilder .getQueueSettings() .setRetrySettings( - cloudTasksSettingsBuilder - .getQueueSettings() - .getRetrySettings() - .toBuilder() + cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); CloudTasksStubSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java index 312b43831f9..1d909e16122 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java index 85431e3ec23..e62a6f6c5bc 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder() .setTransportChannelProvider( diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetEndpoint.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetEndpoint.java index d434e08df9f..0e9f6c71a3e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetEndpoint.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // 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 CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder().setEndpoint(myEndpoint).build(); CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/AsyncCreateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/AsyncCreateQueue.java index ca315705c79..50a1886e46f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/AsyncCreateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/AsyncCreateQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateQueueRequest request = CreateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueue.java index 4d711cebdf1..33dd1518895 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateQueueRequest request = CreateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java index 47be9793244..6a2a56b1b20 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueueLocationnameQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Queue queue = Queue.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java index 0d613bc16ef..6fe3b0b0f6b 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateQueueStringQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Queue queue = Queue.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/AsyncCreateTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/AsyncCreateTask.java index 6305ba81d13..5958a903194 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/AsyncCreateTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/AsyncCreateTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateTaskRequest request = CreateTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTask.java index 9e6e187ad31..872a00f36a1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { CreateTaskRequest request = CreateTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java index bed8b9319b9..a1ff8829c1f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTaskQueuenameTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Task task = Task.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskStringTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskStringTask.java index b61f91aadf6..9185d530472 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskStringTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskStringTask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateTaskStringTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Task task = Task.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/AsyncDeleteQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/AsyncDeleteQueue.java index 4f774533db9..709a14ba5e5 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/AsyncDeleteQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/AsyncDeleteQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteQueueRequest request = DeleteQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueue.java index 335fd8b93ff..cf2e3094d33 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteQueueRequest request = DeleteQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java index b03ca7bd9a0..2bbd1614588 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); cloudTasksClient.deleteQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueString.java index a67c1cd70a2..00515075f68 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); cloudTasksClient.deleteQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/AsyncDeleteTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/AsyncDeleteTask.java index 4c3d45d837e..bfb260f3c09 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/AsyncDeleteTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/AsyncDeleteTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteTaskRequest request = DeleteTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTask.java index db5646ff728..75695d396f9 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { DeleteTaskRequest request = DeleteTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskString.java index 00c42019e49..5c5189a53e2 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); cloudTasksClient.deleteTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java index 1c7f5c7f5de..be33b8c56b9 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); cloudTasksClient.deleteTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java index 049d109ab41..08e2d88e5b1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java index 3b6c93d6402..cf2bb0c06dc 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java index 703b836fa8b..5c68d929dd7 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicyResourcename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Policy response = cloudTasksClient.getIamPolicy(resource); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java index 598be27c4d0..3556a288b61 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetIamPolicyString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Policy response = cloudTasksClient.getIamPolicy(resource); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/AsyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/AsyncGetQueue.java index beb5a0a3f81..8db66b4abbf 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/AsyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/AsyncGetQueue.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetQueueRequest request = GetQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueue.java index b7c62e66a84..da4fb9462f1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetQueueRequest request = GetQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueQueuename.java index bbae5407bf4..37596206275 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.getQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueString.java index c5df8b177c9..7b1903f5892 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.getQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/AsyncGetTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/AsyncGetTask.java index b3ed26bec4c..11afd445464 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/AsyncGetTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/AsyncGetTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetTaskRequest request = GetTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTask.java index 836db60d8d1..dc2897044aa 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { GetTaskRequest request = GetTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskString.java index 930c44197ef..07dba2e64a4 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Task response = cloudTasksClient.getTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskTaskname.java index 868eefab88e..1b067cf46c2 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Task response = cloudTasksClient.getTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueues.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueues.java index 5ea1bbde283..2bf90e0b7e1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueues.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueues.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListQueues() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueuesPaged.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueuesPaged.java index d679ca1897c..743ddbb63c1 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueuesPaged.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueuesPaged.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListQueuesPaged() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueues.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueues.java index d7c5a7d8c31..1c5049acbb7 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueues.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueues.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueues() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListQueuesRequest request = ListQueuesRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesLocationname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesLocationname.java index 9f129089e33..383333be794 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesLocationname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueuesLocationname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesString.java index 60309c64e30..7fcf90f5610 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListQueuesString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasks.java index c19f0208457..ceadcaaa704 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasks.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasksPaged.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasksPaged.java index 17711db6d57..a789178eb26 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasksPaged.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasksPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListTasksPaged() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasks.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasks.java index 046d9477aa9..fa50cc556e9 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasks.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasks.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasks() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ListTasksRequest request = ListTasksRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksQueuename.java index f67e5d81105..9ac21fab33f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasksQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksString.java index e8fcd18a288..5b41d5addf2 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListTasksString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/AsyncPauseQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/AsyncPauseQueue.java index 761b5166016..1851741d9cb 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/AsyncPauseQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/AsyncPauseQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPauseQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PauseQueueRequest request = PauseQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueue.java index 933945740d3..faac88d51de 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PauseQueueRequest request = PauseQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java index ed9e59e22b2..9c8ea5df216 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.pauseQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueString.java index 25a0cc0ab5b..c430267d4fa 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPauseQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.pauseQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/AsyncPurgeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/AsyncPurgeQueue.java index b7d0108d554..55d7ceedbef 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/AsyncPurgeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/AsyncPurgeQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPurgeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PurgeQueueRequest request = PurgeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueue.java index f555c736c2c..a361aa5f11f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { PurgeQueueRequest request = PurgeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java index 9a6f7d07dde..8940cfb0418 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.purgeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueString.java index ba833f52b46..7133a864f4e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.purgeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/AsyncResumeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/AsyncResumeQueue.java index 8a522847b64..ea380afcb80 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/AsyncResumeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/AsyncResumeQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncResumeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResumeQueueRequest request = ResumeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueue.java index 50348c4678c..127b49fd4d3 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResumeQueueRequest request = ResumeQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java index df75ed997f1..a192c96284f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueueQueuename() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Queue response = cloudTasksClient.resumeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueString.java index bdfb0c0102c..01b4cb82c80 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncResumeQueueString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Queue response = cloudTasksClient.resumeQueue(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/AsyncRunTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/AsyncRunTask.java index 8a392118150..5f9e2e5e26a 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/AsyncRunTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/AsyncRunTask.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncRunTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RunTaskRequest request = RunTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTask.java index 8b73a70b883..e12f1c3c0ae 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTask.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { RunTaskRequest request = RunTaskRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskString.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskString.java index d5da488b6f7..64fb38ac44d 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskString.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTaskString() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); Task response = cloudTasksClient.runTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskTaskname.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskTaskname.java index edd2d333c92..09d2ea56080 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskTaskname.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskTaskname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncRunTaskTaskname() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); Task response = cloudTasksClient.runTask(name); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java index f1e7cd6e1f7..c23eb249cf5 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncSetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java index 33d53f0f55a..f0ddfaa548f 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java index 1b0b0d9256b..c2e17cd7633 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicyResourcenamePolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); Policy policy = Policy.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java index 2cbfddff667..a3d1ca9029c 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncSetIamPolicyStringPolicy() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); Policy policy = Policy.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java index 4bece0a9597..34b12fad7ba 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncTestIamPermissions() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java index 9b6ec43196e..d55ce480e90 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissions() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java index b92bcce75b9..d9ec06c3601 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissionsResourcenameListstring() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); List permissions = new ArrayList<>(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java index b144ff3b51e..a59396aba51 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncTestIamPermissionsStringListstring() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); List permissions = new ArrayList<>(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/AsyncUpdateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/AsyncUpdateQueue.java index 310ec8a0df6..2d705109252 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/AsyncUpdateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/AsyncUpdateQueue.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueue.java index b9b4415cfb4..86760baa639 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueue.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateQueue() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder() diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java index 077ea6dc690..a971e25a7ad 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateQueueQueueFieldmask() throws Exception { - // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { Queue queue = Queue.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtaskssettings/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtaskssettings/getqueue/SyncGetQueue.java index 3475de29677..3b35dfe159e 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtaskssettings/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtaskssettings/getqueue/SyncGetQueue.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 CloudTasksSettings.Builder cloudTasksSettingsBuilder = CloudTasksSettings.newBuilder(); cloudTasksSettingsBuilder .getQueueSettings() .setRetrySettings( - cloudTasksSettingsBuilder - .getQueueSettings() - .getRetrySettings() - .toBuilder() + cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); CloudTasksSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); diff --git a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java index 60609678b5d..89225654ecb 100644 --- a/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncGetQueue() throws Exception { - // 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 CloudTasksStubSettings.Builder cloudTasksSettingsBuilder = CloudTasksStubSettings.newBuilder(); cloudTasksSettingsBuilder .getQueueSettings() .setRetrySettings( - cloudTasksSettingsBuilder - .getQueueSettings() - .getRetrySettings() - .toBuilder() + cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); CloudTasksStubSettings cloudTasksSettings = cloudTasksSettingsBuilder.build();