From 5d0b9c4f02a52e26598d66e5b8e17ddd33140644 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 17 Mar 2020 22:36:04 -0700 Subject: [PATCH 001/123] samples: scaffold pom.xml files (#89) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-03-17 11:54:41,097 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. 2020-03-17 11:54:41,155 synthtool > Ensuring dependencies. 2020-03-17 11:54:41,160 synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:5ef340c8d9334719bc5c6981d95f4a5d2737b0a6a24f2b9a0d430e96fff85c5b Status: Image is up to date for googleapis/artman:latest 2020-03-17 11:54:42,240 synthtool > Cloning googleapis. 2020-03-17 11:54:42,606 synthtool > Running generator for google/cloud/tasks/artman_cloudtasks_v2beta2.yaml. 2020-03-17 11:54:53,396 synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java. 2020-03-17 11:54:53,398 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTargetOrBuilder.java. 2020-03-17 11:54:53,399 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequestOrBuilder.java. 2020-03-17 11:54:53,399 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequest.java. 2020-03-17 11:54:53,399 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java. 2020-03-17 11:54:53,400 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponse.java. 2020-03-17 11:54:53,400 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequestOrBuilder.java. 2020-03-17 11:54:53,400 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequest.java. 2020-03-17 11:54:53,400 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequest.java. 2020-03-17 11:54:53,401 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequest.java. 2020-03-17 11:54:53,401 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequest.java. 2020-03-17 11:54:53,401 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java. 2020-03-17 11:54:53,401 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java. 2020-03-17 11:54:53,402 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java. 2020-03-17 11:54:53,402 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java. 2020-03-17 11:54:53,402 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequest.java. 2020-03-17 11:54:53,402 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequest.java. 2020-03-17 11:54:53,403 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequestOrBuilder.java. 2020-03-17 11:54:53,403 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequest.java. 2020-03-17 11:54:53,403 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java. 2020-03-17 11:54:53,403 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequestOrBuilder.java. 2020-03-17 11:54:53,404 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequestOrBuilder.java. 2020-03-17 11:54:53,404 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequestOrBuilder.java. 2020-03-17 11:54:53,404 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequestOrBuilder.java. 2020-03-17 11:54:53,404 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTarget.java. 2020-03-17 11:54:53,404 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequestOrBuilder.java. 2020-03-17 11:54:53,405 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatusOrBuilder.java. 2020-03-17 11:54:53,405 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequest.java. 2020-03-17 11:54:53,405 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java. 2020-03-17 11:54:53,405 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTargetOrBuilder.java. 2020-03-17 11:54:53,406 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRouting.java. 2020-03-17 11:54:53,406 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequestOrBuilder.java. 2020-03-17 11:54:53,406 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequestOrBuilder.java. 2020-03-17 11:54:53,406 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java. 2020-03-17 11:54:53,407 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java. 2020-03-17 11:54:53,407 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequest.java. 2020-03-17 11:54:53,407 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java. 2020-03-17 11:54:53,407 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponse.java. 2020-03-17 11:54:53,408 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponse.java. 2020-03-17 11:54:53,408 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequest.java. 2020-03-17 11:54:53,408 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java. 2020-03-17 11:54:53,408 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java. 2020-03-17 11:54:53,409 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatus.java. 2020-03-17 11:54:53,409 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequestOrBuilder.java. 2020-03-17 11:54:53,409 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponseOrBuilder.java. 2020-03-17 11:54:53,409 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java. 2020-03-17 11:54:53,410 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java. 2020-03-17 11:54:53,410 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java. 2020-03-17 11:54:53,410 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java. 2020-03-17 11:54:53,410 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java. 2020-03-17 11:54:53,411 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRoutingOrBuilder.java. 2020-03-17 11:54:53,411 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java. 2020-03-17 11:54:53,411 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessage.java. 2020-03-17 11:54:53,411 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequest.java. 2020-03-17 11:54:53,412 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatus.java. 2020-03-17 11:54:53,412 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java. 2020-03-17 11:54:53,412 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequest.java. 2020-03-17 11:54:53,412 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequestOrBuilder.java. 2020-03-17 11:54:53,413 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponseOrBuilder.java. 2020-03-17 11:54:53,413 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatusOrBuilder.java. 2020-03-17 11:54:53,413 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequest.java. 2020-03-17 11:54:53,414 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequestOrBuilder.java. 2020-03-17 11:54:53,414 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequest.java. 2020-03-17 11:54:53,414 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponseOrBuilder.java. 2020-03-17 11:54:53,414 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java. 2020-03-17 11:54:53,415 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequestOrBuilder.java. 2020-03-17 11:54:53,415 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTarget.java. 2020-03-17 11:54:53,415 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessageOrBuilder.java. 2020-03-17 11:54:53,419 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LocationName.java. 2020-03-17 11:54:53,419 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueName.java. 2020-03-17 11:54:53,420 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskName.java. 2020-03-17 11:54:53,423 synthtool > Replaced '^package (.*);' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java. 2020-03-17 11:54:53,429 synthtool > Replaced '(\\s+public final Policy getIamPolicy\\(GetIamPolicyRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java. 2020-03-17 11:54:53,434 synthtool > Replaced '(\\s+public final Policy setIamPolicy\\(SetIamPolicyRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java. 2020-03-17 11:54:53,438 synthtool > Replaced '(\\spublic final TestIamPermissionsResponse testIamPermissions\\(TestIamPermissionsRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java. 2020-03-17 11:54:53,463 synthtool > Running java formatter on 32 files 2020-03-17 11:54:58,416 synthtool > Running java formatter on 1 files 2020-03-17 11:55:01,224 synthtool > Running java formatter on 71 files 2020-03-17 11:55:08,960 synthtool > Running generator for google/cloud/tasks/artman_cloudtasks_v2beta3.yaml. 2020-03-17 11:55:19,618 synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java. 2020-03-17 11:55:19,620 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequest.java. 2020-03-17 11:55:19,620 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/AttemptOrBuilder.java. 2020-03-17 11:55:19,620 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java. 2020-03-17 11:55:19,621 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponse.java. 2020-03-17 11:55:19,621 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteTaskRequestOrBuilder.java. 2020-03-17 11:55:19,621 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/OAuthToken.java. 2020-03-17 11:55:19,621 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequest.java. 2020-03-17 11:55:19,621 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequest.java. 2020-03-17 11:55:19,622 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequest.java. 2020-03-17 11:55:19,622 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksProto.java. 2020-03-17 11:55:19,622 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java. 2020-03-17 11:55:19,622 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java. 2020-03-17 11:55:19,623 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java. 2020-03-17 11:55:19,623 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequest.java. 2020-03-17 11:55:19,623 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/AppEngineHttpRequest.java. 2020-03-17 11:55:19,623 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java. 2020-03-17 11:55:19,624 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteQueueRequestOrBuilder.java. 2020-03-17 11:55:19,624 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/AppEngineHttpQueueOrBuilder.java. 2020-03-17 11:55:19,624 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java. 2020-03-17 11:55:19,624 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequestOrBuilder.java. 2020-03-17 11:55:19,625 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequestOrBuilder.java. 2020-03-17 11:55:19,625 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequestOrBuilder.java. 2020-03-17 11:55:19,625 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequestOrBuilder.java. 2020-03-17 11:55:19,625 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/OidcToken.java. 2020-03-17 11:55:19,626 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequest.java. 2020-03-17 11:55:19,626 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java. 2020-03-17 11:55:19,626 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/AppEngineHttpQueue.java. 2020-03-17 11:55:19,626 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/AppEngineRouting.java. 2020-03-17 11:55:19,627 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java. 2020-03-17 11:55:19,627 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Attempt.java. 2020-03-17 11:55:19,627 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequestOrBuilder.java. 2020-03-17 11:55:19,628 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java. 2020-03-17 11:55:19,628 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimits.java. 2020-03-17 11:55:19,628 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequestOrBuilder.java. 2020-03-17 11:55:19,628 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponse.java. 2020-03-17 11:55:19,629 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/OAuthTokenOrBuilder.java. 2020-03-17 11:55:19,629 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/OidcTokenOrBuilder.java. 2020-03-17 11:55:19,629 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequest.java. 2020-03-17 11:55:19,629 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/AppEngineHttpRequestOrBuilder.java. 2020-03-17 11:55:19,630 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RetryConfig.java. 2020-03-17 11:55:19,630 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequestOrBuilder.java. 2020-03-17 11:55:19,630 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponseOrBuilder.java. 2020-03-17 11:55:19,630 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequest.java. 2020-03-17 11:55:19,631 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java. 2020-03-17 11:55:19,631 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpMethod.java. 2020-03-17 11:55:19,631 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RetryConfigOrBuilder.java. 2020-03-17 11:55:19,632 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java. 2020-03-17 11:55:19,632 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/AppEngineRoutingOrBuilder.java. 2020-03-17 11:55:19,632 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java. 2020-03-17 11:55:19,632 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequest.java. 2020-03-17 11:55:19,633 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java. 2020-03-17 11:55:19,633 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteQueueRequest.java. 2020-03-17 11:55:19,633 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequestOrBuilder.java. 2020-03-17 11:55:19,633 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/StackdriverLoggingConfig.java. 2020-03-17 11:55:19,633 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponseOrBuilder.java. 2020-03-17 11:55:19,634 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequestOrBuilder.java. 2020-03-17 11:55:19,634 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteTaskRequest.java. 2020-03-17 11:55:19,634 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimitsOrBuilder.java. 2020-03-17 11:55:19,635 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/StackdriverLoggingConfigOrBuilder.java. 2020-03-17 11:55:19,636 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/LocationName.java. 2020-03-17 11:55:19,636 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueName.java. 2020-03-17 11:55:19,636 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskName.java. 2020-03-17 11:55:19,639 synthtool > Replaced '^package (.*);' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/grpc-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksGrpc.java. 2020-03-17 11:55:19,642 synthtool > Replaced '(\\s+public final Policy getIamPolicy\\(GetIamPolicyRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java. 2020-03-17 11:55:19,646 synthtool > Replaced '(\\s+public final Policy setIamPolicy\\(SetIamPolicyRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java. 2020-03-17 11:55:19,649 synthtool > Replaced '(\\spublic final TestIamPermissionsResponse testIamPermissions\\(TestIamPermissionsRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java. 2020-03-17 11:55:19,678 synthtool > Running java formatter on 32 files 2020-03-17 11:55:24,876 synthtool > Running java formatter on 1 files 2020-03-17 11:55:27,472 synthtool > Running java formatter on 63 files 2020-03-17 11:55:34,432 synthtool > Running generator for google/cloud/tasks/artman_cloudtasks_v2.yaml. 2020-03-17 11:55:45,224 synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java. 2020-03-17 11:55:45,226 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequest.java. 2020-03-17 11:55:45,226 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AttemptOrBuilder.java. 2020-03-17 11:55:45,227 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java. 2020-03-17 11:55:45,227 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponse.java. 2020-03-17 11:55:45,227 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteTaskRequestOrBuilder.java. 2020-03-17 11:55:45,228 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OAuthToken.java. 2020-03-17 11:55:45,228 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PurgeQueueRequest.java. 2020-03-17 11:55:45,228 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ResumeQueueRequest.java. 2020-03-17 11:55:45,228 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequest.java. 2020-03-17 11:55:45,228 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksProto.java. 2020-03-17 11:55:45,229 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequestOrBuilder.java. 2020-03-17 11:55:45,229 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequest.java. 2020-03-17 11:55:45,229 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskProto.java. 2020-03-17 11:55:45,229 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequest.java. 2020-03-17 11:55:45,230 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequest.java. 2020-03-17 11:55:45,230 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/HttpRequestOrBuilder.java. 2020-03-17 11:55:45,230 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteQueueRequestOrBuilder.java. 2020-03-17 11:55:45,230 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetQueueRequest.java. 2020-03-17 11:55:45,231 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequestOrBuilder.java. 2020-03-17 11:55:45,231 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequestOrBuilder.java. 2020-03-17 11:55:45,231 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PurgeQueueRequestOrBuilder.java. 2020-03-17 11:55:45,231 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PauseQueueRequestOrBuilder.java. 2020-03-17 11:55:45,231 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OidcToken.java. 2020-03-17 11:55:45,232 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequest.java. 2020-03-17 11:55:45,232 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetQueueRequestOrBuilder.java. 2020-03-17 11:55:45,232 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineRouting.java. 2020-03-17 11:55:45,232 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/HttpRequest.java. 2020-03-17 11:55:45,233 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Attempt.java. 2020-03-17 11:55:45,233 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/UpdateQueueRequestOrBuilder.java. 2020-03-17 11:55:45,233 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java. 2020-03-17 11:55:45,233 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RateLimits.java. 2020-03-17 11:55:45,234 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequestOrBuilder.java. 2020-03-17 11:55:45,234 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponse.java. 2020-03-17 11:55:45,234 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OAuthTokenOrBuilder.java. 2020-03-17 11:55:45,234 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OidcTokenOrBuilder.java. 2020-03-17 11:55:45,234 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/UpdateQueueRequest.java. 2020-03-17 11:55:45,235 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequestOrBuilder.java. 2020-03-17 11:55:45,235 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfig.java. 2020-03-17 11:55:45,235 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ResumeQueueRequestOrBuilder.java. 2020-03-17 11:55:45,235 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponseOrBuilder.java. 2020-03-17 11:55:45,236 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequest.java. 2020-03-17 11:55:45,236 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueProto.java. 2020-03-17 11:55:45,236 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/HttpMethod.java. 2020-03-17 11:55:45,236 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfigOrBuilder.java. 2020-03-17 11:55:45,237 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java. 2020-03-17 11:55:45,237 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineRoutingOrBuilder.java. 2020-03-17 11:55:45,237 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java. 2020-03-17 11:55:45,237 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PauseQueueRequest.java. 2020-03-17 11:55:45,238 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TargetProto.java. 2020-03-17 11:55:45,238 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteQueueRequest.java. 2020-03-17 11:55:45,238 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequestOrBuilder.java. 2020-03-17 11:55:45,238 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/StackdriverLoggingConfig.java. 2020-03-17 11:55:45,238 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponseOrBuilder.java. 2020-03-17 11:55:45,239 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequestOrBuilder.java. 2020-03-17 11:55:45,239 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteTaskRequest.java. 2020-03-17 11:55:45,239 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RateLimitsOrBuilder.java. 2020-03-17 11:55:45,239 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/StackdriverLoggingConfigOrBuilder.java. 2020-03-17 11:55:45,240 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/LocationName.java. 2020-03-17 11:55:45,240 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueName.java. 2020-03-17 11:55:45,241 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskName.java. 2020-03-17 11:55:45,243 synthtool > Replaced '^package (.*);' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/grpc-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksGrpc.java. 2020-03-17 11:55:45,247 synthtool > Replaced '(\\s+public final Policy getIamPolicy\\(GetIamPolicyRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java. 2020-03-17 11:55:45,250 synthtool > Replaced '(\\s+public final Policy setIamPolicy\\(SetIamPolicyRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java. 2020-03-17 11:55:45,253 synthtool > Replaced '(\\spublic final TestIamPermissionsResponse testIamPermissions\\(TestIamPermissionsRequest request\\) {\\n\\s+return .*\\n\\s+})' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java. 2020-03-17 11:55:45,277 synthtool > Running java formatter on 32 files 2020-03-17 11:55:50,236 synthtool > Running java formatter on 1 files 2020-03-17 11:55:52,859 synthtool > Running java formatter on 61 files .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/release-please.yml .github/trusted-contribution.yml .kokoro/build.bat .kokoro/build.sh .kokoro/coerce_logs.sh .kokoro/common.cfg .kokoro/continuous/common.cfg .kokoro/continuous/dependencies.cfg .kokoro/continuous/integration.cfg .kokoro/continuous/java11.cfg .kokoro/continuous/java7.cfg .kokoro/continuous/java8-osx.cfg .kokoro/continuous/java8-win.cfg .kokoro/continuous/java8.cfg .kokoro/continuous/lint.cfg .kokoro/continuous/propose_release.cfg .kokoro/continuous/samples.cfg .kokoro/dependencies.sh .kokoro/linkage-monitor.sh .kokoro/nightly/common.cfg .kokoro/nightly/dependencies.cfg .kokoro/nightly/integration.cfg .kokoro/nightly/java11.cfg .kokoro/nightly/java7.cfg .kokoro/nightly/java8-osx.cfg .kokoro/nightly/java8-win.cfg .kokoro/nightly/java8.cfg .kokoro/nightly/lint.cfg .kokoro/nightly/samples.cfg .kokoro/presubmit/clirr.cfg .kokoro/presubmit/common.cfg .kokoro/presubmit/dependencies.cfg .kokoro/presubmit/integration.cfg .kokoro/presubmit/java11.cfg .kokoro/presubmit/java7.cfg .kokoro/presubmit/java8-osx.cfg .kokoro/presubmit/java8-win.cfg .kokoro/presubmit/java8.cfg .kokoro/presubmit/linkage-monitor.cfg .kokoro/presubmit/lint.cfg .kokoro/presubmit/samples.cfg .kokoro/release/bump_snapshot.cfg .kokoro/release/common.cfg .kokoro/release/common.sh .kokoro/release/drop.cfg .kokoro/release/drop.sh .kokoro/release/promote.cfg .kokoro/release/promote.sh .kokoro/release/publish_javadoc.cfg .kokoro/release/publish_javadoc.sh .kokoro/release/snapshot.cfg .kokoro/release/snapshot.sh .kokoro/release/stage.cfg .kokoro/release/stage.sh .kokoro/trampoline.sh CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml java.header license-checks.xml renovate.json samples/install-without-bom/pom.xml samples/pom.xml samples/snapshot/pom.xml samples/snippets/pom.xml 2020-03-17 11:55:59,756 synthtool > merge: CODE_OF_CONDUCT.md 2020-03-17 11:55:59,757 synthtool > merge: java.header 2020-03-17 11:55:59,757 synthtool > merge: license-checks.xml 2020-03-17 11:55:59,757 synthtool > merge: LICENSE 2020-03-17 11:55:59,757 synthtool > merge: README.md 2020-03-17 11:55:59,758 synthtool > merge: CONTRIBUTING.md 2020-03-17 11:55:59,758 synthtool > merge: renovate.json 2020-03-17 11:55:59,758 synthtool > merge: codecov.yaml 2020-03-17 11:55:59,760 synthtool > merge: .kokoro/build.sh 2020-03-17 11:55:59,760 synthtool > merge: .kokoro/coerce_logs.sh 2020-03-17 11:55:59,760 synthtool > merge: .kokoro/dependencies.sh 2020-03-17 11:55:59,760 synthtool > merge: .kokoro/linkage-monitor.sh 2020-03-17 11:55:59,761 synthtool > merge: .kokoro/trampoline.sh 2020-03-17 11:55:59,761 synthtool > merge: .kokoro/common.cfg 2020-03-17 11:55:59,761 synthtool > merge: .kokoro/build.bat 2020-03-17 11:55:59,761 synthtool > merge: .kokoro/release/promote.sh 2020-03-17 11:55:59,762 synthtool > merge: .kokoro/release/snapshot.sh 2020-03-17 11:55:59,762 synthtool > merge: .kokoro/release/stage.sh 2020-03-17 11:55:59,762 synthtool > merge: .kokoro/release/bump_snapshot.cfg 2020-03-17 11:55:59,762 synthtool > merge: .kokoro/release/drop.cfg 2020-03-17 11:55:59,763 synthtool > merge: .kokoro/release/snapshot.cfg 2020-03-17 11:55:59,763 synthtool > merge: .kokoro/release/promote.cfg 2020-03-17 11:55:59,763 synthtool > merge: .kokoro/release/publish_javadoc.sh 2020-03-17 11:55:59,763 synthtool > merge: .kokoro/release/common.cfg 2020-03-17 11:55:59,764 synthtool > merge: .kokoro/release/drop.sh 2020-03-17 11:55:59,764 synthtool > merge: .kokoro/release/publish_javadoc.cfg 2020-03-17 11:55:59,764 synthtool > merge: .kokoro/release/stage.cfg 2020-03-17 11:55:59,764 synthtool > merge: .kokoro/release/common.sh 2020-03-17 11:55:59,765 synthtool > merge: .kokoro/nightly/lint.cfg 2020-03-17 11:55:59,765 synthtool > merge: .kokoro/nightly/java11.cfg 2020-03-17 11:55:59,765 synthtool > merge: .kokoro/nightly/samples.cfg 2020-03-17 11:55:59,766 synthtool > merge: .kokoro/nightly/java8.cfg 2020-03-17 11:55:59,766 synthtool > merge: .kokoro/nightly/java7.cfg 2020-03-17 11:55:59,766 synthtool > merge: .kokoro/nightly/common.cfg 2020-03-17 11:55:59,766 synthtool > merge: .kokoro/nightly/dependencies.cfg 2020-03-17 11:55:59,767 synthtool > merge: .kokoro/nightly/java8-osx.cfg 2020-03-17 11:55:59,767 synthtool > merge: .kokoro/nightly/java8-win.cfg 2020-03-17 11:55:59,767 synthtool > merge: .kokoro/nightly/integration.cfg 2020-03-17 11:55:59,767 synthtool > merge: .kokoro/presubmit/lint.cfg 2020-03-17 11:55:59,768 synthtool > merge: .kokoro/presubmit/clirr.cfg 2020-03-17 11:55:59,768 synthtool > merge: .kokoro/presubmit/java11.cfg 2020-03-17 11:55:59,768 synthtool > merge: .kokoro/presubmit/samples.cfg 2020-03-17 11:55:59,769 synthtool > merge: .kokoro/presubmit/linkage-monitor.cfg 2020-03-17 11:55:59,769 synthtool > merge: .kokoro/presubmit/java8.cfg 2020-03-17 11:55:59,769 synthtool > merge: .kokoro/presubmit/java7.cfg 2020-03-17 11:55:59,769 synthtool > merge: .kokoro/presubmit/common.cfg 2020-03-17 11:55:59,770 synthtool > merge: .kokoro/presubmit/dependencies.cfg 2020-03-17 11:55:59,770 synthtool > merge: .kokoro/presubmit/java8-osx.cfg 2020-03-17 11:55:59,770 synthtool > merge: .kokoro/presubmit/java8-win.cfg 2020-03-17 11:55:59,770 synthtool > merge: .kokoro/presubmit/integration.cfg 2020-03-17 11:55:59,771 synthtool > merge: .kokoro/continuous/lint.cfg 2020-03-17 11:55:59,771 synthtool > merge: .kokoro/continuous/java11.cfg 2020-03-17 11:55:59,771 synthtool > merge: .kokoro/continuous/samples.cfg 2020-03-17 11:55:59,771 synthtool > merge: .kokoro/continuous/java8.cfg 2020-03-17 11:55:59,772 synthtool > merge: .kokoro/continuous/java7.cfg 2020-03-17 11:55:59,772 synthtool > merge: .kokoro/continuous/propose_release.cfg 2020-03-17 11:55:59,772 synthtool > merge: .kokoro/continuous/common.cfg 2020-03-17 11:55:59,772 synthtool > merge: .kokoro/continuous/dependencies.cfg 2020-03-17 11:55:59,773 synthtool > merge: .kokoro/continuous/java8-osx.cfg 2020-03-17 11:55:59,773 synthtool > merge: .kokoro/continuous/java8-win.cfg 2020-03-17 11:55:59,773 synthtool > merge: .kokoro/continuous/integration.cfg 2020-03-17 11:55:59,773 synthtool > merge: .github/trusted-contribution.yml 2020-03-17 11:55:59,774 synthtool > merge: .github/release-please.yml 2020-03-17 11:55:59,774 synthtool > merge: .github/PULL_REQUEST_TEMPLATE.md 2020-03-17 11:55:59,774 synthtool > merge: .github/ISSUE_TEMPLATE/feature_request.md 2020-03-17 11:55:59,774 synthtool > merge: .github/ISSUE_TEMPLATE/bug_report.md 2020-03-17 11:55:59,775 synthtool > merge: .github/ISSUE_TEMPLATE/support_request.md 2020-03-17 11:55:59,780 synthtool > Wrote metadata to synth.metadata. ```
--- tasks/pom.xml | 56 +++++++++++++++++++++++++++++++++++++++ tasks/snippets/pom.xml | 60 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 tasks/pom.xml create mode 100644 tasks/snippets/pom.xml diff --git a/tasks/pom.xml b/tasks/pom.xml new file mode 100644 index 00000000000..86f73742879 --- /dev/null +++ b/tasks/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-cloudtasks-samples + 0.0.1-SNAPSHOT + pom + Google Cloud Tasks Samples Parent + https://github.com/googleapis/java-tasks + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml new file mode 100644 index 00000000000..01b1867d15a --- /dev/null +++ b/tasks/snippets/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + com.google.cloud + cloudtasks-snippets + jar + Google Cloud Tasks Snippets + https://github.com/googleapis/java-tasks + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + + com.google.cloud + libraries-bom + 4.2.0 + pom + import + + + + + + + com.google.cloud + google-cloud-tasks + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + From fcbf4fa871f82c679f5dfba2bd20aafd52809c0d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 23 Mar 2020 18:23:29 +0100 Subject: [PATCH 002/123] chore(deps): update dependency com.google.cloud:libraries-bom to v4.3.0 (#95) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `4.2.0` -> `4.3.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 01b1867d15a..fce6eaf9c91 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.2.0 + 4.3.0 pom import From 8bfa30c45a0d4299c50d597ded68d43423a8c2b3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 Mar 2020 00:28:14 +0100 Subject: [PATCH 003/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.13 (#100) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.12` -> `1.0.13` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.13`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.13) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.12...v1.0.13) Fix some issues w/ Checkstyle configuration. We left the option to turn it off out.
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 86f73742879..cb8fd6c02b5 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.13 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index fce6eaf9c91..e98d309d541 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.13 From 9400419302e4128f26d4613f4f94dbc384c245cc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 30 Mar 2020 19:57:39 +0200 Subject: [PATCH 004/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.14 (#104) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.13` -> `1.0.14` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.14`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.14) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.13...v1.0.14) - Update CheckStyle to 8.31 - Add SpotBugs
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index cb8fd6c02b5..80a5e84763d 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.13 + 1.0.14 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index e98d309d541..e01c90ad13f 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.13 + 1.0.14 From 70423cf0400874422ff7f9d37ef896305f225431 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 23:16:11 +0200 Subject: [PATCH 005/123] chore(deps): update dependency com.google.cloud:libraries-bom to v4.4.0 (#107) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `4.3.0` -> `4.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index e01c90ad13f..e8f7df568f8 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.3.0 + 4.4.0 pom import From 657e637bcc0e3a579afcc10a24850428d46c0637 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Apr 2020 22:10:13 +0200 Subject: [PATCH 006/123] chore(deps): update dependency com.google.cloud:libraries-bom to v4.4.1 (#111) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `4.4.0` -> `4.4.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index e8f7df568f8..28f6e07f7aa 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.4.0 + 4.4.1 pom import From a179b2bd71c66cf8c38360f9e375c32dd7ac8ef1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Apr 2020 02:20:05 +0200 Subject: [PATCH 007/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#109) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.14` -> `1.0.15` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.15`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.15) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.14...v1.0.15) - Move some stuff around (in prep for a change to release process) pom.xml's - Add an exclude filter for SpotBugs. (disable the Java 11 surprise) - Don't fail on SpotBugs issues for now - add PMD reporting - Don't fail on PMD issues for now.
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 80a5e84763d..b7ae2326dd7 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.14 + 1.0.15 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 28f6e07f7aa..00bf91ab01d 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.14 + 1.0.15 From d2ec3a20abf4962b577bed709a17c06e77819bf6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Apr 2020 20:28:15 +0200 Subject: [PATCH 008/123] chore(deps): update dependency com.google.cloud:libraries-bom to v5 (#121) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `4.4.1` -> `5.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 00bf91ab01d..7f3398146a9 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.4.1 + 5.1.0 pom import From 4ad166f97ce4eb899faccae17383f82c6e5a3da1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 16 Apr 2020 17:51:42 +0200 Subject: [PATCH 009/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.16 (#126) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.15` -> `1.0.16` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.16`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.16) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.15...v1.0.16) Add a few SpotBugs exclusions: - `RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE` - existing - codegen bug - `UPM_UNCALLED_PRIVATE_METHOD` - probably SpotBug issue - `NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE` - likely SpotBug issue - `CLI_CONSTANT_LIST_INDEX` - style issue particular to our samples - `OBL_UNSATISFIED_OBLIGATION` - issue for SQL clients
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index b7ae2326dd7..b04b421370d 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 7f3398146a9..a7c93be9ee0 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 From 9e0cab0ab280c7d3981df7a08db69b2a99a56dce Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 17 Apr 2020 08:49:22 +0200 Subject: [PATCH 010/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.17 (#129) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.16` -> `1.0.17` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.17`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.17) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.16...v1.0.17) - require -P lint Lets not burden customers with our development rules. - Move Checkstyle, ErrorProne, PMD, and SpotBugs to only run w/ -P lint - Update the Readme - spotbugs-annotations 4.0.2
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index b04b421370d..fbce98b9f21 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index a7c93be9ee0..3ef463f8fc9 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 From 8bbb20b075e654877357715dd3da18e8bc57dda4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 24 Apr 2020 20:40:21 +0200 Subject: [PATCH 011/123] chore(deps): update dependency com.google.cloud:libraries-bom to v5.2.0 (#132) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.1.0` -> `5.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 3ef463f8fc9..3df3205f834 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.1.0 + 5.2.0 pom import From a9ef75c39cecd76b8b082c19a433bf18eb6873da Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 29 Apr 2020 01:08:00 +0200 Subject: [PATCH 012/123] chore(deps): update dependency com.google.cloud:libraries-bom to v5.3.0 (#135) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.2.0` -> `5.3.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 3df3205f834..8409fcca3bc 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.2.0 + 5.3.0 pom import From 87e04c9b31bd8082365b50fbd20ca88873046ec9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 May 2020 23:45:42 +0200 Subject: [PATCH 013/123] chore(deps): update dependency com.google.cloud:libraries-bom to v5.4.0 (#143) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.3.0` -> `5.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 8409fcca3bc..1a5ece8d82c 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.3.0 + 5.4.0 pom import From f7fe470efd481a31767eb3c30f96ad4aa7ce4bd1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 29 May 2020 20:34:54 +0200 Subject: [PATCH 014/123] chore(deps): update dependency com.google.cloud:libraries-bom to v5.5.0 (#152) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.4.0` -> `5.5.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 1a5ece8d82c..0a83fab20b4 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.4.0 + 5.5.0 pom import From e5e166203cc4d20ec68d0998c431f8650f84fc30 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 00:46:11 +0200 Subject: [PATCH 015/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.18 (#163) This PR contains the following updates: | Package | Update | Change | |---|---|---| | com.google.cloud.samples:shared-configuration | patch | `1.0.17` -> `1.0.18` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index fbce98b9f21..8e9233eb0be 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.18 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 0a83fab20b4..5e10b08a179 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.18 From a2233ef7c2c697c0bf27a933df36df072c4f5258 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 00:52:20 +0200 Subject: [PATCH 016/123] chore(deps): update dependency com.google.cloud:libraries-bom to v5.7.0 (#162) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.5.0` -> `5.7.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 5e10b08a179..646c2c1dac1 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.5.0 + 5.7.0 pom import From 621410b1862cf7da68718e5e8a045d615d6d3998 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Jun 2020 01:28:02 +0200 Subject: [PATCH 017/123] chore(deps): update dependency com.google.cloud:libraries-bom to v6 (#170) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `5.7.0` -> `6.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 646c2c1dac1..a549369d4d6 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.7.0 + 6.0.0 pom import From 0a68e794e3df9054973023d0695e693c31d031fd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Jun 2020 19:42:57 +0200 Subject: [PATCH 018/123] chore(deps): update dependency com.google.cloud:libraries-bom to v7 (#172) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `6.0.0` -> `7.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index a549369d4d6..f68df31cae2 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 6.0.0 + 7.0.0 pom import From ebed4caf817d984058ad2698b9a9a3b2a5a45c2b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Jun 2020 00:43:40 +0200 Subject: [PATCH 019/123] chore(deps): update dependency com.google.cloud:libraries-bom to v7.0.1 (#179) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `7.0.0` -> `7.0.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index f68df31cae2..1d162934a25 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 7.0.0 + 7.0.1 pom import From c7882364ba369085c50aea74fa3db8c8429bb163 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Jun 2020 07:23:56 +0200 Subject: [PATCH 020/123] chore(deps): update dependency com.google.cloud:libraries-bom to v8 (#185) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `7.0.1` -> `8.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 1d162934a25..c0296ac4970 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 7.0.1 + 8.0.0 pom import From a6853b08bbbe4b90cd3cd3b103af9b0082148f50 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 16 Jul 2020 19:47:20 +0200 Subject: [PATCH 021/123] chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#192) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `8.0.0` -> `8.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index c0296ac4970..71130b67389 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 8.0.0 + 8.1.0 pom import From e21d14506438248b183a408f077d7b6a1cd5a769 Mon Sep 17 00:00:00 2001 From: Dane Zeke Liergaard Date: Sat, 14 Jul 2018 16:55:12 -0700 Subject: [PATCH 022/123] samples: Add task create & lease/acknowledge sample. (#1153) * Add task create & lease/acknowledge sample. * Add Appengine Queue Tasks sample. --- .../src/main/java/com/example/Quickstart.java | 175 ++++++++++++++++++ .../test/java/com/example/QuickstartIT.java | 82 ++++++++ 2 files changed, 257 insertions(+) create mode 100644 tasks/snippets/src/main/java/com/example/Quickstart.java create mode 100644 tasks/snippets/src/test/java/com/example/QuickstartIT.java diff --git a/tasks/snippets/src/main/java/com/example/Quickstart.java b/tasks/snippets/src/main/java/com/example/Quickstart.java new file mode 100644 index 00000000000..77040ef8285 --- /dev/null +++ b/tasks/snippets/src/main/java/com/example/Quickstart.java @@ -0,0 +1,175 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example; + +// [START tasks_quickstart] + +import com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CreateTaskRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.PullMessage; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.common.base.Strings; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; + +import java.io.IOException; +import java.nio.charset.Charset; + +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +public class Quickstart { + private static String GGOGLE_CLOUD_PROJECT_KEY = "GOOGLE_CLOUD_PROJECT"; + + private static Option PROJECT_ID_OPTION = Option.builder("project") + .longOpt("project-id") + .desc("The Google Cloud Project, if not set as GOOGLE_CLOUD_PROJECT env var.") + .hasArg() + .argName("project-id") + .type(String.class) + .build(); + + private static Option QUEUE_OPTION = Option.builder("queue") + .required() + .longOpt("queue") + .desc("The Cloud Tasks queue.") + .hasArg() + .argName("queue") + .type(String.class) + .build(); + + private static Option LOCATION_OPTION = Option.builder("location") + .required() + .longOpt("location") + .desc("The region in which your queue is running.") + .hasArg() + .argName("location") + .type(String.class) + .build(); + + public static void main(String... args) throws Exception { + Options options = new Options(); + options.addOption(PROJECT_ID_OPTION); + options.addOption(QUEUE_OPTION); + options.addOption(LOCATION_OPTION); + + if (args.length == 0) { + printUsage(options); + return; + } + + CommandLineParser parser = new DefaultParser(); + CommandLine params; + try { + params = parser.parse(options, args); + } catch (ParseException e) { + System.err.println("Invalid command line: " + e.getMessage()); + printUsage(options); + return; + } + + String projectId; + if (params.hasOption("project-id")) { + projectId = params.getOptionValue("project-id"); + } else { + projectId = System.getenv(GGOGLE_CLOUD_PROJECT_KEY); + } + if (Strings.isNullOrEmpty(projectId)) { + printUsage(options); + return; + } + + String queue = params.getOptionValue(QUEUE_OPTION.getOpt()); + String location = params.getOptionValue(LOCATION_OPTION.getOpt()); + + switch (args[0]) { + default: + printUsage(options); + break; + case "create-task": + createTask(projectId, queue, location); + break; + case "lease-and-ack-task": + pullAndAckTask(projectId, queue, location); + break; + } + } + + // [START cloud_tasks_create_task] + private static void createTask(String projectId, String queueName, String location) + throws IOException { + try (CloudTasksClient client = CloudTasksClient.create()) { + Task.Builder taskBuilder = Task + .newBuilder() + .setPullMessage(PullMessage.newBuilder().setPayload( + ByteString.copyFrom("a message for recipient", Charset.defaultCharset()))); + + Task newTask = client.createTask(CreateTaskRequest + .newBuilder() + .setParent(QueueName.of(projectId, location, queueName).toString()) + .setTask(taskBuilder) + .build()); + System.out.println("Task created: " + newTask.getName()); + } + } + // [END cloud_tasks_create_task] + + // [START cloud_tasks_lease_and_acknowledge_task] + private static void pullAndAckTask(String projectId, String queueName, String location) { + try (CloudTasksClient client = CloudTasksClient.create()) { + LeaseTasksRequest leaseReq = LeaseTasksRequest.newBuilder() + .setParent(QueueName.of(projectId, location, queueName).toString()) + .setLeaseDuration(Duration.newBuilder().setSeconds(600)) + .setMaxTasks(1) + .setResponseView(Task.View.FULL) + .build(); + LeaseTasksResponse response = client.leaseTasks(leaseReq); + if (response.getTasksCount() == 0) { + System.out.println("No tasks found in queue."); + return; + } + Task task = response.getTasksList().get(0); + System.out.println("Leased task: " + task.getName()); + AcknowledgeTaskRequest ackRequest = AcknowledgeTaskRequest + .newBuilder() + .setName(task.getName()) + .setScheduleTime(task.getScheduleTime()) + .build(); + client.acknowledgeTask(ackRequest); + System.out.println("Acknowledged task: " + task.getName()); + } catch (Exception e) { + System.out.println("Exception during PullAndAckTask: " + e.getMessage()); + } + } + // [END cloud_tasks_lease_and_acknowledge_task] + + private static void printUsage(Options options) { + HelpFormatter formatter = new HelpFormatter(); + formatter.printHelp("client", + "A simple Cloud Tasks command line client.", options, "", true); + } +} +// [END tasks_quickstart] diff --git a/tasks/snippets/src/test/java/com/example/QuickstartIT.java b/tasks/snippets/src/test/java/com/example/QuickstartIT.java new file mode 100644 index 00000000000..d0e21e076b0 --- /dev/null +++ b/tasks/snippets/src/test/java/com/example/QuickstartIT.java @@ -0,0 +1,82 @@ +/* + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertTrue; + +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; + +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** + * Integration (system) tests for {@link Quickstart}. + */ +@RunWith(JUnit4.class) +@SuppressWarnings("checkstyle:abbreviationaswordinname") +public class QuickstartIT { + private static String queue_name = "my-pull-queue"; + private static String location = "us-east1"; + private ByteArrayOutputStream bout; + private PrintStream out; + + @BeforeClass + public static void setUpClass() throws Exception { + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + PrintStream out = new PrintStream(bout); + System.setOut(out); + } + + // Purge the task queue when tests done. + @AfterClass + public static void tearDownClass() throws IOException { + try (CloudTasksClient client = CloudTasksClient.create()) { + client.purgeQueue(QueueName.of(System.getenv("GOOGLE_CLOUD_PROJECT"), location, queue_name)); + } + } + + @Before + public void setUp() throws Exception { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + } + + @Test + public void createTaskTest() throws Exception { + Quickstart.main("create-task", "--queue", queue_name, "--location", location); + assertThat(bout.toString()).contains("Task created: "); + } + + @Test + public void leaseAndAcknowledge() throws Exception { + Quickstart.main("lease-and-ack-task", "--queue", queue_name, "--location", location); + assertThat(bout.toString()).contains("Leased task: "); + assertThat(bout.toString()).contains("Acknowledged task: "); + } +} From c1949caaa11a7310d46557640b39feecc27c0ab0 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Wed, 12 Sep 2018 15:12:39 -0700 Subject: [PATCH 023/123] samples: Update Cloud tasks samples (#1211) * update sample * remove pull queues * updates for beta * Change comment * revert env var name --- .../src/main/java/com/example/Quickstart.java | 175 ------------------ .../test/java/com/example/QuickstartIT.java | 82 -------- 2 files changed, 257 deletions(-) delete mode 100644 tasks/snippets/src/main/java/com/example/Quickstart.java delete mode 100644 tasks/snippets/src/test/java/com/example/QuickstartIT.java diff --git a/tasks/snippets/src/main/java/com/example/Quickstart.java b/tasks/snippets/src/main/java/com/example/Quickstart.java deleted file mode 100644 index 77040ef8285..00000000000 --- a/tasks/snippets/src/main/java/com/example/Quickstart.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example; - -// [START tasks_quickstart] - -import com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest; -import com.google.cloud.tasks.v2beta2.CloudTasksClient; -import com.google.cloud.tasks.v2beta2.CreateTaskRequest; -import com.google.cloud.tasks.v2beta2.LeaseTasksRequest; -import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; -import com.google.cloud.tasks.v2beta2.PullMessage; -import com.google.cloud.tasks.v2beta2.QueueName; -import com.google.cloud.tasks.v2beta2.Task; -import com.google.common.base.Strings; -import com.google.protobuf.ByteString; -import com.google.protobuf.Duration; - -import java.io.IOException; -import java.nio.charset.Charset; - -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class Quickstart { - private static String GGOGLE_CLOUD_PROJECT_KEY = "GOOGLE_CLOUD_PROJECT"; - - private static Option PROJECT_ID_OPTION = Option.builder("project") - .longOpt("project-id") - .desc("The Google Cloud Project, if not set as GOOGLE_CLOUD_PROJECT env var.") - .hasArg() - .argName("project-id") - .type(String.class) - .build(); - - private static Option QUEUE_OPTION = Option.builder("queue") - .required() - .longOpt("queue") - .desc("The Cloud Tasks queue.") - .hasArg() - .argName("queue") - .type(String.class) - .build(); - - private static Option LOCATION_OPTION = Option.builder("location") - .required() - .longOpt("location") - .desc("The region in which your queue is running.") - .hasArg() - .argName("location") - .type(String.class) - .build(); - - public static void main(String... args) throws Exception { - Options options = new Options(); - options.addOption(PROJECT_ID_OPTION); - options.addOption(QUEUE_OPTION); - options.addOption(LOCATION_OPTION); - - if (args.length == 0) { - printUsage(options); - return; - } - - CommandLineParser parser = new DefaultParser(); - CommandLine params; - try { - params = parser.parse(options, args); - } catch (ParseException e) { - System.err.println("Invalid command line: " + e.getMessage()); - printUsage(options); - return; - } - - String projectId; - if (params.hasOption("project-id")) { - projectId = params.getOptionValue("project-id"); - } else { - projectId = System.getenv(GGOGLE_CLOUD_PROJECT_KEY); - } - if (Strings.isNullOrEmpty(projectId)) { - printUsage(options); - return; - } - - String queue = params.getOptionValue(QUEUE_OPTION.getOpt()); - String location = params.getOptionValue(LOCATION_OPTION.getOpt()); - - switch (args[0]) { - default: - printUsage(options); - break; - case "create-task": - createTask(projectId, queue, location); - break; - case "lease-and-ack-task": - pullAndAckTask(projectId, queue, location); - break; - } - } - - // [START cloud_tasks_create_task] - private static void createTask(String projectId, String queueName, String location) - throws IOException { - try (CloudTasksClient client = CloudTasksClient.create()) { - Task.Builder taskBuilder = Task - .newBuilder() - .setPullMessage(PullMessage.newBuilder().setPayload( - ByteString.copyFrom("a message for recipient", Charset.defaultCharset()))); - - Task newTask = client.createTask(CreateTaskRequest - .newBuilder() - .setParent(QueueName.of(projectId, location, queueName).toString()) - .setTask(taskBuilder) - .build()); - System.out.println("Task created: " + newTask.getName()); - } - } - // [END cloud_tasks_create_task] - - // [START cloud_tasks_lease_and_acknowledge_task] - private static void pullAndAckTask(String projectId, String queueName, String location) { - try (CloudTasksClient client = CloudTasksClient.create()) { - LeaseTasksRequest leaseReq = LeaseTasksRequest.newBuilder() - .setParent(QueueName.of(projectId, location, queueName).toString()) - .setLeaseDuration(Duration.newBuilder().setSeconds(600)) - .setMaxTasks(1) - .setResponseView(Task.View.FULL) - .build(); - LeaseTasksResponse response = client.leaseTasks(leaseReq); - if (response.getTasksCount() == 0) { - System.out.println("No tasks found in queue."); - return; - } - Task task = response.getTasksList().get(0); - System.out.println("Leased task: " + task.getName()); - AcknowledgeTaskRequest ackRequest = AcknowledgeTaskRequest - .newBuilder() - .setName(task.getName()) - .setScheduleTime(task.getScheduleTime()) - .build(); - client.acknowledgeTask(ackRequest); - System.out.println("Acknowledged task: " + task.getName()); - } catch (Exception e) { - System.out.println("Exception during PullAndAckTask: " + e.getMessage()); - } - } - // [END cloud_tasks_lease_and_acknowledge_task] - - private static void printUsage(Options options) { - HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("client", - "A simple Cloud Tasks command line client.", options, "", true); - } -} -// [END tasks_quickstart] diff --git a/tasks/snippets/src/test/java/com/example/QuickstartIT.java b/tasks/snippets/src/test/java/com/example/QuickstartIT.java deleted file mode 100644 index d0e21e076b0..00000000000 --- a/tasks/snippets/src/test/java/com/example/QuickstartIT.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertTrue; - -import com.google.cloud.tasks.v2beta2.CloudTasksClient; -import com.google.cloud.tasks.v2beta2.QueueName; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; - -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Integration (system) tests for {@link Quickstart}. - */ -@RunWith(JUnit4.class) -@SuppressWarnings("checkstyle:abbreviationaswordinname") -public class QuickstartIT { - private static String queue_name = "my-pull-queue"; - private static String location = "us-east1"; - private ByteArrayOutputStream bout; - private PrintStream out; - - @BeforeClass - public static void setUpClass() throws Exception { - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - PrintStream out = new PrintStream(bout); - System.setOut(out); - } - - // Purge the task queue when tests done. - @AfterClass - public static void tearDownClass() throws IOException { - try (CloudTasksClient client = CloudTasksClient.create()) { - client.purgeQueue(QueueName.of(System.getenv("GOOGLE_CLOUD_PROJECT"), location, queue_name)); - } - } - - @Before - public void setUp() throws Exception { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - } - - @Test - public void createTaskTest() throws Exception { - Quickstart.main("create-task", "--queue", queue_name, "--location", location); - assertThat(bout.toString()).contains("Task created: "); - } - - @Test - public void leaseAndAcknowledge() throws Exception { - Quickstart.main("lease-and-ack-task", "--queue", queue_name, "--location", location); - assertThat(bout.toString()).contains("Leased task: "); - assertThat(bout.toString()).contains("Acknowledged task: "); - } -} From 3a3c0459933454d15ec8beb9c04869399d2ed286 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Fri, 19 Apr 2019 12:20:36 -0700 Subject: [PATCH 024/123] samples: [Cloud Tasks] Add HTTP push queue sample (#1355) * Add HTTP sample * Fix linting * remove CLI * Move http sample * Fix pom.xml * Update pom and linting * Update tasks version --- .../java/com/example/task/CreateHttpTask.java | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java new file mode 100644 index 00000000000..9b4a1ac23d6 --- /dev/null +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java @@ -0,0 +1,64 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.task; + +// [START cloud_tasks_create_http_task] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.HttpMethod; +import com.google.cloud.tasks.v2beta3.HttpRequest; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.protobuf.ByteString; +import java.nio.charset.Charset; + +public class CreateHttpTask { + + public static void main(String[] args) throws Exception { + String projectId = System.getenv("PROJECT_ID"); + String queueName = System.getenv("QUEUE_ID"); + String location = System.getenv("LOCATION_ID"); + String url = System.getenv("URL"); + + // Instantiates a client. + try (CloudTasksClient client = CloudTasksClient.create()) { + // Variables provided by the system variables. + // projectId = "my-project-id"; + // queueName = "my-appengine-queue"; + // location = "us-central1"; + // url = "https://.appspot.com/tasks/create"; + String payload = "hello"; + + // Construct the fully qualified queue name. + String queuePath = QueueName.of(projectId, location, queueName).toString(); + + // Construct the task body. + Task.Builder taskBuilder = + Task.newBuilder() + .setHttpRequest( + HttpRequest.newBuilder() + .setBody(ByteString.copyFrom(payload, Charset.defaultCharset())) + .setUrl(url) + .setHttpMethod(HttpMethod.POST) + .build()); + + // Send create task request. + Task task = client.createTask(queuePath, taskBuilder.build()); + System.out.println("Task created: " + task.getName()); + } + } +} +// [END cloud_tasks_create_http_task] From 3b1f9c44d42a112d840a5610e03bbad9be855c57 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Mon, 22 Apr 2019 09:34:01 -0700 Subject: [PATCH 025/123] samples: [Cloud Tasks] Add task sample with auth token (#1389) * Add task sample with auth token * add parent to pom * Update comments --- .../example/task/CreateHttpTaskWithToken.java | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java new file mode 100644 index 00000000000..0891d899c85 --- /dev/null +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -0,0 +1,71 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.task; + +// [START cloud_tasks_create_http_task_with_token] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.HttpMethod; +import com.google.cloud.tasks.v2beta3.HttpRequest; +import com.google.cloud.tasks.v2beta3.OidcToken; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.protobuf.ByteString; +import java.nio.charset.Charset; + +public class CreateHttpTaskWithToken { + + public static void main(String[] args) throws Exception { + String projectId = System.getenv("PROJECT_ID"); + String queueName = System.getenv("QUEUE_ID"); + String location = System.getenv("LOCATION_ID"); + String url = System.getenv("URL"); + + // Instantiates a client. + try (CloudTasksClient client = CloudTasksClient.create()) { + // Variables provided by the system variables. + // projectId = "my-project-id"; + // queueName = "my-appengine-queue"; + // location = "us-central1"; + // url = "https://example.com/tasks/create"; + String payload = "hello"; + + // Construct the fully qualified queue name. + String queuePath = QueueName.of(projectId, location, queueName).toString(); + + // Add your service account email to construct the OIDC token. + // in order to add an authentication header to the request. + OidcToken.Builder oidcTokenBuilder = + OidcToken.newBuilder().setServiceAccountEmail(""); + + // Construct the task body. + Task.Builder taskBuilder = + Task.newBuilder() + .setHttpRequest( + HttpRequest.newBuilder() + .setBody(ByteString.copyFrom(payload, Charset.defaultCharset())) + .setHttpMethod(HttpMethod.POST) + .setUrl(url) + .setOidcToken(oidcTokenBuilder) + .build()); + + // Send create task request. + Task task = client.createTask(queuePath, taskBuilder.build()); + System.out.println("Task created: " + task.getName()); + } + } +} +// [END cloud_tasks_create_http_task_with_token] From a8e8d551db833f9c0e2a55b3ffeee9bbceb5108e Mon Sep 17 00:00:00 2001 From: MaxRossGoogle Date: Tue, 14 May 2019 09:56:53 -0700 Subject: [PATCH 026/123] samples: Update example to not reference GAE (#1412) --- .../src/main/java/com/example/task/CreateHttpTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java index 9b4a1ac23d6..a1eed42320a 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java @@ -37,9 +37,9 @@ public static void main(String[] args) throws Exception { try (CloudTasksClient client = CloudTasksClient.create()) { // Variables provided by the system variables. // projectId = "my-project-id"; - // queueName = "my-appengine-queue"; + // queueName = "my-queue"; // location = "us-central1"; - // url = "https://.appspot.com/tasks/create"; + // url = "https://example.com/hellohandler"; String payload = "hello"; // Construct the fully qualified queue name. From fbe30d54594fdbf122844e9ac913de5ffc201c21 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Tue, 14 May 2019 15:14:02 -0700 Subject: [PATCH 027/123] samples: Update comments in Task samples (#1418) --- .../snippets/src/main/java/com/example/task/CreateHttpTask.java | 2 +- .../src/main/java/com/example/task/CreateHttpTaskWithToken.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java index a1eed42320a..6e8412426bb 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java @@ -39,7 +39,7 @@ public static void main(String[] args) throws Exception { // projectId = "my-project-id"; // queueName = "my-queue"; // location = "us-central1"; - // url = "https://example.com/hellohandler"; + // url = "https://example.com/taskhandler"; String payload = "hello"; // Construct the fully qualified queue name. diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java index 0891d899c85..978ddcc91b1 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -40,7 +40,7 @@ public static void main(String[] args) throws Exception { // projectId = "my-project-id"; // queueName = "my-appengine-queue"; // location = "us-central1"; - // url = "https://example.com/tasks/create"; + // url = "https://example.com/taskhandler"; String payload = "hello"; // Construct the fully qualified queue name. From 601c672c3c0afa8c13c8243c2e5568994476dafb Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Wed, 15 May 2019 08:50:00 -0700 Subject: [PATCH 028/123] samples: Task ReadMe changes (#1420) * Readme update * fix queue name --- .../src/main/java/com/example/task/CreateHttpTaskWithToken.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java index 978ddcc91b1..f67cee97d32 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -38,7 +38,7 @@ public static void main(String[] args) throws Exception { try (CloudTasksClient client = CloudTasksClient.create()) { // Variables provided by the system variables. // projectId = "my-project-id"; - // queueName = "my-appengine-queue"; + // queueName = "my-queue"; // location = "us-central1"; // url = "https://example.com/taskhandler"; String payload = "hello"; From ee6af3cea08864dd1aaa2f43e7b9a4092dc6f8fe Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Fri, 14 Jun 2019 12:56:32 -0700 Subject: [PATCH 029/123] samples: Add tests to Cloud Tasks Samples (#1459) * Add tests * Update license * Update README * Update for testing purposes * Update queue location * Fix test styling * Library version * Update service account * Fix service account --- .../java/com/example/task/CreateHttpTask.java | 26 +++---- .../example/task/CreateHttpTaskWithToken.java | 31 +++++---- .../com/example/task/CreateHttpTaskIT.java | 67 +++++++++++++++++++ 3 files changed, 97 insertions(+), 27 deletions(-) create mode 100644 tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java index 6e8412426bb..6e1e6b2ee4d 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java @@ -26,24 +26,24 @@ import java.nio.charset.Charset; public class CreateHttpTask { - - public static void main(String[] args) throws Exception { - String projectId = System.getenv("PROJECT_ID"); - String queueName = System.getenv("QUEUE_ID"); - String location = System.getenv("LOCATION_ID"); - String url = System.getenv("URL"); + /** + * Create a task with a HTTP target using the Cloud Tasks client. + * + * @param projectId the Id of the project. + * @param queueId the name of your Queue. + * @param locationId the GCP region of your queue. + * @throws Exception on Cloud Tasks Client errors. + */ + public static void createTask(String projectId, String locationId, String queueId) + throws Exception { // Instantiates a client. try (CloudTasksClient client = CloudTasksClient.create()) { - // Variables provided by the system variables. - // projectId = "my-project-id"; - // queueName = "my-queue"; - // location = "us-central1"; - // url = "https://example.com/taskhandler"; - String payload = "hello"; + String url = "https://example.com/taskhandler"; + String payload = "Hello, World!"; // Construct the fully qualified queue name. - String queuePath = QueueName.of(projectId, location, queueName).toString(); + String queuePath = QueueName.of(projectId, locationId, queueId).toString(); // Construct the task body. Task.Builder taskBuilder = diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java index f67cee97d32..9259243bd97 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -27,29 +27,32 @@ import java.nio.charset.Charset; public class CreateHttpTaskWithToken { - - public static void main(String[] args) throws Exception { - String projectId = System.getenv("PROJECT_ID"); - String queueName = System.getenv("QUEUE_ID"); - String location = System.getenv("LOCATION_ID"); - String url = System.getenv("URL"); + /** + * Create a task with a HTTP target and authorization token using the Cloud Tasks client. + * + * @param projectId the Id of the project. + * @param queueId the name of your Queue. + * @param locationId the GCP region of your queue. + * @param serviceAccountEmail your Cloud IAM service account + * @throws Exception on Cloud Tasks Client errors. + */ + public static void createTask( + String projectId, String locationId, String queueId, String serviceAccountEmail) + throws Exception { // Instantiates a client. try (CloudTasksClient client = CloudTasksClient.create()) { - // Variables provided by the system variables. - // projectId = "my-project-id"; - // queueName = "my-queue"; - // location = "us-central1"; - // url = "https://example.com/taskhandler"; - String payload = "hello"; + String url = + "https://example.com/taskhandler"; // The full url path that the request will be sent to + String payload = "Hello, World!"; // The task HTTP request body // Construct the fully qualified queue name. - String queuePath = QueueName.of(projectId, location, queueName).toString(); + String queuePath = QueueName.of(projectId, locationId, queueId).toString(); // Add your service account email to construct the OIDC token. // in order to add an authentication header to the request. OidcToken.Builder oidcTokenBuilder = - OidcToken.newBuilder().setServiceAccountEmail(""); + OidcToken.newBuilder().setServiceAccountEmail(serviceAccountEmail); // Construct the task body. Task.Builder taskBuilder = diff --git a/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java b/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java new file mode 100644 index 00000000000..02bc66029b4 --- /dev/null +++ b/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java @@ -0,0 +1,67 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.task; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.Timeout; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for creating Tasks with HTTP targets. */ +@RunWith(JUnit4.class) +public class CreateHttpTaskIT { + private static final String PROJECT_ID = "java-docs-samples-testing"; + private static final String LOCATION_ID = "us-east1"; + private static final String QUEUE_ID = "default"; + private static final String EMAIL = + "java-docs-samples-testing@java-docs-samples-testing.iam.gserviceaccount.com"; + private ByteArrayOutputStream bout; + private PrintStream out; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + } + + @After + public void tearDown() { + System.setOut(null); + } + + @Test + public void testCreateHttpTask() throws Exception { + CreateHttpTask.createTask(PROJECT_ID, LOCATION_ID, QUEUE_ID); + String got = bout.toString(); + assertThat(got).contains("Task created:"); + } + + @Test + public void testCreateHttpTaskWithToken() throws Exception { + CreateHttpTaskWithToken.createTask(PROJECT_ID, LOCATION_ID, QUEUE_ID, EMAIL); + String got = bout.toString(); + assertThat(got).contains("Task created:"); + } +} From 799902bf42da7c86afc50457737f6409f2a87118 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Wed, 13 Nov 2019 10:28:43 -0800 Subject: [PATCH 030/123] samples: Update Cloud Tasks library version (#1719) * Update to new library * Update pom.xml * Update to new library * Update pom.xml * Add queue purge to tests * catch exception --- .../main/java/com/example/task/CreateHttpTask.java | 10 +++++----- .../com/example/task/CreateHttpTaskWithToken.java | 12 ++++++------ .../test/java/com/example/task/CreateHttpTaskIT.java | 10 ++++++++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java index 6e1e6b2ee4d..858b439ae58 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java @@ -17,11 +17,11 @@ package com.example.task; // [START cloud_tasks_create_http_task] -import com.google.cloud.tasks.v2beta3.CloudTasksClient; -import com.google.cloud.tasks.v2beta3.HttpMethod; -import com.google.cloud.tasks.v2beta3.HttpRequest; -import com.google.cloud.tasks.v2beta3.QueueName; -import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.HttpMethod; +import com.google.cloud.tasks.v2.HttpRequest; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; import com.google.protobuf.ByteString; import java.nio.charset.Charset; diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java index 9259243bd97..72c4768ef35 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -17,12 +17,12 @@ package com.example.task; // [START cloud_tasks_create_http_task_with_token] -import com.google.cloud.tasks.v2beta3.CloudTasksClient; -import com.google.cloud.tasks.v2beta3.HttpMethod; -import com.google.cloud.tasks.v2beta3.HttpRequest; -import com.google.cloud.tasks.v2beta3.OidcToken; -import com.google.cloud.tasks.v2beta3.QueueName; -import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.HttpMethod; +import com.google.cloud.tasks.v2.HttpRequest; +import com.google.cloud.tasks.v2.OidcToken; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; import com.google.protobuf.ByteString; import java.nio.charset.Charset; diff --git a/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java b/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java index 02bc66029b4..e03d907a677 100644 --- a/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java +++ b/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java @@ -18,13 +18,13 @@ import static com.google.common.truth.Truth.assertThat; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.junit.After; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.Timeout; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -49,6 +49,12 @@ public void setUp() { @After public void tearDown() { System.setOut(null); + try (CloudTasksClient client = CloudTasksClient.create()) { + String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString(); + client.purgeQueue(queuePath); + } catch (Exception e) { + System.out.println("Error with queue purge."); + } } @Test From c7e9c6d4b99a7b067f0dc49885029c0a195673fb Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Sun, 21 Jun 2020 16:54:29 -0500 Subject: [PATCH 031/123] samples: add Java snippets for creating, listing, and deleting queues (#3176) * add Java snippets for creating, listing, and deleting queues * update licenses * styling fixes for lint * fix test comments and remove oldout * have createhttptask use env var * Change System.getProperty to System.getenv and require LOCATION_ID environment variable as well * specify exception type in throws * add main methods and remove javadoc style comments to adhere with style guide --- .../java/com/example/task/CreateHttpTask.java | 21 +++-- .../example/task/CreateHttpTaskWithToken.java | 24 +++-- .../java/com/example/task/CreateQueue.java | 54 +++++++++++ .../java/com/example/task/DeleteQueue.java | 49 ++++++++++ .../java/com/example/task/ListQueues.java | 58 ++++++++++++ .../com/example/task/CreateHttpTaskIT.java | 18 +++- .../java/com/example/task/CreateQueueIT.java | 78 ++++++++++++++++ .../java/com/example/task/DeleteQueueIT.java | 92 +++++++++++++++++++ .../java/com/example/task/ListQueuesIT.java | 90 ++++++++++++++++++ 9 files changed, 463 insertions(+), 21 deletions(-) create mode 100644 tasks/snippets/src/main/java/com/example/task/CreateQueue.java create mode 100644 tasks/snippets/src/main/java/com/example/task/DeleteQueue.java create mode 100644 tasks/snippets/src/main/java/com/example/task/ListQueues.java create mode 100644 tasks/snippets/src/test/java/com/example/task/CreateQueueIT.java create mode 100644 tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java create mode 100644 tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java index 858b439ae58..e86636bbc6b 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTask.java @@ -23,19 +23,22 @@ import com.google.cloud.tasks.v2.QueueName; import com.google.cloud.tasks.v2.Task; import com.google.protobuf.ByteString; +import java.io.IOException; import java.nio.charset.Charset; public class CreateHttpTask { - /** - * Create a task with a HTTP target using the Cloud Tasks client. - * - * @param projectId the Id of the project. - * @param queueId the name of your Queue. - * @param locationId the GCP region of your queue. - * @throws Exception on Cloud Tasks Client errors. - */ + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String locationId = "us-central1"; + String queueId = "my-queue"; + createTask(projectId, locationId, queueId); + } + + // Create a task with a HTTP target using the Cloud Tasks client. public static void createTask(String projectId, String locationId, String queueId) - throws Exception { + throws IOException { // Instantiates a client. try (CloudTasksClient client = CloudTasksClient.create()) { diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java index 72c4768ef35..a341f680fea 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -24,21 +24,25 @@ import com.google.cloud.tasks.v2.QueueName; import com.google.cloud.tasks.v2.Task; import com.google.protobuf.ByteString; +import java.io.IOException; import java.nio.charset.Charset; public class CreateHttpTaskWithToken { - /** - * Create a task with a HTTP target and authorization token using the Cloud Tasks client. - * - * @param projectId the Id of the project. - * @param queueId the name of your Queue. - * @param locationId the GCP region of your queue. - * @param serviceAccountEmail your Cloud IAM service account - * @throws Exception on Cloud Tasks Client errors. - */ + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String locationId = "us-central1"; + String queueId = "my-queue"; + String serviceAccountEmail = + "java-docs-samples-testing@java-docs-samples-testing.iam.gserviceaccount.com"; + createTask(projectId, locationId, queueId, serviceAccountEmail); + } + + // Create a task with a HTTP target and authorization token using the Cloud Tasks client. public static void createTask( String projectId, String locationId, String queueId, String serviceAccountEmail) - throws Exception { + throws IOException { // Instantiates a client. try (CloudTasksClient client = CloudTasksClient.create()) { diff --git a/tasks/snippets/src/main/java/com/example/task/CreateQueue.java b/tasks/snippets/src/main/java/com/example/task/CreateQueue.java new file mode 100644 index 00000000000..04aa81101ad --- /dev/null +++ b/tasks/snippets/src/main/java/com/example/task/CreateQueue.java @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.example.task; + +// [START cloud_tasks_create_queue] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; +import java.io.IOException; + +public class CreateQueue { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String locationId = "us-central1"; + String queueId = "my-queue"; + createQueue(projectId, locationId, queueId); + } + + // Create a queue using the Cloud Tasks client. + public static void createQueue(String projectId, String locationId, String queueId) + throws IOException { + + // Instantiates a client. + try (CloudTasksClient client = CloudTasksClient.create()) { + + // Construct the fully qualified location. + String parent = LocationName.of(projectId, locationId).toString(); + + // Construct the fully qualified queue path. + String queuePath = QueueName.of(projectId, locationId, queueId).toString(); + + // Send create queue request. + Queue queue = client.createQueue(parent, Queue.newBuilder().setName(queuePath).build()); + + System.out.println("Queue created: " + queue.getName()); + } + } +} +// [END cloud_tasks_create_queue] diff --git a/tasks/snippets/src/main/java/com/example/task/DeleteQueue.java b/tasks/snippets/src/main/java/com/example/task/DeleteQueue.java new file mode 100644 index 00000000000..6f5d9898b48 --- /dev/null +++ b/tasks/snippets/src/main/java/com/example/task/DeleteQueue.java @@ -0,0 +1,49 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.example.task; + +// [START cloud_tasks_delete_queue] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import java.io.IOException; + +public class DeleteQueue { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String locationId = "us-central1"; + String queueId = "my-queue"; + deleteQueue(projectId, locationId, queueId); + } + + // Delete a queue using the Cloud Tasks client. + public static void deleteQueue(String projectId, String locationId, String queueId) + throws IOException { + + // Instantiates a client. + try (CloudTasksClient client = CloudTasksClient.create()) { + + // Construct the fully qualified queue path. + String queuePath = QueueName.of(projectId, locationId, queueId).toString(); + + // Send delete queue request. + client.deleteQueue(queuePath); + + System.out.println("Queue deleted: " + queueId); + } + } +} +// [END cloud_tasks_delete_queue] diff --git a/tasks/snippets/src/main/java/com/example/task/ListQueues.java b/tasks/snippets/src/main/java/com/example/task/ListQueues.java new file mode 100644 index 00000000000..85fd8c14cc6 --- /dev/null +++ b/tasks/snippets/src/main/java/com/example/task/ListQueues.java @@ -0,0 +1,58 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.example.task; + +// [START cloud_tasks_list_queues] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; +import java.io.IOException; + +public class ListQueues { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String locationId = "us-central1"; + listQueues(projectId, locationId); + } + + // List queues using the Cloud Tasks client. + public static void listQueues(String projectId, String locationId) + throws IOException { + + // Instantiates a client. + try (CloudTasksClient client = CloudTasksClient.create()) { + + // Construct the fully qualified location path. + String parent = LocationName.of(projectId, locationId).toString(); + + // Send list queues request. + CloudTasksClient.ListQueuesPagedResponse response = client.listQueues(parent); + + // Iterate over results and print queue names + int total = 0; + for (Queue queue : response.iterateAll()) { + System.out.println(queue.getName()); + total++; + } + + if (total == 0) { + System.out.println("No queues found!"); + } + } + } +} +// [END cloud_tasks_list_queues] diff --git a/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java b/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java index e03d907a677..11fd89f0b12 100644 --- a/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java +++ b/tasks/snippets/src/test/java/com/example/task/CreateHttpTaskIT.java @@ -17,6 +17,7 @@ package com.example.task; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertNotNull; import com.google.cloud.tasks.v2.CloudTasksClient; import com.google.cloud.tasks.v2.QueueName; @@ -24,6 +25,7 @@ import java.io.PrintStream; import org.junit.After; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -31,14 +33,26 @@ /** Tests for creating Tasks with HTTP targets. */ @RunWith(JUnit4.class) public class CreateHttpTaskIT { - private static final String PROJECT_ID = "java-docs-samples-testing"; - private static final String LOCATION_ID = "us-east1"; + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String LOCATION_ID = System.getenv("LOCATION_ID"); private static final String QUEUE_ID = "default"; private static final String EMAIL = "java-docs-samples-testing@java-docs-samples-testing.iam.gserviceaccount.com"; private ByteArrayOutputStream bout; private PrintStream out; + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("LOCATION_ID"); + } + @Before public void setUp() { bout = new ByteArrayOutputStream(); diff --git a/tasks/snippets/src/test/java/com/example/task/CreateQueueIT.java b/tasks/snippets/src/test/java/com/example/task/CreateQueueIT.java new file mode 100644 index 00000000000..8677ee30d09 --- /dev/null +++ b/tasks/snippets/src/test/java/com/example/task/CreateQueueIT.java @@ -0,0 +1,78 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.example.task; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertNotNull; + +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.UUID; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for creating queues. */ +@RunWith(JUnit4.class) +public class CreateQueueIT { + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String LOCATION_ID = System.getenv("LOCATION_ID"); + private static final String QUEUE_ID = "test-queue-" + UUID.randomUUID(); + + private ByteArrayOutputStream bout; + private PrintStream out; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("LOCATION_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + } + + @After + public void tearDown() { + try (CloudTasksClient client = CloudTasksClient.create()) { + String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString(); + client.deleteQueue(queuePath); + } catch (Exception e) { + System.out.println("Error with queue deletion."); + } + System.setOut(null); + } + + @Test + public void testCreateQueue() throws Exception { + CreateQueue.createQueue(PROJECT_ID, LOCATION_ID, QUEUE_ID); + String got = bout.toString(); + assertThat(got).contains("Queue created:"); + } +} diff --git a/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java b/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java new file mode 100644 index 00000000000..90c3f74bf59 --- /dev/null +++ b/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java @@ -0,0 +1,92 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.example.task; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertNotNull; + +import com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for deleting queues. */ +@RunWith(JUnit4.class) +public class DeleteQueueIT { + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String LOCATION_ID = System.getenv("LOCATION_ID"); + private static final String QUEUE_ID = "test-queue-" + UUID.randomUUID(); + + private ByteArrayOutputStream bout; + private PrintStream out; + private Queue queue; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("LOCATION_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + + try (CloudTasksClient client = CloudTasksClient.create()) { + String parent = LocationName.of(PROJECT_ID, LOCATION_ID).toString(); + String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString(); + queue = client.createQueue(parent, Queue.newBuilder().setName(queuePath).build()); + } catch (Exception e) { + System.out.println("Error with queue creation."); + } + } + + @After + public void tearDown() { + try (CloudTasksClient client = CloudTasksClient.create()) { + client.deleteQueue(queue.getName()); + } catch (IOException e) { + System.out.println("Error with queue deletion."); + } catch (NotFoundException e) { + System.out.println("Queue already successfully deleted"); + } + System.setOut(null); + } + + @Test + public void testDeleteQueue() throws Exception { + DeleteQueue.deleteQueue(PROJECT_ID, LOCATION_ID, QUEUE_ID); + String got = bout.toString(); + assertThat(got).contains("Queue deleted:"); + } +} diff --git a/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java b/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java new file mode 100644 index 00000000000..11e68b8e58e --- /dev/null +++ b/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java @@ -0,0 +1,90 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.example.task; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertNotNull; + +import com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for listing queues. */ +@RunWith(JUnit4.class) +public class ListQueuesIT { + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String LOCATION_ID = System.getenv("LOCATION_ID"); + private static final String QUEUE_ID = "test-queue-" + UUID.randomUUID(); + + private ByteArrayOutputStream bout; + private PrintStream out; + private Queue queue; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("LOCATION_ID"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + + try (CloudTasksClient client = CloudTasksClient.create()) { + String parent = LocationName.of(PROJECT_ID, LOCATION_ID).toString(); + String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString(); + queue = client.createQueue(parent, Queue.newBuilder().setName(queuePath).build()); + } catch (Exception e) { + System.out.println("Error with queue creation."); + } + } + + @After + public void tearDown() { + try (CloudTasksClient client = CloudTasksClient.create()) { + client.deleteQueue(queue.getName()); + } catch (IOException e) { + System.out.println("Error with queue deletion."); + } + System.setOut(null); + } + + @Test + public void testListQueues() throws Exception { + ListQueues.listQueues(PROJECT_ID, LOCATION_ID); + String got = bout.toString(); + assertThat(got).contains(queue.getName()); + } +} From cb45dfff54a5f48ecd0c3aaa24ea2c20dd5b6801 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 Aug 2020 04:26:21 +0200 Subject: [PATCH 032/123] chore(deps): update dependency com.google.cloud:libraries-bom to v9 (#204) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `8.1.0` -> `9.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 71130b67389..7c407d4bf60 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 8.1.0 + 9.0.0 pom import From b44e16e7d594061c783e697d67ff5b1f5bdfa4e4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 18 Aug 2020 00:04:15 +0200 Subject: [PATCH 033/123] chore(deps): update dependency com.google.cloud:libraries-bom to v9.1.0 --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 7c407d4bf60..9f983749698 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 9.0.0 + 9.1.0 pom import From badf12ba48c0cf7c919f97b93ad45af6f46c431b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 23 Sep 2020 01:40:28 +0200 Subject: [PATCH 034/123] chore(deps): update dependency com.google.cloud:libraries-bom to v10 (#214) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `9.1.0` -> `10.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 9f983749698..ac8295db892 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 9.1.0 + 10.1.0 pom import From 60acd07389d48de8ff5ffe22c6d39b787ae3c00c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Sep 2020 19:46:30 +0200 Subject: [PATCH 035/123] chore(deps): update dependency com.google.cloud:libraries-bom to v11 (#240) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `10.1.0` -> `11.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index ac8295db892..81fd9300a93 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 10.1.0 + 11.0.0 pom import From 4cf14752322ad8c16fe793ac19db6d744db60912 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Oct 2020 22:08:14 +0200 Subject: [PATCH 036/123] chore(deps): update dependency com.google.cloud:libraries-bom to v12 (#245) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `11.0.0` -> `12.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 81fd9300a93..70cf615ab3f 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 11.0.0 + 12.0.0 pom import From 898d1fd3640fad0ae30dd14a2ccbdeff731aaa6d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Oct 2020 02:00:13 +0200 Subject: [PATCH 037/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.21 (#241) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](com/google/cloud/samples/shared-configuration) | patch | `1.0.18` -> `1.0.21` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 8e9233eb0be..9ef38493b95 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 70cf615ab3f..3c18b75985f 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 From 65c2e5f4cb46770fb35da65918ee6739b6f0a67b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 19:00:31 +0200 Subject: [PATCH 038/123] test(deps): update dependency junit:junit to v4.13.1 --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 3c18b75985f..11f2b8db3a2 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -47,7 +47,7 @@ junit junit - 4.13 + 4.13.1 test From 978f0ed6c04461b5b2e5153565ca8f6ed9905a07 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Oct 2020 00:48:20 +0200 Subject: [PATCH 039/123] chore(deps): update dependency com.google.cloud:libraries-bom to v12.1.0 (#256) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `12.0.0` -> `12.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 11f2b8db3a2..d2cb79ee5c4 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.0.0 + 12.1.0 pom import From 15906ed95d794d30722833549a8f5c8dff731ea7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 00:51:14 +0200 Subject: [PATCH 040/123] chore(deps): update dependency com.google.cloud:libraries-bom to v13 (#268) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `12.1.0` -> `13.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index d2cb79ee5c4..83db9b30058 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.1.0 + 13.0.0 pom import From 9a6a582f1e4f1db8ed2e78eec6128fb8b9274045 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 20:30:34 +0200 Subject: [PATCH 041/123] chore(deps): update dependency com.google.cloud:libraries-bom to v13.1.0 (#274) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.0.0` -> `13.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 83db9b30058..d28e4b4b6e6 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.0.0 + 13.1.0 pom import From baf21fca41870a868513a82d9d8853ab315d53a7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Oct 2020 21:37:08 +0200 Subject: [PATCH 042/123] test(deps): update dependency com.google.truth:truth to v1.1 (#269) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.truth:truth](com/google/truth/truth) | minor | `1.0.1` -> `1.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index d28e4b4b6e6..2e50a8c1cee 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -53,7 +53,7 @@ com.google.truth truth - 1.0.1 + 1.1 test From 5262ab5317bfc4c90b090dfa70ad86ff42b8f6cf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 27 Oct 2020 01:00:17 +0100 Subject: [PATCH 043/123] chore(deps): update dependency com.google.cloud:libraries-bom to v13.3.0 (#282) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.1.0` -> `13.3.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 2e50a8c1cee..0ea5ee71c54 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.1.0 + 13.3.0 pom import From 3db294f7c3bb014b978cfeeac397a0cb9598c376 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 31 Oct 2020 00:36:15 +0100 Subject: [PATCH 044/123] chore(deps): update dependency com.google.cloud:libraries-bom to v13.4.0 (#285) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.3.0` -> `13.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 0ea5ee71c54..90b8b0e63a4 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.3.0 + 13.4.0 pom import From f19118d81ecfba626f4bfbe85cd85c06f45cf7b5 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Mon, 2 Nov 2020 13:27:48 -0800 Subject: [PATCH 045/123] samples: fix region tag (#276) --- tasks/snippets/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 90b8b0e63a4..a8957b72a48 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -24,7 +24,7 @@ - + @@ -42,7 +42,7 @@ com.google.cloud google-cloud-tasks - + junit From 089cac1ac64ff8cfee34492abd318aae9575fb7a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 4 Nov 2020 01:26:23 +0100 Subject: [PATCH 046/123] chore(deps): update dependency com.google.cloud:libraries-bom to v14 (#295) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `13.4.0` -> `14.4.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index a8957b72a48..7b476a35826 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.4.0 + 14.4.1 pom import From 77298c121e89201df92371036e7f59c568502b76 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 Nov 2020 00:02:32 +0100 Subject: [PATCH 047/123] chore(deps): update dependency com.google.cloud:libraries-bom to v15 (#297) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `14.4.1` -> `15.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 7b476a35826..9fc66db58b4 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 14.4.1 + 15.0.0 pom import From 44d80d9a620c8474574a30dc4b0086f83ab8ee3b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 18:00:27 +0100 Subject: [PATCH 048/123] chore(deps): update dependency com.google.cloud:libraries-bom to v16 (#308) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `15.0.0` -> `16.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 9fc66db58b4..7e9ebfb1dcf 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 15.0.0 + 16.1.0 pom import From 7c1c376272c5ffd2b562010094ec81aff4912a6e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Dec 2020 23:30:34 +0100 Subject: [PATCH 049/123] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.0 (#327) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `16.1.0` -> `16.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 7e9ebfb1dcf..c05a36046c2 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.1.0 + 16.2.0 pom import From e1ed36afe83a588d5dc9e13563786e9544d85738 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jan 2021 22:28:35 +0100 Subject: [PATCH 050/123] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.1 (#335) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `16.2.0` -> `16.2.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index c05a36046c2..468ca734e13 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.0 + 16.2.1 pom import From 6c8eaa5371b6b5cf7cb6844b95d353bd03086cdf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 20 Jan 2021 21:34:33 +0100 Subject: [PATCH 051/123] chore(deps): update dependency com.google.cloud:libraries-bom to v16.3.0 (#343) --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 468ca734e13..0bc27dc2337 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.1 + 16.3.0 pom import From 40c73e945a64299884a94f17f05377decfae5d03 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jan 2021 18:30:20 +0100 Subject: [PATCH 052/123] test(deps): update dependency com.google.truth:truth to v1.1.2 (#345) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.truth:truth](com/google/truth/truth) | `1.1` -> `1.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/compatibility-slim/1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/confidence-slim/1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 0bc27dc2337..96031400c2a 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -53,7 +53,7 @@ com.google.truth truth - 1.1 + 1.1.2 test From 50c03ad25a72ac7fd0e70cda953b31970f1eaf39 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 10 Feb 2021 17:06:36 +0100 Subject: [PATCH 053/123] chore(deps): update dependency com.google.cloud:libraries-bom to v16.4.0 (#354) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `16.3.0` -> `16.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/compatibility-slim/16.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/confidence-slim/16.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 96031400c2a..4125a7a5c3d 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.3.0 + 16.4.0 pom import From c1eafa0019582aca2ecb42038b430e321ff9b9c4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Feb 2021 19:06:20 +0100 Subject: [PATCH 054/123] test(deps): update dependency junit:junit to v4.13.2 (#356) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [junit:junit](http://junit.org) ([source](https://togithub.com/junit-team/junit4)) | `4.13.1` -> `4.13.2` | [![age](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/compatibility-slim/4.13.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/confidence-slim/4.13.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 4125a7a5c3d..a31c31df7b7 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -47,7 +47,7 @@ junit junit - 4.13.1 + 4.13.2 test From 36b2d2ac1a51cc8fa7dc1af9e88b0b3d4bd84b46 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 20:36:19 +0100 Subject: [PATCH 055/123] chore(deps): update dependency com.google.cloud:libraries-bom to v17 (#364) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `16.4.0` -> `17.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/compatibility-slim/16.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/confidence-slim/16.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index a31c31df7b7..9af4b0fb978 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.4.0 + 17.0.0 pom import From 0475f0287ffcfc37685220a0350ba9d7ba496023 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Feb 2021 16:08:19 +0100 Subject: [PATCH 056/123] chore(deps): update dependency com.google.cloud:libraries-bom to v18 (#370) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `17.0.0` -> `18.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/compatibility-slim/17.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/confidence-slim/17.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 9af4b0fb978..4f6f13d5ee3 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 17.0.0 + 18.0.0 pom import From 30f9aae26d06623229ad5cc5c0dfa290d7726b00 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Mar 2021 00:50:06 +0100 Subject: [PATCH 057/123] chore(deps): update dependency com.google.cloud:libraries-bom to v18.1.0 (#380) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `18.0.0` -> `18.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/compatibility-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/confidence-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 4f6f13d5ee3..26b012bd5a1 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 18.0.0 + 18.1.0 pom import From ad24aa064d6db99103e98c05f7838acdb15a5a8f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Mar 2021 20:36:28 +0100 Subject: [PATCH 058/123] chore(deps): update dependency com.google.cloud:libraries-bom to v19 (#382) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `18.1.0` -> `19.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/compatibility-slim/18.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/confidence-slim/18.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 26b012bd5a1..a2a99baf7c3 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 18.1.0 + 19.0.0 pom import From 2555e5eee5f6ad1af72d0f45d1e44166461b2134 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Mar 2021 21:08:29 +0100 Subject: [PATCH 059/123] chore(deps): update dependency com.google.cloud:libraries-bom to v19.1.0 (#396) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `19.0.0` -> `19.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/compatibility-slim/19.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/confidence-slim/19.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index a2a99baf7c3..89b2aeef691 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 19.0.0 + 19.1.0 pom import From aed6a3e7aa20e8f1593cca25ef1707b33fe4aea9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Mar 2021 19:04:19 +0100 Subject: [PATCH 060/123] chore(deps): update dependency com.google.cloud:libraries-bom to v19.2.1 (#397) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `19.1.0` -> `19.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/compatibility-slim/19.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/confidence-slim/19.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 89b2aeef691..e1ba500d280 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 19.1.0 + 19.2.1 pom import From 65e7b27fe1ddc3cce0a787b754a32177ebc7ac4c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Apr 2021 17:42:03 +0200 Subject: [PATCH 061/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.22 (#400) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.cloud.samples:shared-configuration | `1.0.21` -> `1.0.22` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/compatibility-slim/1.0.21)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/confidence-slim/1.0.21)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 9ef38493b95..3bff0f0ba41 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index e1ba500d280..fa9f9f0fb04 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 From 08e3299586b7bc8582d51f46cad53f14dfaae54c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 12 May 2021 02:56:13 +0200 Subject: [PATCH 062/123] chore(deps): update dependency com.google.cloud:libraries-bom to v20 (#404) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `19.2.1` -> `20.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/compatibility-slim/19.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/confidence-slim/19.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index fa9f9f0fb04..18e72d32391 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 19.2.1 + 20.3.0 pom import From 98dbe9707f27cb076f9819961ec0b05ea86faddb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 17 May 2021 15:22:02 +0200 Subject: [PATCH 063/123] chore(deps): update dependency com.google.cloud:libraries-bom to v20.4.0 (#435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.3.0` -> `20.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/compatibility-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/confidence-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 18e72d32391..18240365b0e 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.3.0 + 20.4.0 pom import From e815701987807aaa1cb67ae34faf199d313b8b49 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 17:50:59 +0200 Subject: [PATCH 064/123] chore(deps): update dependency com.google.cloud:libraries-bom to v20.5.0 (#442) --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 18240365b0e..2c8689e8fb5 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.4.0 + 20.5.0 pom import From b2b603c865b0a27b10886b91543130fd5536377e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 22:58:13 +0200 Subject: [PATCH 065/123] test(deps): update dependency com.google.truth:truth to v1.1.3 (#443) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.truth:truth | `1.1.2` -> `1.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/compatibility-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/confidence-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 2c8689e8fb5..d8f988765e2 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -53,7 +53,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test From 828471d08fb22356dd08148fd560bf0323ee1cdc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Jun 2021 21:00:21 +0200 Subject: [PATCH 066/123] chore(deps): update dependency com.google.cloud:libraries-bom to v20.6.0 (#452) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.5.0` -> `20.6.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/compatibility-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/confidence-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index d8f988765e2..f9350d24b32 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.5.0 + 20.6.0 pom import From b6979cecc22486a620bdfc0aaef26058f10c3858 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 23 Jun 2021 21:12:28 +0200 Subject: [PATCH 067/123] chore(deps): update dependency com.google.cloud:libraries-bom to v20.7.0 (#460) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.6.0` -> `20.7.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/compatibility-slim/20.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/confidence-slim/20.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index f9350d24b32..5449583e4c7 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.6.0 + 20.7.0 pom import From c4fffeaf04fd8f1308152a01d2aee74cc3366f27 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 1 Jul 2021 19:32:39 +0200 Subject: [PATCH 068/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.23 (#451) --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 3bff0f0ba41..172bb1995f7 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 5449583e4c7..17d353fc9e9 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 From 4e5940a3205dc856b1d012812e8e00eb2978150d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Jul 2021 16:38:45 +0200 Subject: [PATCH 069/123] chore(deps): update dependency com.google.cloud:libraries-bom to v20.8.0 (#470) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.7.0` -> `20.8.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/compatibility-slim/20.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/confidence-slim/20.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 17d353fc9e9..081e07f9013 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.7.0 + 20.8.0 pom import From 54a7948cfbf40f5d45ad346a651806a778f1f8ed Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Jul 2021 01:08:38 +0200 Subject: [PATCH 070/123] chore(deps): update dependency com.google.cloud:libraries-bom to v20.9.0 (#474) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.8.0` -> `20.9.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/compatibility-slim/20.8.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/confidence-slim/20.8.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 081e07f9013..59e7efd09f3 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.8.0 + 20.9.0 pom import From c1468dbd4dc9bf84b399c5b23c75bdc0c91de3fa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 17 Aug 2021 16:56:28 +0200 Subject: [PATCH 071/123] chore(deps): update dependency com.google.cloud:libraries-bom to v21 (#496) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.9.0` -> `21.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/compatibility-slim/20.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/confidence-slim/20.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 59e7efd09f3..83961f1974d 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.9.0 + 21.0.0 pom import From 70c27e8649f7f534807a51aeebd764be17bfa23d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 27 Aug 2021 17:01:20 +0200 Subject: [PATCH 072/123] chore(deps): update dependency com.google.cloud:libraries-bom to v22 (#507) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `21.0.0` -> `22.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/compatibility-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/confidence-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 83961f1974d..a5962228a1a 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 21.0.0 + 22.0.0 pom import From cb1e312b7fd18e1555e9bd0ce54bbbbada60d734 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Sun, 5 Sep 2021 14:04:26 -0400 Subject: [PATCH 073/123] chore: migrate to owlbot (#516) --- .../main/java/com/example/task/CreateHttpTaskWithToken.java | 2 +- tasks/snippets/src/main/java/com/example/task/ListQueues.java | 3 +-- .../snippets/src/test/java/com/example/task/DeleteQueueIT.java | 2 +- .../snippets/src/test/java/com/example/task/ListQueuesIT.java | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java index a341f680fea..91cd8c2275d 100644 --- a/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java +++ b/tasks/snippets/src/main/java/com/example/task/CreateHttpTaskWithToken.java @@ -34,7 +34,7 @@ public static void main(String[] args) throws IOException { String projectId = "my-project-id"; String locationId = "us-central1"; String queueId = "my-queue"; - String serviceAccountEmail = + String serviceAccountEmail = "java-docs-samples-testing@java-docs-samples-testing.iam.gserviceaccount.com"; createTask(projectId, locationId, queueId, serviceAccountEmail); } diff --git a/tasks/snippets/src/main/java/com/example/task/ListQueues.java b/tasks/snippets/src/main/java/com/example/task/ListQueues.java index 85fd8c14cc6..2405eecacae 100644 --- a/tasks/snippets/src/main/java/com/example/task/ListQueues.java +++ b/tasks/snippets/src/main/java/com/example/task/ListQueues.java @@ -30,8 +30,7 @@ public static void main(String[] args) throws IOException { } // List queues using the Cloud Tasks client. - public static void listQueues(String projectId, String locationId) - throws IOException { + public static void listQueues(String projectId, String locationId) throws IOException { // Instantiates a client. try (CloudTasksClient client = CloudTasksClient.create()) { diff --git a/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java b/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java index 90c3f74bf59..3bf3ad63a56 100644 --- a/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java +++ b/tasks/snippets/src/test/java/com/example/task/DeleteQueueIT.java @@ -61,7 +61,7 @@ public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); - + try (CloudTasksClient client = CloudTasksClient.create()) { String parent = LocationName.of(PROJECT_ID, LOCATION_ID).toString(); String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString(); diff --git a/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java b/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java index 11e68b8e58e..287a83ecb84 100644 --- a/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java +++ b/tasks/snippets/src/test/java/com/example/task/ListQueuesIT.java @@ -17,7 +17,6 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertNotNull; -import com.google.api.gax.rpc.NotFoundException; import com.google.cloud.tasks.v2.CloudTasksClient; import com.google.cloud.tasks.v2.LocationName; import com.google.cloud.tasks.v2.Queue; @@ -61,7 +60,7 @@ public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); System.setOut(out); - + try (CloudTasksClient client = CloudTasksClient.create()) { String parent = LocationName.of(PROJECT_ID, LOCATION_ID).toString(); String queuePath = QueueName.of(PROJECT_ID, LOCATION_ID, QUEUE_ID).toString(); From 75cbc405f70e6fe4a2f048f60b6850001656f641 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 8 Sep 2021 23:14:17 +0200 Subject: [PATCH 074/123] chore(deps): update dependency com.google.cloud:libraries-bom to v23 (#519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `22.0.0` -> `23.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/compatibility-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/confidence-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index a5962228a1a..5f197257ceb 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 22.0.0 + 23.0.0 pom import From 795adcd0495629912a52dbe2f7b02a5dee54aa1b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Oct 2021 16:20:22 +0200 Subject: [PATCH 075/123] chore(deps): update dependency com.google.cloud:libraries-bom to v23.1.0 (#540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `23.0.0` -> `23.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/compatibility-slim/23.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/confidence-slim/23.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 5f197257ceb..34120205cd0 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 23.0.0 + 23.1.0 pom import From 52550927767cce95c65b4ab9c94a866f95315d9a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 18:18:50 +0200 Subject: [PATCH 076/123] chore(deps): update dependency com.google.cloud:libraries-bom to v24 (#552) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `23.1.0` -> `24.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/compatibility-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/confidence-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 34120205cd0..aa812841339 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import From 910d4136b215f07fa8ee875e51565b56a1137438 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 00:22:18 +0100 Subject: [PATCH 077/123] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.2.0 (#570) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | `1.0.23` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/compatibility-slim/1.0.23)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/confidence-slim/1.0.23)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.2.0`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) ### [`v1.0.24`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 172bb1995f7..70c02daef13 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index aa812841339..b5ec3146b01 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 From 913036b88ed9843233451c443c301cb597e3e988 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 28 Dec 2021 21:52:16 +0100 Subject: [PATCH 078/123] chore(deps): update dependency com.google.cloud:libraries-bom to v24.1.1 (#575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.0.0` -> `24.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/compatibility-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/confidence-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index b5ec3146b01..7881f3f729c 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.0.0 + 24.1.1 pom import From 1350132ffb1a50f8aad439c011fca19e1b84969a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 7 Jan 2022 18:26:27 +0100 Subject: [PATCH 079/123] chore(deps): update dependency com.google.cloud:libraries-bom to v24.1.2 (#577) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.1` -> `24.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/compatibility-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/confidence-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 7881f3f729c..996992a5621 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.1.1 + 24.1.2 pom import From 142b17bb52dcf2bed338e287badfb7631ff2da9b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 12 Jan 2022 18:17:28 +0100 Subject: [PATCH 080/123] chore(deps): update dependency com.google.cloud:libraries-bom to v24.2.0 (#586) --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 996992a5621..ca57a7ca4b3 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.1.2 + 24.2.0 pom import From 17dce19f5868f56db9aea24456b735510123fc39 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Feb 2022 22:58:54 +0100 Subject: [PATCH 081/123] chore(deps): update dependency com.google.cloud:libraries-bom to v24.3.0 (#604) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.2.0` -> `24.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/compatibility-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/confidence-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index ca57a7ca4b3..01715b0ef60 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.2.0 + 24.3.0 pom import From 2bd2d0190ef0aebe46e6335801c7ab9cf765e6c7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 22:56:42 +0100 Subject: [PATCH 082/123] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.9 (#612) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | org.sonatype.plugins:nexus-staging-maven-plugin | `1.6.8` -> `1.6.9` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/compatibility-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/confidence-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 70c02daef13..29d823a3ee7 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.9 true From 26b6840d7b66963b9a33bfcd741e33cc86a56d6f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Feb 2022 17:56:51 +0100 Subject: [PATCH 083/123] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.10 (#614) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.9` -> `1.6.10` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/compatibility-slim/1.6.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/confidence-slim/1.6.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.10`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 29d823a3ee7..373061d024a 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.9 + 1.6.10 true From 5f1b1a91d7e066ab1757029d8c9c0303eb03940f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Feb 2022 16:46:53 +0100 Subject: [PATCH 084/123] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.11 (#615) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.10` -> `1.6.11` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/compatibility-slim/1.6.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/confidence-slim/1.6.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.11`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 373061d024a..92ea1f877e1 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.10 + 1.6.11 true From d515aba637991182aa4d646d41838d116cbe9659 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 1 Mar 2022 15:54:20 -0500 Subject: [PATCH 085/123] docs(sample): add native-image sample (#621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relocating the sample from native-image-support to this repository `mvn clean verify -DskipTests -P lint` passes. Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). --- tasks/native-image-sample/README.md | 119 ++++++++++++++ tasks/native-image-sample/pom.xml | 150 ++++++++++++++++++ .../example/tasks/TasksSampleApplication.java | 85 ++++++++++ .../tasks/ITNativeImageTasksSample.java | 43 +++++ tasks/pom.xml | 1 + 5 files changed, 398 insertions(+) create mode 100644 tasks/native-image-sample/README.md create mode 100644 tasks/native-image-sample/pom.xml create mode 100644 tasks/native-image-sample/src/main/java/com/example/tasks/TasksSampleApplication.java create mode 100644 tasks/native-image-sample/src/test/java/com/example/tasks/ITNativeImageTasksSample.java diff --git a/tasks/native-image-sample/README.md b/tasks/native-image-sample/README.md new file mode 100644 index 00000000000..acbbe7ff5bb --- /dev/null +++ b/tasks/native-image-sample/README.md @@ -0,0 +1,119 @@ +# Cloud Tasks Sample Application with Native Image + +The Cloud Tasks sample application demonstrates some common operations with +[Google Cloud Tasks](https://cloud.google.com/tasks) and is compatible with +Native Image compilation. + +This application will create a new queue called `graal-test-queue` if it does +not already exist. +It will then submit a new task to this queue. + +## Setup Instructions + +1. Follow the [GCP Project and Native Image Setup Instructions](../../README.md). + +2. [Enable the Cloud Tasks APIs](https://console.cloud.google.com/apis/api/cloudtasks.googleapis.com). + +### Run with Native Image Compilation + +Navigate to this directory in a new terminal. + +1. Compile the application using the Native Image Compiler. This step may take a few minutes. + + ``` + $ mvn package -P native + ``` + + The project uses an environment variable `LOCATION_ID` to run the test. + +2. Run the application: + + ``` + $ LOCATION_ID=us-east1 ./target/tasks-sample + ``` + + The sample application uses an environment variable `LOCATION_ID`. + +3. The application runs through some basic Cloud Tasks operations (create queue, create task) and then prints some results of the operations. + + ``` + Test queue ready: name: "projects/xxxxxxxxxx/locations/us-central1/queues/graal-test-queue-4009" + rate_limits { + max_dispatches_per_second: 500.0 + max_burst_size: 100 + max_concurrent_dispatches: 1 + } + retry_config { + max_attempts: 100 + min_backoff { + nanos: 100000000 + } + max_backoff { + seconds: 3600 + } + max_doublings: 16 + } + state: RUNNING + + Created task: name: "projects/xxxxxxxxxx/locations/us-central1/queues/graal-test-queue-4009/tasks/5886258204485021611" + http_request { + url: "https://google.com/" + http_method: GET + headers { + key: "User-Agent" + value: "Google-Cloud-Tasks" + } + } + schedule_time { + seconds: 1613189391 + nanos: 486293000 + } + create_time { + seconds: 1613189391 + } + dispatch_deadline { + seconds: 600 + } + view: BASIC + + Queue purged + Queue deleted + ``` + +4. Run the test in the project in the native-image mode + + ``` + $ LOCATION_ID=us-east1 mvn test -P native + ... + [INFO] ------------------------------------------------------- + [INFO] T E S T S + [INFO] ------------------------------------------------------- + [INFO] Running com.example.tasks.ITNativeImageTasksSample + ... + [INFO] --- native-maven-plugin:0.9.9:test (test-native) @ native-image-sample --- + [INFO] ==================== + [INFO] Initializing project: native-image-sample + ... + com.example.tasks.ITNativeImageTasksSample > testRunSampleApplication SUCCESSFUL + + + Test run finished after 1025 ms + [ 3 containers found ] + [ 0 containers skipped ] + [ 3 containers started ] + [ 0 containers aborted ] + [ 3 containers successful ] + [ 0 containers failed ] + [ 1 tests found ] + [ 0 tests skipped ] + [ 1 tests started ] + [ 0 tests aborted ] + [ 1 tests successful ] + [ 0 tests failed ] + + [INFO] ------------------------------------------------------------------------ + [INFO] BUILD SUCCESS + [INFO] ------------------------------------------------------------------------ + [INFO] Total time: 02:27 min + ... + ``` diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml new file mode 100644 index 00000000000..42d75d30ed7 --- /dev/null +++ b/tasks/native-image-sample/pom.xml @@ -0,0 +1,150 @@ + + + 4.0.0 + com.example.tasks + native-image-sample + Native Image Sample + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + libraries-bom + 24.2.0 + pom + import + + + + + + + com.google.cloud + google-cloud-core + + + com.google.cloud + google-cloud-tasks + + + junit + junit + 4.13.2 + test + + + com.google.truth + truth + 1.1.3 + test + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + com.example.TasksSampleApplication + + + + + + + + + + native + + + + com.google.cloud + native-image-support + 0.10.0 + + + org.junit.vintage + junit-vintage-engine + 5.8.2 + + + org.graalvm.buildtools + junit-platform-native + 0.9.9 + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + 2.22.2 + + + **/IT* + + + + + org.graalvm.buildtools + native-maven-plugin + 0.9.9 + true + + com.example.tasks.TasksSampleApplication + + --no-fallback + --no-server + --initialize-at-build-time + --features=com.google.cloud.nativeimage.features.ProtobufMessageFeature + + + + + build-native + + build + test + + package + + + test-native + + test + + test + + + + + + + + \ No newline at end of file diff --git a/tasks/native-image-sample/src/main/java/com/example/tasks/TasksSampleApplication.java b/tasks/native-image-sample/src/main/java/com/example/tasks/TasksSampleApplication.java new file mode 100644 index 00000000000..de736aa88a1 --- /dev/null +++ b/tasks/native-image-sample/src/main/java/com/example/tasks/TasksSampleApplication.java @@ -0,0 +1,85 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.tasks; + +import com.google.cloud.ServiceOptions; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CreateQueueRequest; +import com.google.cloud.tasks.v2.HttpMethod; +import com.google.cloud.tasks.v2.HttpRequest; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.RateLimits; +import com.google.cloud.tasks.v2.Task; +import java.io.IOException; +import java.util.UUID; + +/** Sample application demonstrating Native Image compatibility with Google Cloud Tasks APIs. */ +public class TasksSampleApplication { + /** + * Queue name randomness added to avoid FAILED_PRECONDITION: The queue cannot be created because a + * queue with this name existed too recently. + */ + private static final String GRAALVM_TEST_QUEUE_NAME = "graal-test-queue-"; + + private static final String LOCATION_ID = System.getenv("LOCATION_ID"); + + /** Runs the Cloud Tasks sample application. */ + public static void main(String[] args) throws IOException { + String projectId = ServiceOptions.getDefaultProjectId(); + LocationName parent = LocationName.of(projectId, LOCATION_ID); + QueueName queueName = + QueueName.of( + parent.getProject(), + parent.getLocation(), + GRAALVM_TEST_QUEUE_NAME + UUID.randomUUID().toString()); + + try (CloudTasksClient client = CloudTasksClient.create()) { + // Create queue + Queue queue = + Queue.newBuilder() + .setName(queueName.toString()) + .setRateLimits(RateLimits.newBuilder().setMaxConcurrentDispatches(1).build()) + .build(); + + CreateQueueRequest createQueueRequest = + CreateQueueRequest.newBuilder().setParent(parent.toString()).setQueue(queue).build(); + + Queue createdQueue = client.createQueue(createQueueRequest); + System.out.println("Test queue ready: " + createdQueue); + + // Create task + HttpRequest taskTarget = + HttpRequest.newBuilder() + .setUrl("https://google.com") + .setHttpMethod(HttpMethod.GET) + .build(); + + Task taskRequest = Task.newBuilder().setHttpRequest(taskTarget).build(); + Task task = client.createTask(queueName, taskRequest); + System.out.println("Created task: " + task); + + // Cleanup + client.purgeQueue(queueName); + System.out.println("Queue purged"); + + client.deleteQueue(queueName); + System.out.println("Queue deleted"); + } + } +} diff --git a/tasks/native-image-sample/src/test/java/com/example/tasks/ITNativeImageTasksSample.java b/tasks/native-image-sample/src/test/java/com/example/tasks/ITNativeImageTasksSample.java new file mode 100644 index 00000000000..70e91ffa1b9 --- /dev/null +++ b/tasks/native-image-sample/src/test/java/com/example/tasks/ITNativeImageTasksSample.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.tasks; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.Before; +import org.junit.Test; + +public class ITNativeImageTasksSample { + private ByteArrayOutputStream bout; + + @Before + public void setUp() throws Exception { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @Test + public void testRunSampleApplication() throws Exception { + TasksSampleApplication.main(new String[] {}); + String output = bout.toString(); + assertThat(output).contains("Test queue ready"); + assertThat(output).contains("Queue purged"); + assertThat(output).contains("Queue deleted"); + } +} diff --git a/tasks/pom.xml b/tasks/pom.xml index 92ea1f877e1..87ddc149db9 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -31,6 +31,7 @@ install-without-bom snapshot snippets + native-image-sample From 4284e0522e882825e0704cb5c21b10292af59f69 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Mar 2022 20:16:23 +0100 Subject: [PATCH 086/123] deps: update dependency com.google.cloud:native-image-support to v0.12.6 (#628) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.10.0` -> `0.12.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.6/compatibility-slim/0.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.6/confidence-slim/0.10.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 42d75d30ed7..90b6b650c4b 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -84,7 +84,7 @@ com.google.cloud native-image-support - 0.10.0 + 0.12.6
org.junit.vintage From 0b3667fd8cc331033027ee844968ba981e166482 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Mar 2022 19:48:55 +0100 Subject: [PATCH 087/123] deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.10 (#627) --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 90b6b650c4b..328190a4441 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -114,7 +114,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.9 + 0.9.10 true com.example.tasks.TasksSampleApplication From dcef320e1efc019f4e67d0d70f9dddd21c00e573 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Mar 2022 19:49:07 +0100 Subject: [PATCH 088/123] deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.10 (#626) --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 328190a4441..cc0f9f4c5e3 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -94,7 +94,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.9 + 0.9.10 test From 084ca1d6d2b48959c2a733d6f63cfd0bc970b6be Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Mar 2022 19:56:37 +0100 Subject: [PATCH 089/123] chore(deps): update dependency com.google.cloud:libraries-bom to v24.4.0 (#632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.3.0` -> `24.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/compatibility-slim/24.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/confidence-slim/24.3.0)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.2.0` -> `24.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/compatibility-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/confidence-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index cc0f9f4c5e3..dbadb0b8e12 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 24.2.0 + 24.4.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 01715b0ef60..b8d8ce12e03 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.3.0 + 24.4.0 pom import From 4c77a04a833270a9fc6b7113bd072a3b2a3b5185 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Mar 2022 21:44:19 +0100 Subject: [PATCH 090/123] deps: update dependency com.google.cloud:native-image-support to v0.12.7 (#637) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.12.6` -> `0.12.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.7/compatibility-slim/0.12.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.7/confidence-slim/0.12.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index dbadb0b8e12..017bddf6b71 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -84,7 +84,7 @@ com.google.cloud native-image-support - 0.12.6 + 0.12.7 org.junit.vintage From 0a402616d1b1a0e69ab857cbeb39b8ef8bec500f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Mar 2022 18:28:16 +0100 Subject: [PATCH 091/123] deps: update dependency com.google.cloud:native-image-support to v0.12.8 (#643) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.12.7` -> `0.12.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.8/compatibility-slim/0.12.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.8/confidence-slim/0.12.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 017bddf6b71..7821134acef 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -84,7 +84,7 @@ com.google.cloud native-image-support - 0.12.7 + 0.12.8 org.junit.vintage From 024b34a993533c1019d49545d7df964a5c00cfe0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 10 Mar 2022 23:14:19 +0100 Subject: [PATCH 092/123] deps: update dependency com.google.cloud:native-image-support to v0.12.9 (#645) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.12.8` -> `0.12.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.9/compatibility-slim/0.12.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.9/confidence-slim/0.12.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 7821134acef..b022ca84387 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -84,7 +84,7 @@ com.google.cloud native-image-support - 0.12.8 + 0.12.9 org.junit.vintage From 627979b0877c11eb121e88353bf791e10b192dcf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Mar 2022 23:02:30 +0100 Subject: [PATCH 093/123] chore(deps): update dependency com.google.cloud:libraries-bom to v25 (#649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.4.0` -> `25.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/compatibility-slim/24.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/confidence-slim/24.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index b022ca84387..81e67575d3c 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 24.4.0 + 25.0.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index b8d8ce12e03..e02726484d9 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.4.0 + 25.0.0 pom import From db9beb619e7b681c0d1a31e40e0f561addb90938 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Mar 2022 23:14:23 +0100 Subject: [PATCH 094/123] deps: update dependency com.google.cloud:native-image-support to v0.12.10 (#648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.12.9` -> `0.12.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.10/compatibility-slim/0.12.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.10/confidence-slim/0.12.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 81e67575d3c..c3209ef15d3 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -84,7 +84,7 @@ com.google.cloud native-image-support - 0.12.9 + 0.12.10 org.junit.vintage From 9190cf0c271690fc1c201b08808765758b02a5d2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Mar 2022 16:12:28 +0100 Subject: [PATCH 095/123] deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.11 (#653) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:junit-platform-native](https://togithub.com/graalvm/native-build-tools) | `0.9.10` -> `0.9.11` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.11/compatibility-slim/0.9.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.11/confidence-slim/0.9.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.11`](https://togithub.com/graalvm/native-build-tools/releases/0.9.11) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.10...0.9.11) ##### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Add issue templates by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/216](https://togithub.com/graalvm/native-build-tools/pull/216) - Fix [@​arg](https://togithub.com/arg) file not being used for tests in Maven by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/212](https://togithub.com/graalvm/native-build-tools/pull/212) - Make it possible to use environment variables in native tests by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/217](https://togithub.com/graalvm/native-build-tools/pull/217) - Fix incorrect declaration of output directory by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/219](https://togithub.com/graalvm/native-build-tools/pull/219) - Refactor build by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/220](https://togithub.com/graalvm/native-build-tools/pull/220) - Integrate native configuration repository with Gradle by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/204](https://togithub.com/graalvm/native-build-tools/pull/204) - Rework argfile generation by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/223](https://togithub.com/graalvm/native-build-tools/pull/223) - Rename `metadataRepository` and document feature by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/225](https://togithub.com/graalvm/native-build-tools/pull/225) - Support applications with custom packaging types by [@​alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/graalvm/native-build-tools/pull/226](https://togithub.com/graalvm/native-build-tools/pull/226) ##### New Contributors - [@​alvarosanchez](https://togithub.com/alvarosanchez) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/226](https://togithub.com/graalvm/native-build-tools/pull/226) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.10...0.9.11
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index c3209ef15d3..21dc74cc2d2 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -94,7 +94,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.10 + 0.9.11 test From f45fd2d5a4478b426b6478ec9b292ca767b48838 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Mar 2022 16:14:12 +0100 Subject: [PATCH 096/123] deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.11 (#654) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.10` -> `0.9.11` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.11/compatibility-slim/0.9.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.11/confidence-slim/0.9.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.11`](https://togithub.com/graalvm/native-build-tools/releases/0.9.11) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.10...0.9.11) ##### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Add issue templates by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/216](https://togithub.com/graalvm/native-build-tools/pull/216) - Fix [@​arg](https://togithub.com/arg) file not being used for tests in Maven by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/212](https://togithub.com/graalvm/native-build-tools/pull/212) - Make it possible to use environment variables in native tests by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/217](https://togithub.com/graalvm/native-build-tools/pull/217) - Fix incorrect declaration of output directory by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/219](https://togithub.com/graalvm/native-build-tools/pull/219) - Refactor build by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/220](https://togithub.com/graalvm/native-build-tools/pull/220) - Integrate native configuration repository with Gradle by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/204](https://togithub.com/graalvm/native-build-tools/pull/204) - Rework argfile generation by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/223](https://togithub.com/graalvm/native-build-tools/pull/223) - Rename `metadataRepository` and document feature by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/225](https://togithub.com/graalvm/native-build-tools/pull/225) - Support applications with custom packaging types by [@​alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/graalvm/native-build-tools/pull/226](https://togithub.com/graalvm/native-build-tools/pull/226) ##### New Contributors - [@​alvarosanchez](https://togithub.com/alvarosanchez) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/226](https://togithub.com/graalvm/native-build-tools/pull/226) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.10...0.9.11
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 21dc74cc2d2..d5fb38e77f5 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -114,7 +114,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.10 + 0.9.11 true com.example.tasks.TasksSampleApplication From acbaa36c2b3151cd2c07771df916faca8532ca0e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Mar 2022 01:58:04 +0200 Subject: [PATCH 097/123] deps: update dependency com.google.cloud:native-image-support to v0.12.11 (#659) --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index d5fb38e77f5..da360a772d5 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -84,7 +84,7 @@ com.google.cloud native-image-support - 0.12.10 + 0.12.11
org.junit.vintage From 07f5ad151c77a06007d0abc00ff16d1aeac70ec1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Apr 2022 19:04:14 +0200 Subject: [PATCH 098/123] chore(deps): update dependency com.google.cloud:libraries-bom to v25.1.0 (#664) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.0.0` -> `25.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/compatibility-slim/25.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/confidence-slim/25.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index da360a772d5..fc8394d0e9e 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 25.0.0 + 25.1.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index e02726484d9..baa6658f2b2 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.0.0 + 25.1.0 pom import From d25a95485225e10a17758b4f867efde790b86d77 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Fri, 1 Apr 2022 15:03:12 -0400 Subject: [PATCH 099/123] docs(sample): modify README instructions for Native Image sample (#666) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(sample): modify README instructions for Native Image sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add setup instructions Co-authored-by: Owl Bot --- tasks/native-image-sample/README.md | 60 +++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/tasks/native-image-sample/README.md b/tasks/native-image-sample/README.md index acbbe7ff5bb..5069656bc67 100644 --- a/tasks/native-image-sample/README.md +++ b/tasks/native-image-sample/README.md @@ -10,31 +10,69 @@ It will then submit a new task to this queue. ## Setup Instructions -1. Follow the [GCP Project and Native Image Setup Instructions](../../README.md). +You will need to follow these prerequisite steps in order to run these samples: -2. [Enable the Cloud Tasks APIs](https://console.cloud.google.com/apis/api/cloudtasks.googleapis.com). +1. If you have not already, [create a Google Cloud Platform Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project). + +2. Install the [Google Cloud SDK](https://cloud.google.com/sdk/) which will allow you to run the sample with your project's credentials. + + Once installed, log in with Application Default Credentials using the following command: + + ``` + gcloud auth application-default login + ``` + + **Note:** Authenticating with Application Default Credentials is convenient to use during development, but we recommend [alternate methods of authentication](https://cloud.google.com/docs/authentication/production) during production use. + +3. Install the GraalVM compiler. + + You can follow the [official installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm) from the GraalVM website. + After following the instructions, ensure that you install the Native Image extension installed by running: + + ``` + gu install native-image + ``` + + Once you finish following the instructions, verify that the default version of Java is set to the GraalVM version by running `java -version` in a terminal. + + You will see something similar to the below output: + + ``` + $ java -version + + openjdk 11.0.14 2022-01-18 + OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05) + OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05, mixed mode, sharing) + + ``` + +4. [Enable the Cloud Tasks APIs](https://console.cloud.google.com/apis/api/cloudtasks.googleapis.com). ### Run with Native Image Compilation Navigate to this directory in a new terminal. -1. Compile the application using the Native Image Compiler. This step may take a few minutes. +1. The project uses an environment variable `LOCATION_ID` to run the test. Set the environment variable by calling: + + ``` + export LOCATION_ID=us-east1 + ``` + +2. Compile the application using the Native Image Compiler. This step may take a few minutes. ``` $ mvn package -P native ``` - The project uses an environment variable `LOCATION_ID` to run the test. + -2. Run the application: +3. Run the application: ``` - $ LOCATION_ID=us-east1 ./target/tasks-sample + $ ./target/native-image-sample ``` - The sample application uses an environment variable `LOCATION_ID`. - -3. The application runs through some basic Cloud Tasks operations (create queue, create task) and then prints some results of the operations. +4. The application runs through some basic Cloud Tasks operations (create queue, create task) and then prints some results of the operations. ``` Test queue ready: name: "projects/xxxxxxxxxx/locations/us-central1/queues/graal-test-queue-4009" @@ -80,10 +118,10 @@ Navigate to this directory in a new terminal. Queue deleted ``` -4. Run the test in the project in the native-image mode +5. Run the test in the project in the native-image mode ``` - $ LOCATION_ID=us-east1 mvn test -P native + $ export LOCATION_ID=us-east1 && mvn test -P native ... [INFO] ------------------------------------------------------- [INFO] T E S T S From 1004b8a044a7f44bc8d09a9b5c4b2afb9d756a5a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Apr 2022 21:26:35 +0200 Subject: [PATCH 100/123] deps: update dependency com.google.cloud:native-image-support to v0.13.1 (#671) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.12.11` -> `0.13.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.13.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.13.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.13.1/compatibility-slim/0.12.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.13.1/confidence-slim/0.12.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index fc8394d0e9e..f8b46d45171 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -84,7 +84,7 @@ com.google.cloud native-image-support - 0.12.11 + 0.13.1 org.junit.vintage From cd85b9e98db89bb4a04ce7a71473b2e1f0890388 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 19:36:29 +0200 Subject: [PATCH 101/123] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.13 (#676) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.11` -> `1.6.13` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/compatibility-slim/1.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/confidence-slim/1.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.13`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13) ### [`v1.6.12`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.11...release-1.6.12) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.11...release-1.6.12)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index 87ddc149db9..b8b3d10596c 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -47,7 +47,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.11 + 1.6.13 true From ecc9574d06aec53407762b5e1d04f13a50ea65c0 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Thu, 21 Apr 2022 22:11:43 -0400 Subject: [PATCH 102/123] docs(sample): remove protobuf feature from native image sample (#665) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(sample): remove protobuf feature from native image sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- tasks/native-image-sample/pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index f8b46d45171..37e1d795a8b 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -121,8 +121,6 @@ --no-fallback --no-server - --initialize-at-build-time - --features=com.google.cloud.nativeimage.features.ProtobufMessageFeature From 4d485775c7c41a6bfd6ee7223cde0e11328be0d4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Apr 2022 17:50:12 +0200 Subject: [PATCH 103/123] chore(deps): update dependency com.google.cloud:libraries-bom to v25.2.0 (#679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.1.0` -> `25.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/compatibility-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/confidence-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 37e1d795a8b..c245260bd2f 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 25.1.0 + 25.2.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index baa6658f2b2..02bf521c503 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.1.0 + 25.2.0 pom import From 0e03ef173c143ed410579cca33ee2dbdd3224948 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 28 Apr 2022 11:48:30 -0400 Subject: [PATCH 104/123] docs(sample): removing unnecessary native-image-support dependency (#681) For GraalVM native image, GAX provides required metadata. We no longer need native-image-support-java module. --- tasks/native-image-sample/pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index c245260bd2f..9a6992a4f60 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -80,12 +80,6 @@ native - - - com.google.cloud - native-image-support - 0.13.1 - org.junit.vintage junit-vintage-engine From fc24e79782cd5971e397557db197e0b9b957fdce Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:27:29 +0200 Subject: [PATCH 105/123] chore(deps): update dependency com.google.cloud:libraries-bom to v25.3.0 (#686) --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 9a6992a4f60..c2f50508ebd 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 25.2.0 + 25.3.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 02bf521c503..4d011f4553f 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.2.0 + 25.3.0 pom import From 6496302d5f38c9b9f081ad3fb4aa6a494d17bdd4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jun 2022 17:04:11 +0200 Subject: [PATCH 106/123] chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 (#694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.3.0` -> `25.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/compatibility-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/confidence-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index c2f50508ebd..b7762d1e910 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 4d011f4553f..9df79d6ee78 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import From d9510f04dd2d73a990643f381ac68021845044fe Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Wed, 15 Jun 2022 15:19:07 -0400 Subject: [PATCH 107/123] docs(sample): clean up README for native image sample (#697) --- tasks/native-image-sample/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/native-image-sample/README.md b/tasks/native-image-sample/README.md index 5069656bc67..4ac48e60139 100644 --- a/tasks/native-image-sample/README.md +++ b/tasks/native-image-sample/README.md @@ -24,25 +24,25 @@ You will need to follow these prerequisite steps in order to run these samples: **Note:** Authenticating with Application Default Credentials is convenient to use during development, but we recommend [alternate methods of authentication](https://cloud.google.com/docs/authentication/production) during production use. -3. Install the GraalVM compiler. +3. Install the native image compiler. - You can follow the [official installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm) from the GraalVM website. + You can follow the [official installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm). After following the instructions, ensure that you install the Native Image extension installed by running: ``` gu install native-image ``` - Once you finish following the instructions, verify that the default version of Java is set to the GraalVM version by running `java -version` in a terminal. + Once you finish following the instructions, verify that the default version of Java is set to the correct version by running `java -version` in a terminal. You will see something similar to the below output: ``` $ java -version - openjdk 11.0.14 2022-01-18 - OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05) - OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05, mixed mode, sharing) + openjdk version "17.0.3" 2022-04-19 + OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06) + OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing) ``` @@ -58,7 +58,7 @@ Navigate to this directory in a new terminal. export LOCATION_ID=us-east1 ``` -2. Compile the application using the Native Image Compiler. This step may take a few minutes. +2. Compile the application using the native image Compiler. This step may take a few minutes. ``` $ mvn package -P native From 5fe8de0a353ed1caa123d718062ae2fd1a197667 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 22 Jun 2022 02:06:15 +0200 Subject: [PATCH 108/123] deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.12 (#700) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.11` -> `0.9.12` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/compatibility-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/confidence-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.12`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.12) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.11...0.9.12) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Add Mockito / Byte Buddy support documentation by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/236](https://togithub.com/graalvm/native-build-tools/pull/236) - Prevent builds from failing if no test list is present by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/239](https://togithub.com/graalvm/native-build-tools/pull/239) - Support different agent modes in the native-image Gradle plugin by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/230](https://togithub.com/graalvm/native-build-tools/pull/230) - JVM Reachability Metadata support for Maven by [@​alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/graalvm/native-build-tools/pull/240](https://togithub.com/graalvm/native-build-tools/pull/240) - Warn about deprecated agent DSL by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/242](https://togithub.com/graalvm/native-build-tools/pull/242) - Rework Maven plugin by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/247](https://togithub.com/graalvm/native-build-tools/pull/247) - Add Gradle rich output support, configure default metadata URL on Maven by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/249](https://togithub.com/graalvm/native-build-tools/pull/249) - Fix wrong scope for test dependencies by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/251](https://togithub.com/graalvm/native-build-tools/pull/251) - Add documentation for alternative build systems. by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/248](https://togithub.com/graalvm/native-build-tools/pull/248) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.11...0.9.12
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index b7762d1e910..a407cb8989c 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -108,7 +108,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.11 + 0.9.12 true com.example.tasks.TasksSampleApplication From 49dae54f73215f255bcd60ee4086df202caa5795 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 22 Jun 2022 02:08:14 +0200 Subject: [PATCH 109/123] deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.12 (#699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:junit-platform-native](https://togithub.com/graalvm/native-build-tools) | `0.9.11` -> `0.9.12` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/compatibility-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.12/confidence-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.12`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.12) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.11...0.9.12) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Add Mockito / Byte Buddy support documentation by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/236](https://togithub.com/graalvm/native-build-tools/pull/236) - Prevent builds from failing if no test list is present by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/239](https://togithub.com/graalvm/native-build-tools/pull/239) - Support different agent modes in the native-image Gradle plugin by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/230](https://togithub.com/graalvm/native-build-tools/pull/230) - JVM Reachability Metadata support for Maven by [@​alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/graalvm/native-build-tools/pull/240](https://togithub.com/graalvm/native-build-tools/pull/240) - Warn about deprecated agent DSL by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/242](https://togithub.com/graalvm/native-build-tools/pull/242) - Rework Maven plugin by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/247](https://togithub.com/graalvm/native-build-tools/pull/247) - Add Gradle rich output support, configure default metadata URL on Maven by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/249](https://togithub.com/graalvm/native-build-tools/pull/249) - Fix wrong scope for test dependencies by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/251](https://togithub.com/graalvm/native-build-tools/pull/251) - Add documentation for alternative build systems. by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/248](https://togithub.com/graalvm/native-build-tools/pull/248) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.11...0.9.12
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index a407cb8989c..85cb578cde4 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -88,7 +88,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.11 + 0.9.12 test
From f2364654388190518a7553a6cd2c57ae2ebe655f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 11 Jul 2022 20:28:36 +0200 Subject: [PATCH 110/123] chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#710) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v26 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 85cb578cde4..beefea00fc8 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 25.4.0 + 26.0.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 9df79d6ee78..7aaba932d70 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.4.0 + 26.0.0 pom import From 1e5edaa8ec284f1f6b4ebe2151d733bac8fcc085 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Jul 2022 19:00:18 +0200 Subject: [PATCH 111/123] deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 (#711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:junit-platform-native](https://togithub.com/graalvm/native-build-tools) | `0.9.12` -> `0.9.13` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/compatibility-slim/0.9.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/confidence-slim/0.9.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.13`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.13) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.12...0.9.13) ##### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Restore `NativeImagePlugin.NATIVE_TEST_EXTENSION` by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/256](https://togithub.com/graalvm/native-build-tools/pull/256) - Fix JUnit annotation scanning during the image build by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/258](https://togithub.com/graalvm/native-build-tools/pull/258) - Change reachability metadata fallback path by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/257](https://togithub.com/graalvm/native-build-tools/pull/257) - Add a DSL option that enables the native-image agent by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/263](https://togithub.com/graalvm/native-build-tools/pull/263) - Bump dependency versions by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/264](https://togithub.com/graalvm/native-build-tools/pull/264) - Rename `jvm-reachability-metadata` -> `graalvm-reachability-metadata` by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/265](https://togithub.com/graalvm/native-build-tools/pull/265) - Final PR for the metadata repo by [@​vjovanov](https://togithub.com/vjovanov) in [https://github.com/graalvm/native-build-tools/pull/266](https://togithub.com/graalvm/native-build-tools/pull/266) ##### New Contributors - [@​vjovanov](https://togithub.com/vjovanov) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/266](https://togithub.com/graalvm/native-build-tools/pull/266) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.12...0.9.13
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index beefea00fc8..ee8e6a502d7 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -88,7 +88,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.12 + 0.9.13 test From cf5d626de8cd1bd39331400f566f9fa8fb0327de Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Jul 2022 19:02:12 +0200 Subject: [PATCH 112/123] deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 (#712) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.12` -> `0.9.13` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.13/compatibility-slim/0.9.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.13/confidence-slim/0.9.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
graalvm/native-build-tools ### [`v0.9.13`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.13) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.12...0.9.13) ##### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Restore `NativeImagePlugin.NATIVE_TEST_EXTENSION` by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/256](https://togithub.com/graalvm/native-build-tools/pull/256) - Fix JUnit annotation scanning during the image build by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/258](https://togithub.com/graalvm/native-build-tools/pull/258) - Change reachability metadata fallback path by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/257](https://togithub.com/graalvm/native-build-tools/pull/257) - Add a DSL option that enables the native-image agent by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/263](https://togithub.com/graalvm/native-build-tools/pull/263) - Bump dependency versions by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/264](https://togithub.com/graalvm/native-build-tools/pull/264) - Rename `jvm-reachability-metadata` -> `graalvm-reachability-metadata` by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/265](https://togithub.com/graalvm/native-build-tools/pull/265) - Final PR for the metadata repo by [@​vjovanov](https://togithub.com/vjovanov) in [https://github.com/graalvm/native-build-tools/pull/266](https://togithub.com/graalvm/native-build-tools/pull/266) ##### New Contributors - [@​vjovanov](https://togithub.com/vjovanov) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/266](https://togithub.com/graalvm/native-build-tools/pull/266) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.12...0.9.13
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index ee8e6a502d7..510810a5ed5 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -108,7 +108,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.12 + 0.9.13 true com.example.tasks.TasksSampleApplication From 7c5273fa42ab123c4740f700e40e82eac4e6bb57 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jul 2022 19:28:19 +0200 Subject: [PATCH 113/123] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#719) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/pom.xml b/tasks/pom.xml index b8b3d10596c..e2f2f6fe176 100644 --- a/tasks/pom.xml +++ b/tasks/pom.xml @@ -39,7 +39,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.0.0 true From 6790d9feccc993b2ac90f44475d775a05fd6ab69 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Jul 2022 20:56:46 +0200 Subject: [PATCH 114/123] deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 (#723) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.junit.vintage:junit-vintage-engine](https://junit.org/junit5/) ([source](https://togithub.com/junit-team/junit5)) | `5.8.2` -> `5.9.0` | [![age](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.0/compatibility-slim/5.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.0/confidence-slim/5.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 510810a5ed5..375f1b0e52a 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -83,7 +83,7 @@ org.junit.vintage junit-vintage-engine - 5.8.2 + 5.9.0 org.graalvm.buildtools From 80a8f892e5c0af375eac5ea4cb9673fed1969dde Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 21:28:22 +0200 Subject: [PATCH 115/123] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#740) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.0.0` -> `26.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/compatibility-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/confidence-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 375f1b0e52a..484f157dcab 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.0.0 + 26.1.0 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 7aaba932d70..3889124be0d 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.0.0 + 26.1.0 pom import From daa25b41fb126801372e86f37d5dd029892f2863 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:18:17 +0000 Subject: [PATCH 116/123] chore: remove unused proto imports (#743) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: https://github.com/googleapis/googleapis/commit/cfa1b3782da7ccae31673d45401a0b79d2d4a84b Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 --- .../SyncCreateSetCredentialsProvider.java | 41 +++++++++++++ .../SyncCreateSetCredentialsProvider1.java | 40 ++++++++++++ .../create/SyncCreateSetEndpoint.java | 38 ++++++++++++ .../createqueue/AsyncCreateQueue.java | 47 ++++++++++++++ .../createqueue/SyncCreateQueue.java | 44 +++++++++++++ .../SyncCreateQueueLocationnameQueue.java | 40 ++++++++++++ .../SyncCreateQueueStringQueue.java | 40 ++++++++++++ .../createtask/AsyncCreateTask.java | 47 ++++++++++++++ .../createtask/SyncCreateTask.java | 44 +++++++++++++ .../SyncCreateTaskQueuenameTask.java | 40 ++++++++++++ .../createtask/SyncCreateTaskStringTask.java | 40 ++++++++++++ .../deletequeue/AsyncDeleteQueue.java | 46 ++++++++++++++ .../deletequeue/SyncDeleteQueue.java | 43 +++++++++++++ .../deletequeue/SyncDeleteQueueQueuename.java | 39 ++++++++++++ .../deletequeue/SyncDeleteQueueString.java | 39 ++++++++++++ .../deletetask/AsyncDeleteTask.java | 46 ++++++++++++++ .../deletetask/SyncDeleteTask.java | 43 +++++++++++++ .../deletetask/SyncDeleteTaskString.java | 39 ++++++++++++ .../deletetask/SyncDeleteTaskTaskname.java | 39 ++++++++++++ .../getiampolicy/AsyncGetIamPolicy.java | 48 +++++++++++++++ .../getiampolicy/SyncGetIamPolicy.java | 45 ++++++++++++++ .../SyncGetIamPolicyResourcename.java | 40 ++++++++++++ .../getiampolicy/SyncGetIamPolicyString.java | 39 ++++++++++++ .../getqueue/AsyncGetQueue.java | 46 ++++++++++++++ .../getqueue/SyncGetQueue.java | 43 +++++++++++++ .../getqueue/SyncGetQueueQueuename.java | 39 ++++++++++++ .../getqueue/SyncGetQueueString.java | 39 ++++++++++++ .../gettask/AsyncGetTask.java | 46 ++++++++++++++ .../cloudtasksclient/gettask/SyncGetTask.java | 43 +++++++++++++ .../gettask/SyncGetTaskString.java | 39 ++++++++++++ .../gettask/SyncGetTaskTaskname.java | 39 ++++++++++++ .../listqueues/AsyncListQueues.java | 51 ++++++++++++++++ .../listqueues/AsyncListQueuesPaged.java | 59 ++++++++++++++++++ .../listqueues/SyncListQueues.java | 48 +++++++++++++++ .../SyncListQueuesLocationname.java | 41 +++++++++++++ .../listqueues/SyncListQueuesString.java | 41 +++++++++++++ .../listtasks/AsyncListTasks.java | 50 +++++++++++++++ .../listtasks/AsyncListTasksPaged.java | 58 ++++++++++++++++++ .../listtasks/SyncListTasks.java | 47 ++++++++++++++ .../listtasks/SyncListTasksQueuename.java | 41 +++++++++++++ .../listtasks/SyncListTasksString.java | 41 +++++++++++++ .../pausequeue/AsyncPauseQueue.java | 46 ++++++++++++++ .../pausequeue/SyncPauseQueue.java | 43 +++++++++++++ .../pausequeue/SyncPauseQueueQueuename.java | 39 ++++++++++++ .../pausequeue/SyncPauseQueueString.java | 39 ++++++++++++ .../purgequeue/AsyncPurgeQueue.java | 46 ++++++++++++++ .../purgequeue/SyncPurgeQueue.java | 43 +++++++++++++ .../purgequeue/SyncPurgeQueueQueuename.java | 39 ++++++++++++ .../purgequeue/SyncPurgeQueueString.java | 39 ++++++++++++ .../resumequeue/AsyncResumeQueue.java | 46 ++++++++++++++ .../resumequeue/SyncResumeQueue.java | 43 +++++++++++++ .../resumequeue/SyncResumeQueueQueuename.java | 39 ++++++++++++ .../resumequeue/SyncResumeQueueString.java | 39 ++++++++++++ .../runtask/AsyncRunTask.java | 46 ++++++++++++++ .../cloudtasksclient/runtask/SyncRunTask.java | 43 +++++++++++++ .../runtask/SyncRunTaskString.java | 39 ++++++++++++ .../runtask/SyncRunTaskTaskname.java | 39 ++++++++++++ .../setiampolicy/AsyncSetIamPolicy.java | 49 +++++++++++++++ .../setiampolicy/SyncSetIamPolicy.java | 46 ++++++++++++++ .../SyncSetIamPolicyResourcenamePolicy.java | 41 +++++++++++++ .../SyncSetIamPolicyStringPolicy.java | 40 ++++++++++++ .../AsyncTestIamPermissions.java | 49 +++++++++++++++ .../SyncTestIamPermissions.java | 45 ++++++++++++++ ...tIamPermissionsResourcenameListstring.java | 44 +++++++++++++ ...yncTestIamPermissionsStringListstring.java | 43 +++++++++++++ .../updatequeue/AsyncUpdateQueue.java | 47 ++++++++++++++ .../updatequeue/SyncUpdateQueue.java | 44 +++++++++++++ .../SyncUpdateQueueQueueFieldmask.java | 40 ++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ .../acknowledgetask/AsyncAcknowledgeTask.java | 48 +++++++++++++++ .../acknowledgetask/SyncAcknowledgeTask.java | 45 ++++++++++++++ .../SyncAcknowledgeTaskStringTimestamp.java | 41 +++++++++++++ .../SyncAcknowledgeTaskTasknameTimestamp.java | 41 +++++++++++++ .../cancellease/AsyncCancelLease.java | 48 +++++++++++++++ .../cancellease/SyncCancelLease.java | 45 ++++++++++++++ .../SyncCancelLeaseStringTimestamp.java | 41 +++++++++++++ .../SyncCancelLeaseTasknameTimestamp.java | 41 +++++++++++++ .../SyncCreateSetCredentialsProvider.java | 41 +++++++++++++ .../SyncCreateSetCredentialsProvider1.java | 40 ++++++++++++ .../create/SyncCreateSetEndpoint.java | 38 ++++++++++++ .../createqueue/AsyncCreateQueue.java | 47 ++++++++++++++ .../createqueue/SyncCreateQueue.java | 44 +++++++++++++ .../SyncCreateQueueLocationnameQueue.java | 40 ++++++++++++ .../SyncCreateQueueStringQueue.java | 40 ++++++++++++ .../createtask/AsyncCreateTask.java | 47 ++++++++++++++ .../createtask/SyncCreateTask.java | 44 +++++++++++++ .../SyncCreateTaskQueuenameTask.java | 40 ++++++++++++ .../createtask/SyncCreateTaskStringTask.java | 40 ++++++++++++ .../deletequeue/AsyncDeleteQueue.java | 46 ++++++++++++++ .../deletequeue/SyncDeleteQueue.java | 43 +++++++++++++ .../deletequeue/SyncDeleteQueueQueuename.java | 39 ++++++++++++ .../deletequeue/SyncDeleteQueueString.java | 39 ++++++++++++ .../deletetask/AsyncDeleteTask.java | 46 ++++++++++++++ .../deletetask/SyncDeleteTask.java | 43 +++++++++++++ .../deletetask/SyncDeleteTaskString.java | 39 ++++++++++++ .../deletetask/SyncDeleteTaskTaskname.java | 39 ++++++++++++ .../getiampolicy/AsyncGetIamPolicy.java | 48 +++++++++++++++ .../getiampolicy/SyncGetIamPolicy.java | 45 ++++++++++++++ .../SyncGetIamPolicyResourcename.java | 40 ++++++++++++ .../getiampolicy/SyncGetIamPolicyString.java | 39 ++++++++++++ .../getqueue/AsyncGetQueue.java | 48 +++++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ .../getqueue/SyncGetQueueQueuename.java | 39 ++++++++++++ .../getqueue/SyncGetQueueString.java | 39 ++++++++++++ .../gettask/AsyncGetTask.java | 46 ++++++++++++++ .../cloudtasksclient/gettask/SyncGetTask.java | 43 +++++++++++++ .../gettask/SyncGetTaskString.java | 39 ++++++++++++ .../gettask/SyncGetTaskTaskname.java | 39 ++++++++++++ .../leasetasks/AsyncLeaseTasks.java | 51 ++++++++++++++++ .../leasetasks/SyncLeaseTasks.java | 47 ++++++++++++++ .../SyncLeaseTasksQueuenameDuration.java | 41 +++++++++++++ .../SyncLeaseTasksStringDuration.java | 41 +++++++++++++ .../listqueues/AsyncListQueues.java | 53 ++++++++++++++++ .../listqueues/AsyncListQueuesPaged.java | 61 +++++++++++++++++++ .../listqueues/SyncListQueues.java | 50 +++++++++++++++ .../SyncListQueuesLocationname.java | 41 +++++++++++++ .../listqueues/SyncListQueuesString.java | 41 +++++++++++++ .../listtasks/AsyncListTasks.java | 50 +++++++++++++++ .../listtasks/AsyncListTasksPaged.java | 58 ++++++++++++++++++ .../listtasks/SyncListTasks.java | 47 ++++++++++++++ .../listtasks/SyncListTasksQueuename.java | 41 +++++++++++++ .../listtasks/SyncListTasksString.java | 41 +++++++++++++ .../pausequeue/AsyncPauseQueue.java | 46 ++++++++++++++ .../pausequeue/SyncPauseQueue.java | 43 +++++++++++++ .../pausequeue/SyncPauseQueueQueuename.java | 39 ++++++++++++ .../pausequeue/SyncPauseQueueString.java | 39 ++++++++++++ .../purgequeue/AsyncPurgeQueue.java | 46 ++++++++++++++ .../purgequeue/SyncPurgeQueue.java | 43 +++++++++++++ .../purgequeue/SyncPurgeQueueQueuename.java | 39 ++++++++++++ .../purgequeue/SyncPurgeQueueString.java | 39 ++++++++++++ .../renewlease/AsyncRenewLease.java | 50 +++++++++++++++ .../renewlease/SyncRenewLease.java | 47 ++++++++++++++ ...SyncRenewLeaseStringTimestampDuration.java | 43 +++++++++++++ ...ncRenewLeaseTasknameTimestampDuration.java | 43 +++++++++++++ .../resumequeue/AsyncResumeQueue.java | 46 ++++++++++++++ .../resumequeue/SyncResumeQueue.java | 43 +++++++++++++ .../resumequeue/SyncResumeQueueQueuename.java | 39 ++++++++++++ .../resumequeue/SyncResumeQueueString.java | 39 ++++++++++++ .../runtask/AsyncRunTask.java | 46 ++++++++++++++ .../cloudtasksclient/runtask/SyncRunTask.java | 43 +++++++++++++ .../runtask/SyncRunTaskString.java | 39 ++++++++++++ .../runtask/SyncRunTaskTaskname.java | 39 ++++++++++++ .../setiampolicy/AsyncSetIamPolicy.java | 49 +++++++++++++++ .../setiampolicy/SyncSetIamPolicy.java | 46 ++++++++++++++ .../SyncSetIamPolicyResourcenamePolicy.java | 41 +++++++++++++ .../SyncSetIamPolicyStringPolicy.java | 40 ++++++++++++ .../AsyncTestIamPermissions.java | 49 +++++++++++++++ .../SyncTestIamPermissions.java | 45 ++++++++++++++ ...tIamPermissionsResourcenameListstring.java | 44 +++++++++++++ ...yncTestIamPermissionsStringListstring.java | 43 +++++++++++++ .../updatequeue/AsyncUpdateQueue.java | 47 ++++++++++++++ .../updatequeue/SyncUpdateQueue.java | 44 +++++++++++++ .../SyncUpdateQueueQueueFieldmask.java | 40 ++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ .../SyncCreateSetCredentialsProvider.java | 41 +++++++++++++ .../SyncCreateSetCredentialsProvider1.java | 40 ++++++++++++ .../create/SyncCreateSetEndpoint.java | 38 ++++++++++++ .../createqueue/AsyncCreateQueue.java | 47 ++++++++++++++ .../createqueue/SyncCreateQueue.java | 44 +++++++++++++ .../SyncCreateQueueLocationnameQueue.java | 40 ++++++++++++ .../SyncCreateQueueStringQueue.java | 40 ++++++++++++ .../createtask/AsyncCreateTask.java | 47 ++++++++++++++ .../createtask/SyncCreateTask.java | 44 +++++++++++++ .../SyncCreateTaskQueuenameTask.java | 40 ++++++++++++ .../createtask/SyncCreateTaskStringTask.java | 40 ++++++++++++ .../deletequeue/AsyncDeleteQueue.java | 46 ++++++++++++++ .../deletequeue/SyncDeleteQueue.java | 43 +++++++++++++ .../deletequeue/SyncDeleteQueueQueuename.java | 39 ++++++++++++ .../deletequeue/SyncDeleteQueueString.java | 39 ++++++++++++ .../deletetask/AsyncDeleteTask.java | 46 ++++++++++++++ .../deletetask/SyncDeleteTask.java | 43 +++++++++++++ .../deletetask/SyncDeleteTaskString.java | 39 ++++++++++++ .../deletetask/SyncDeleteTaskTaskname.java | 39 ++++++++++++ .../getiampolicy/AsyncGetIamPolicy.java | 48 +++++++++++++++ .../getiampolicy/SyncGetIamPolicy.java | 45 ++++++++++++++ .../SyncGetIamPolicyResourcename.java | 40 ++++++++++++ .../getiampolicy/SyncGetIamPolicyString.java | 39 ++++++++++++ .../getqueue/AsyncGetQueue.java | 48 +++++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ .../getqueue/SyncGetQueueQueuename.java | 39 ++++++++++++ .../getqueue/SyncGetQueueString.java | 39 ++++++++++++ .../gettask/AsyncGetTask.java | 46 ++++++++++++++ .../cloudtasksclient/gettask/SyncGetTask.java | 43 +++++++++++++ .../gettask/SyncGetTaskString.java | 39 ++++++++++++ .../gettask/SyncGetTaskTaskname.java | 39 ++++++++++++ .../listqueues/AsyncListQueues.java | 53 ++++++++++++++++ .../listqueues/AsyncListQueuesPaged.java | 61 +++++++++++++++++++ .../listqueues/SyncListQueues.java | 50 +++++++++++++++ .../SyncListQueuesLocationname.java | 41 +++++++++++++ .../listqueues/SyncListQueuesString.java | 41 +++++++++++++ .../listtasks/AsyncListTasks.java | 50 +++++++++++++++ .../listtasks/AsyncListTasksPaged.java | 58 ++++++++++++++++++ .../listtasks/SyncListTasks.java | 47 ++++++++++++++ .../listtasks/SyncListTasksQueuename.java | 41 +++++++++++++ .../listtasks/SyncListTasksString.java | 41 +++++++++++++ .../pausequeue/AsyncPauseQueue.java | 46 ++++++++++++++ .../pausequeue/SyncPauseQueue.java | 43 +++++++++++++ .../pausequeue/SyncPauseQueueQueuename.java | 39 ++++++++++++ .../pausequeue/SyncPauseQueueString.java | 39 ++++++++++++ .../purgequeue/AsyncPurgeQueue.java | 46 ++++++++++++++ .../purgequeue/SyncPurgeQueue.java | 43 +++++++++++++ .../purgequeue/SyncPurgeQueueQueuename.java | 39 ++++++++++++ .../purgequeue/SyncPurgeQueueString.java | 39 ++++++++++++ .../resumequeue/AsyncResumeQueue.java | 46 ++++++++++++++ .../resumequeue/SyncResumeQueue.java | 43 +++++++++++++ .../resumequeue/SyncResumeQueueQueuename.java | 39 ++++++++++++ .../resumequeue/SyncResumeQueueString.java | 39 ++++++++++++ .../runtask/AsyncRunTask.java | 46 ++++++++++++++ .../cloudtasksclient/runtask/SyncRunTask.java | 43 +++++++++++++ .../runtask/SyncRunTaskString.java | 39 ++++++++++++ .../runtask/SyncRunTaskTaskname.java | 39 ++++++++++++ .../setiampolicy/AsyncSetIamPolicy.java | 49 +++++++++++++++ .../setiampolicy/SyncSetIamPolicy.java | 46 ++++++++++++++ .../SyncSetIamPolicyResourcenamePolicy.java | 41 +++++++++++++ .../SyncSetIamPolicyStringPolicy.java | 40 ++++++++++++ .../AsyncTestIamPermissions.java | 49 +++++++++++++++ .../SyncTestIamPermissions.java | 45 ++++++++++++++ ...tIamPermissionsResourcenameListstring.java | 44 +++++++++++++ ...yncTestIamPermissionsStringListstring.java | 43 +++++++++++++ .../updatequeue/AsyncUpdateQueue.java | 47 ++++++++++++++ .../updatequeue/SyncUpdateQueue.java | 44 +++++++++++++ .../SyncUpdateQueueQueueFieldmask.java | 40 ++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ .../getqueue/SyncGetQueue.java | 45 ++++++++++++++ 226 files changed, 9805 insertions(+) create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetEndpoint.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/AsyncCreateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/AsyncCreateTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/AsyncDeleteTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/AsyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/AsyncGetTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueues.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueues.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasksPaged.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/AsyncPauseQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/AsyncResumeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/AsyncRunTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtaskssettings/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/AsyncAcknowledgeTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskStringTimestamp.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskTasknameTimestamp.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/AsyncCancelLease.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLease.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseStringTimestamp.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseTasknameTimestamp.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetEndpoint.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/AsyncCreateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/AsyncCreateTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/AsyncDeleteTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/AsyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/AsyncGetTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/AsyncLeaseTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksQueuenameDuration.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksStringDuration.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueues.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueues.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasksPaged.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/AsyncPauseQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/AsyncRenewLease.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLease.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseStringTimestampDuration.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseTasknameTimestampDuration.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/AsyncResumeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/AsyncRunTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtaskssettings/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetEndpoint.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/AsyncCreateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/AsyncCreateTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskStringTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/AsyncDeleteQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/AsyncDeleteTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/AsyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/AsyncGetTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueues.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueuesPaged.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueues.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesLocationname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasksPaged.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasks.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/AsyncPauseQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/AsyncPurgeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/AsyncResumeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/AsyncRunTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskString.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskTaskname.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/AsyncUpdateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtaskssettings/getqueue/SyncGetQueue.java create mode 100644 tasks/snippets/generated/com/google/cloud/tasks/v2beta3/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java 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 new file mode 100644 index 00000000000..4e05d8c0e9e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CloudTasksSettings; +import com.google.cloud.tasks.v2.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2_generated_cloudtasksclient_create_setcredentialsprovider_sync] 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 new file mode 100644 index 00000000000..3851491237f --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_create_setcredentialsprovider1_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CloudTasksSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + 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. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder() + .setTransportChannelProvider( + CloudTasksSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2_generated_cloudtasksclient_create_setcredentialsprovider1_sync] 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 new file mode 100644 index 00000000000..9da8f9ea3c2 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_create_setendpoint_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CloudTasksSettings; +import com.google.cloud.tasks.v2.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2_generated_cloudtasksclient_create_setendpoint_sync] 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 new file mode 100644 index 00000000000..1b2db3ddbfa --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/AsyncCreateQueue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createqueue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CreateQueueRequest; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class AsyncCreateQueue { + + public static void main(String[] args) throws Exception { + asyncCreateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateQueueRequest request = + CreateQueueRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueue(Queue.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.createQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createqueue_async] 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 new file mode 100644 index 00000000000..11135004eda --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueue.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createqueue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CreateQueueRequest; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class SyncCreateQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateQueueRequest request = + CreateQueueRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueue(Queue.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.createQueue(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createqueue_sync] 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 new file mode 100644 index 00000000000..9c9fcc92d32 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createqueue_locationnamequeue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class SyncCreateQueueLocationnameQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueueLocationnameQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Queue queue = Queue.newBuilder().build(); + Queue response = cloudTasksClient.createQueue(parent, queue); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createqueue_locationnamequeue_sync] 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 new file mode 100644 index 00000000000..721ffc9b46e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createqueue_stringqueue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class SyncCreateQueueStringQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueueStringQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Queue queue = Queue.newBuilder().build(); + Queue response = cloudTasksClient.createQueue(parent, queue); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createqueue_stringqueue_sync] 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 new file mode 100644 index 00000000000..ccf2a479ea2 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/AsyncCreateTask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createtask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CreateTaskRequest; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class AsyncCreateTask { + + public static void main(String[] args) throws Exception { + asyncCreateTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTask(Task.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.createTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createtask_async] 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 new file mode 100644 index 00000000000..df58baee39e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createtask_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.CreateTaskRequest; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class SyncCreateTask { + + public static void main(String[] args) throws Exception { + syncCreateTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTask(Task.newBuilder().build()) + .build(); + Task response = cloudTasksClient.createTask(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createtask_sync] 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 new file mode 100644 index 00000000000..a84eb460158 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createtask_queuenametask_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class SyncCreateTaskQueuenameTask { + + public static void main(String[] args) throws Exception { + syncCreateTaskQueuenameTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Task task = Task.newBuilder().build(); + Task response = cloudTasksClient.createTask(parent, task); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createtask_queuenametask_sync] 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 new file mode 100644 index 00000000000..0860e29516d --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_createtask_stringtask_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class SyncCreateTaskStringTask { + + public static void main(String[] args) throws Exception { + syncCreateTaskStringTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Task task = Task.newBuilder().build(); + Task response = cloudTasksClient.createTask(parent, task); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_createtask_stringtask_sync] 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 new file mode 100644 index 00000000000..9762594b013 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.DeleteQueueRequest; +import com.google.cloud.tasks.v2.QueueName; +import com.google.protobuf.Empty; + +public class AsyncDeleteQueue { + + public static void main(String[] args) throws Exception { + asyncDeleteQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteQueueRequest request = + DeleteQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.deleteQueueCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletequeue_async] 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 new file mode 100644 index 00000000000..da63071b5b1 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletequeue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.DeleteQueueRequest; +import com.google.cloud.tasks.v2.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueue { + + public static void main(String[] args) throws Exception { + syncDeleteQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteQueueRequest request = + DeleteQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + cloudTasksClient.deleteQueue(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletequeue_sync] 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 new file mode 100644 index 00000000000..694e60aae2f --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletequeue_queuename_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueueQueuename { + + public static void main(String[] args) throws Exception { + syncDeleteQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + cloudTasksClient.deleteQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletequeue_queuename_sync] 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 new file mode 100644 index 00000000000..8c7e82cf15c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletequeue_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueueString { + + public static void main(String[] args) throws Exception { + syncDeleteQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + cloudTasksClient.deleteQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletequeue_string_sync] 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 new file mode 100644 index 00000000000..632b3fabfaf --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/AsyncDeleteTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletetask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.DeleteTaskRequest; +import com.google.cloud.tasks.v2.TaskName; +import com.google.protobuf.Empty; + +public class AsyncDeleteTask { + + public static void main(String[] args) throws Exception { + asyncDeleteTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteTaskRequest request = + DeleteTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.deleteTaskCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletetask_async] 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 new file mode 100644 index 00000000000..fd2d3a75bb7 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletetask_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.DeleteTaskRequest; +import com.google.cloud.tasks.v2.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTask { + + public static void main(String[] args) throws Exception { + syncDeleteTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteTaskRequest request = + DeleteTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + cloudTasksClient.deleteTask(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletetask_sync] 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 new file mode 100644 index 00000000000..5871611c842 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletetask_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTaskString { + + public static void main(String[] args) throws Exception { + syncDeleteTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + cloudTasksClient.deleteTask(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletetask_string_sync] 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 new file mode 100644 index 00000000000..189c71cfd76 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_deletetask_taskname_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTaskTaskname { + + public static void main(String[] args) throws Exception { + syncDeleteTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + cloudTasksClient.deleteTask(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_deletetask_taskname_sync] 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 new file mode 100644 index 00000000000..60880005523 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getiampolicy_async] 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 new file mode 100644 index 00000000000..493482e292b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getiampolicy_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = cloudTasksClient.getIamPolicy(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getiampolicy_sync] 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 new file mode 100644 index 00000000000..d463ab2e54b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getiampolicy_resourcename_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyResourcename { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyResourcename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy response = cloudTasksClient.getIamPolicy(resource); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getiampolicy_resourcename_sync] 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 new file mode 100644 index 00000000000..979f61bcf73 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getiampolicy_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Policy response = cloudTasksClient.getIamPolicy(resource); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getiampolicy_string_sync] 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 new file mode 100644 index 00000000000..0f432e89670 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/AsyncGetQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getqueue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.GetQueueRequest; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class AsyncGetQueue { + + public static void main(String[] args) throws Exception { + asyncGetQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetQueueRequest request = + GetQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.getQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getqueue_async] 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 new file mode 100644 index 00000000000..0fc5586a772 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getqueue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.GetQueueRequest; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetQueueRequest request = + GetQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.getQueue(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getqueue_sync] 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 new file mode 100644 index 00000000000..d080d45b3b5 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getqueue_queuename_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncGetQueueQueuename { + + public static void main(String[] args) throws Exception { + syncGetQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.getQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getqueue_queuename_sync] 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 new file mode 100644 index 00000000000..9ae887426f4 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/getqueue/SyncGetQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_getqueue_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncGetQueueString { + + public static void main(String[] args) throws Exception { + syncGetQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.getQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_getqueue_string_sync] 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 new file mode 100644 index 00000000000..ffc0e6607bd --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/AsyncGetTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_gettask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.GetTaskRequest; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class AsyncGetTask { + + public static void main(String[] args) throws Exception { + asyncGetTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.getTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_gettask_async] 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 new file mode 100644 index 00000000000..1d470d4231a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_gettask_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.GetTaskRequest; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class SyncGetTask { + + public static void main(String[] args) throws Exception { + syncGetTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + Task response = cloudTasksClient.getTask(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_gettask_sync] 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 new file mode 100644 index 00000000000..d571b3ec090 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_gettask_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class SyncGetTaskString { + + public static void main(String[] args) throws Exception { + syncGetTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Task response = cloudTasksClient.getTask(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_gettask_string_sync] 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 new file mode 100644 index 00000000000..7047deb0595 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/gettask/SyncGetTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_gettask_taskname_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class SyncGetTaskTaskname { + + public static void main(String[] args) throws Exception { + syncGetTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task response = cloudTasksClient.getTask(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_gettask_taskname_sync] 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 new file mode 100644 index 00000000000..e35753f3418 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueues.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listqueues_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.ListQueuesRequest; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class AsyncListQueues { + + public static void main(String[] args) throws Exception { + asyncListQueues(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = cloudTasksClient.listQueuesPagedCallable().futureCall(request); + // Do something. + for (Queue element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listqueues_async] 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 new file mode 100644 index 00000000000..be973228164 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listqueues_paged_async] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.ListQueuesRequest; +import com.google.cloud.tasks.v2.ListQueuesResponse; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; +import com.google.common.base.Strings; + +public class AsyncListQueuesPaged { + + public static void main(String[] args) throws Exception { + asyncListQueuesPaged(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListQueuesResponse response = cloudTasksClient.listQueuesCallable().call(request); + for (Queue element : response.getQueuesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listqueues_paged_async] 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 new file mode 100644 index 00000000000..2b403ced637 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueues.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listqueues_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.ListQueuesRequest; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class SyncListQueues { + + public static void main(String[] args) throws Exception { + syncListQueues(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Queue element : cloudTasksClient.listQueues(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listqueues_sync] 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 new file mode 100644 index 00000000000..306a8355877 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listqueues_locationname_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class SyncListQueuesLocationname { + + public static void main(String[] args) throws Exception { + syncListQueuesLocationname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listqueues_locationname_sync] 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 new file mode 100644 index 00000000000..1ce53a05aab --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listqueues/SyncListQueuesString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listqueues_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.LocationName; +import com.google.cloud.tasks.v2.Queue; + +public class SyncListQueuesString { + + public static void main(String[] args) throws Exception { + syncListQueuesString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listqueues_string_sync] 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 new file mode 100644 index 00000000000..f2b39a83a4d --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasks.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listtasks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.ListTasksRequest; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class AsyncListTasks { + + public static void main(String[] args) throws Exception { + asyncListTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = cloudTasksClient.listTasksPagedCallable().futureCall(request); + // Do something. + for (Task element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listtasks_async] 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 new file mode 100644 index 00000000000..95d3b4cb20e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/AsyncListTasksPaged.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listtasks_paged_async] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.ListTasksRequest; +import com.google.cloud.tasks.v2.ListTasksResponse; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; +import com.google.common.base.Strings; + +public class AsyncListTasksPaged { + + public static void main(String[] args) throws Exception { + asyncListTasksPaged(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListTasksResponse response = cloudTasksClient.listTasksCallable().call(request); + for (Task element : response.getTasksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listtasks_paged_async] 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 new file mode 100644 index 00000000000..359dd06ae69 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasks.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listtasks_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.ListTasksRequest; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class SyncListTasks { + + public static void main(String[] args) throws Exception { + syncListTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Task element : cloudTasksClient.listTasks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listtasks_sync] 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 new file mode 100644 index 00000000000..1c6ef375c87 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksQueuename.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listtasks_queuename_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class SyncListTasksQueuename { + + public static void main(String[] args) throws Exception { + syncListTasksQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listtasks_queuename_sync] 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 new file mode 100644 index 00000000000..ce21b31992c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/listtasks/SyncListTasksString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_listtasks_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.Task; + +public class SyncListTasksString { + + public static void main(String[] args) throws Exception { + syncListTasksString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2_generated_cloudtasksclient_listtasks_string_sync] 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 new file mode 100644 index 00000000000..ef03e3f9901 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/AsyncPauseQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_pausequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.PauseQueueRequest; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class AsyncPauseQueue { + + public static void main(String[] args) throws Exception { + asyncPauseQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PauseQueueRequest request = + PauseQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.pauseQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_pausequeue_async] 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 new file mode 100644 index 00000000000..a3186b778eb --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_pausequeue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.PauseQueueRequest; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncPauseQueue { + + public static void main(String[] args) throws Exception { + syncPauseQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PauseQueueRequest request = + PauseQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.pauseQueue(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_pausequeue_sync] 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 new file mode 100644 index 00000000000..218a3d5956a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_pausequeue_queuename_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncPauseQueueQueuename { + + public static void main(String[] args) throws Exception { + syncPauseQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.pauseQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_pausequeue_queuename_sync] 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 new file mode 100644 index 00000000000..0bfa1089381 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/pausequeue/SyncPauseQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_pausequeue_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncPauseQueueString { + + public static void main(String[] args) throws Exception { + syncPauseQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.pauseQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_pausequeue_string_sync] 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 new file mode 100644 index 00000000000..0f9e2f86438 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_purgequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.PurgeQueueRequest; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class AsyncPurgeQueue { + + public static void main(String[] args) throws Exception { + asyncPurgeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PurgeQueueRequest request = + PurgeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.purgeQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_purgequeue_async] 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 new file mode 100644 index 00000000000..a16236a5193 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_purgequeue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.PurgeQueueRequest; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncPurgeQueue { + + public static void main(String[] args) throws Exception { + syncPurgeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PurgeQueueRequest request = + PurgeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.purgeQueue(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_purgequeue_sync] 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 new file mode 100644 index 00000000000..3c864eaae43 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_purgequeue_queuename_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncPurgeQueueQueuename { + + public static void main(String[] args) throws Exception { + syncPurgeQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.purgeQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_purgequeue_queuename_sync] 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 new file mode 100644 index 00000000000..84007dc3d4d --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_purgequeue_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncPurgeQueueString { + + public static void main(String[] args) throws Exception { + syncPurgeQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.purgeQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_purgequeue_string_sync] 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 new file mode 100644 index 00000000000..97db36cfbe2 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/AsyncResumeQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_resumequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.ResumeQueueRequest; + +public class AsyncResumeQueue { + + public static void main(String[] args) throws Exception { + asyncResumeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResumeQueueRequest request = + ResumeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.resumeQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_resumequeue_async] 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 new file mode 100644 index 00000000000..acdb269d478 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_resumequeue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; +import com.google.cloud.tasks.v2.ResumeQueueRequest; + +public class SyncResumeQueue { + + public static void main(String[] args) throws Exception { + syncResumeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResumeQueueRequest request = + ResumeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.resumeQueue(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_resumequeue_sync] 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 new file mode 100644 index 00000000000..5526a4e8150 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_resumequeue_queuename_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncResumeQueueQueuename { + + public static void main(String[] args) throws Exception { + syncResumeQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.resumeQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_resumequeue_queuename_sync] 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 new file mode 100644 index 00000000000..0c29041fc8c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/resumequeue/SyncResumeQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_resumequeue_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.QueueName; + +public class SyncResumeQueueString { + + public static void main(String[] args) throws Exception { + syncResumeQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.resumeQueue(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_resumequeue_string_sync] 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 new file mode 100644 index 00000000000..cde80c1c126 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/AsyncRunTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_runtask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.RunTaskRequest; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class AsyncRunTask { + + public static void main(String[] args) throws Exception { + asyncRunTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RunTaskRequest request = + RunTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.runTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_runtask_async] 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 new file mode 100644 index 00000000000..ea176710b93 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_runtask_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.RunTaskRequest; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class SyncRunTask { + + public static void main(String[] args) throws Exception { + syncRunTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RunTaskRequest request = + RunTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + Task response = cloudTasksClient.runTask(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_runtask_sync] 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 new file mode 100644 index 00000000000..11b7fef8b33 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_runtask_string_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class SyncRunTaskString { + + public static void main(String[] args) throws Exception { + syncRunTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Task response = cloudTasksClient.runTask(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_runtask_string_sync] 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 new file mode 100644 index 00000000000..6e70b7b7f98 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/runtask/SyncRunTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_runtask_taskname_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Task; +import com.google.cloud.tasks.v2.TaskName; + +public class SyncRunTaskTaskname { + + public static void main(String[] args) throws Exception { + syncRunTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task response = cloudTasksClient.runTask(name); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_runtask_taskname_sync] 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 new file mode 100644 index 00000000000..5a0e28fa969 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_setiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_setiampolicy_async] 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 new file mode 100644 index 00000000000..24d29467743 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_setiampolicy_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = cloudTasksClient.setIamPolicy(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_setiampolicy_sync] 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 new file mode 100644 index 00000000000..33cf4945469 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_setiampolicy_resourcenamepolicy_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyResourcenamePolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyResourcenamePolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy policy = Policy.newBuilder().build(); + Policy response = cloudTasksClient.setIamPolicy(resource, policy); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_setiampolicy_resourcenamepolicy_sync] 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 new file mode 100644 index 00000000000..b12bbe3f3b3 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_setiampolicy_stringpolicy_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyStringPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Policy policy = Policy.newBuilder().build(); + Policy response = cloudTasksClient.setIamPolicy(resource, policy); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_setiampolicy_stringpolicy_sync] 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 new file mode 100644 index 00000000000..0568b6398bb --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_testiampermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + cloudTasksClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_testiampermissions_async] 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 new file mode 100644 index 00000000000..f2f4170073d --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_testiampermissions_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = cloudTasksClient.testIamPermissions(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_testiampermissions_sync] 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 new file mode 100644 index 00000000000..38b1f4d17db --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_testiampermissions_resourcenameliststring_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; +import java.util.List; + +public class SyncTestIamPermissionsResourcenameListstring { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsResourcenameListstring(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + List permissions = new ArrayList<>(); + TestIamPermissionsResponse response = + cloudTasksClient.testIamPermissions(resource, permissions); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_testiampermissions_resourcenameliststring_sync] 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 new file mode 100644 index 00000000000..381af0ce2ff --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_testiampermissions_stringliststring_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.QueueName; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; +import java.util.List; + +public class SyncTestIamPermissionsStringListstring { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringListstring(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + List permissions = new ArrayList<>(); + TestIamPermissionsResponse response = + cloudTasksClient.testIamPermissions(resource, permissions); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_testiampermissions_stringliststring_sync] 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 new file mode 100644 index 00000000000..22494974d46 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_updatequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.UpdateQueueRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateQueue { + + public static void main(String[] args) throws Exception { + asyncUpdateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UpdateQueueRequest request = + UpdateQueueRequest.newBuilder() + .setQueue(Queue.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.updateQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_updatequeue_async] 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 new file mode 100644 index 00000000000..2038283ec20 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueue.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_updatequeue_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.cloud.tasks.v2.UpdateQueueRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateQueue { + + public static void main(String[] args) throws Exception { + syncUpdateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UpdateQueueRequest request = + UpdateQueueRequest.newBuilder() + .setQueue(Queue.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.updateQueue(request); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_updatequeue_sync] 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 new file mode 100644 index 00000000000..4788dbb39bb --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtasksclient_updatequeue_queuefieldmask_sync] +import com.google.cloud.tasks.v2.CloudTasksClient; +import com.google.cloud.tasks.v2.Queue; +import com.google.protobuf.FieldMask; + +public class SyncUpdateQueueQueueFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateQueueQueueFieldmask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + Queue queue = Queue.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Queue response = cloudTasksClient.updateQueue(queue, updateMask); + } + } +} +// [END tasks_v2_generated_cloudtasksclient_updatequeue_queuefieldmask_sync] 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 new file mode 100644 index 00000000000..0ffb477c88b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/cloudtaskssettings/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.samples; + +// [START tasks_v2_generated_cloudtaskssettings_getqueue_sync] +import com.google.cloud.tasks.v2.CloudTasksSettings; +import java.time.Duration; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + CloudTasksSettings.Builder cloudTasksSettingsBuilder = CloudTasksSettings.newBuilder(); + cloudTasksSettingsBuilder + .getQueueSettings() + .setRetrySettings( + cloudTasksSettingsBuilder + .getQueueSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudTasksSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); + } +} +// [END tasks_v2_generated_cloudtaskssettings_getqueue_sync] 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 new file mode 100644 index 00000000000..7f7bda8f23e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2.stub.samples; + +// [START tasks_v2_generated_cloudtasksstubsettings_getqueue_sync] +import com.google.cloud.tasks.v2.stub.CloudTasksStubSettings; +import java.time.Duration; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + CloudTasksStubSettings.Builder cloudTasksSettingsBuilder = CloudTasksStubSettings.newBuilder(); + cloudTasksSettingsBuilder + .getQueueSettings() + .setRetrySettings( + cloudTasksSettingsBuilder + .getQueueSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudTasksStubSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); + } +} +// [END tasks_v2_generated_cloudtasksstubsettings_getqueue_sync] 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 new file mode 100644 index 00000000000..ab1afa05ec6 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/AsyncAcknowledgeTask.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; + +public class AsyncAcknowledgeTask { + + public static void main(String[] args) throws Exception { + asyncAcknowledgeTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + AcknowledgeTaskRequest request = + AcknowledgeTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .setScheduleTime(Timestamp.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.acknowledgeTaskCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_async] 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 new file mode 100644 index 00000000000..3baa6f7ef65 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_sync] +import com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; + +public class SyncAcknowledgeTask { + + public static void main(String[] args) throws Exception { + syncAcknowledgeTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + AcknowledgeTaskRequest request = + AcknowledgeTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .setScheduleTime(Timestamp.newBuilder().build()) + .build(); + cloudTasksClient.acknowledgeTask(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_sync] 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 new file mode 100644 index 00000000000..92f2d61fb45 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskStringTimestamp.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_stringtimestamp_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; + +public class SyncAcknowledgeTaskStringTimestamp { + + public static void main(String[] args) throws Exception { + syncAcknowledgeTaskStringTimestamp(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + cloudTasksClient.acknowledgeTask(name, scheduleTime); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_stringtimestamp_sync] 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 new file mode 100644 index 00000000000..762125bd376 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/acknowledgetask/SyncAcknowledgeTaskTasknameTimestamp.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_tasknametimestamp_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; + +public class SyncAcknowledgeTaskTasknameTimestamp { + + public static void main(String[] args) throws Exception { + syncAcknowledgeTaskTasknameTimestamp(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + cloudTasksClient.acknowledgeTask(name, scheduleTime); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_acknowledgetask_tasknametimestamp_sync] 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 new file mode 100644 index 00000000000..da94e4537cb --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/AsyncCancelLease.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_cancellease_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Timestamp; + +public class AsyncCancelLease { + + public static void main(String[] args) throws Exception { + asyncCancelLease(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CancelLeaseRequest request = + CancelLeaseRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .setScheduleTime(Timestamp.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.cancelLeaseCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_cancellease_async] 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 new file mode 100644 index 00000000000..5ed165c2bd0 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLease.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_cancellease_sync] +import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Timestamp; + +public class SyncCancelLease { + + public static void main(String[] args) throws Exception { + syncCancelLease(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CancelLeaseRequest request = + CancelLeaseRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .setScheduleTime(Timestamp.newBuilder().build()) + .build(); + Task response = cloudTasksClient.cancelLease(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_cancellease_sync] 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 new file mode 100644 index 00000000000..d4f1f1c4e12 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseStringTimestamp.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_cancellease_stringtimestamp_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Timestamp; + +public class SyncCancelLeaseStringTimestamp { + + public static void main(String[] args) throws Exception { + syncCancelLeaseStringTimestamp(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + Task response = cloudTasksClient.cancelLease(name, scheduleTime); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_cancellease_stringtimestamp_sync] 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 new file mode 100644 index 00000000000..059088a1a6e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/cancellease/SyncCancelLeaseTasknameTimestamp.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_cancellease_tasknametimestamp_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Timestamp; + +public class SyncCancelLeaseTasknameTimestamp { + + public static void main(String[] args) throws Exception { + syncCancelLeaseTasknameTimestamp(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + Task response = cloudTasksClient.cancelLease(name, scheduleTime); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_cancellease_tasknametimestamp_sync] 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 new file mode 100644 index 00000000000..dbe6a904eec --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CloudTasksSettings; +import com.google.cloud.tasks.v2beta2.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_create_setcredentialsprovider_sync] 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 new file mode 100644 index 00000000000..abb4e687a71 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_create_setcredentialsprovider1_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CloudTasksSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + 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. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder() + .setTransportChannelProvider( + CloudTasksSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_create_setcredentialsprovider1_sync] 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 new file mode 100644 index 00000000000..4e47cdf5dd9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_create_setendpoint_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CloudTasksSettings; +import com.google.cloud.tasks.v2beta2.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_create_setendpoint_sync] 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 new file mode 100644 index 00000000000..e9bfc5f942e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/AsyncCreateQueue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createqueue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CreateQueueRequest; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; + +public class AsyncCreateQueue { + + public static void main(String[] args) throws Exception { + asyncCreateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateQueueRequest request = + CreateQueueRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueue(Queue.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.createQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createqueue_async] 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 new file mode 100644 index 00000000000..e34e8208e90 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueue.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createqueue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CreateQueueRequest; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; + +public class SyncCreateQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateQueueRequest request = + CreateQueueRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueue(Queue.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.createQueue(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createqueue_sync] 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 new file mode 100644 index 00000000000..b2327f59734 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createqueue_locationnamequeue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; + +public class SyncCreateQueueLocationnameQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueueLocationnameQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Queue queue = Queue.newBuilder().build(); + Queue response = cloudTasksClient.createQueue(parent, queue); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createqueue_locationnamequeue_sync] 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 new file mode 100644 index 00000000000..2616093dd8b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createqueue_stringqueue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; + +public class SyncCreateQueueStringQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueueStringQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Queue queue = Queue.newBuilder().build(); + Queue response = cloudTasksClient.createQueue(parent, queue); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createqueue_stringqueue_sync] 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 new file mode 100644 index 00000000000..e1b299a5770 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/AsyncCreateTask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createtask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CreateTaskRequest; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class AsyncCreateTask { + + public static void main(String[] args) throws Exception { + asyncCreateTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTask(Task.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.createTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createtask_async] 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 new file mode 100644 index 00000000000..390a437a54e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createtask_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.CreateTaskRequest; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class SyncCreateTask { + + public static void main(String[] args) throws Exception { + syncCreateTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTask(Task.newBuilder().build()) + .build(); + Task response = cloudTasksClient.createTask(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createtask_sync] 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 new file mode 100644 index 00000000000..62a070ae8da --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createtask_queuenametask_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class SyncCreateTaskQueuenameTask { + + public static void main(String[] args) throws Exception { + syncCreateTaskQueuenameTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Task task = Task.newBuilder().build(); + Task response = cloudTasksClient.createTask(parent, task); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createtask_queuenametask_sync] 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 new file mode 100644 index 00000000000..73d350ceee6 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/createtask/SyncCreateTaskStringTask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_createtask_stringtask_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class SyncCreateTaskStringTask { + + public static void main(String[] args) throws Exception { + syncCreateTaskStringTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Task task = Task.newBuilder().build(); + Task response = cloudTasksClient.createTask(parent, task); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_createtask_stringtask_sync] 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 new file mode 100644 index 00000000000..af835c271fe --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/AsyncDeleteQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.DeleteQueueRequest; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Empty; + +public class AsyncDeleteQueue { + + public static void main(String[] args) throws Exception { + asyncDeleteQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteQueueRequest request = + DeleteQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.deleteQueueCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletequeue_async] 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 new file mode 100644 index 00000000000..32678f61971 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletequeue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.DeleteQueueRequest; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueue { + + public static void main(String[] args) throws Exception { + syncDeleteQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteQueueRequest request = + DeleteQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + cloudTasksClient.deleteQueue(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletequeue_sync] 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 new file mode 100644 index 00000000000..951b6511b87 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletequeue_queuename_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueueQueuename { + + public static void main(String[] args) throws Exception { + syncDeleteQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + cloudTasksClient.deleteQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletequeue_queuename_sync] 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 new file mode 100644 index 00000000000..43f176ba586 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletequeue/SyncDeleteQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletequeue_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueueString { + + public static void main(String[] args) throws Exception { + syncDeleteQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + cloudTasksClient.deleteQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletequeue_string_sync] 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 new file mode 100644 index 00000000000..f9274df2eb0 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/AsyncDeleteTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletetask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.DeleteTaskRequest; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; + +public class AsyncDeleteTask { + + public static void main(String[] args) throws Exception { + asyncDeleteTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteTaskRequest request = + DeleteTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.deleteTaskCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletetask_async] 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 new file mode 100644 index 00000000000..36fe4ad3894 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletetask_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.DeleteTaskRequest; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTask { + + public static void main(String[] args) throws Exception { + syncDeleteTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteTaskRequest request = + DeleteTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + cloudTasksClient.deleteTask(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletetask_sync] 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 new file mode 100644 index 00000000000..0294a9a64c1 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletetask_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTaskString { + + public static void main(String[] args) throws Exception { + syncDeleteTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + cloudTasksClient.deleteTask(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletetask_string_sync] 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 new file mode 100644 index 00000000000..1f6b15ae6b1 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_deletetask_taskname_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTaskTaskname { + + public static void main(String[] args) throws Exception { + syncDeleteTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + cloudTasksClient.deleteTask(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_deletetask_taskname_sync] 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 new file mode 100644 index 00000000000..d0f68b552e9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getiampolicy_async] 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 new file mode 100644 index 00000000000..ee3f1c6749a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getiampolicy_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = cloudTasksClient.getIamPolicy(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getiampolicy_sync] 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 new file mode 100644 index 00000000000..a8002081637 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getiampolicy_resourcename_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyResourcename { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyResourcename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy response = cloudTasksClient.getIamPolicy(resource); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getiampolicy_resourcename_sync] 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 new file mode 100644 index 00000000000..6edf8501512 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getiampolicy_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Policy response = cloudTasksClient.getIamPolicy(resource); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getiampolicy_string_sync] 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 new file mode 100644 index 00000000000..ae934132a1a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/AsyncGetQueue.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getqueue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.GetQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.FieldMask; + +public class AsyncGetQueue { + + public static void main(String[] args) throws Exception { + asyncGetQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetQueueRequest request = + GetQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setReadMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.getQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getqueue_async] 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 new file mode 100644 index 00000000000..58d8f86ef33 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getqueue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.GetQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.FieldMask; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetQueueRequest request = + GetQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setReadMask(FieldMask.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.getQueue(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getqueue_sync] 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 new file mode 100644 index 00000000000..06e7c5b8437 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getqueue_queuename_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncGetQueueQueuename { + + public static void main(String[] args) throws Exception { + syncGetQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.getQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getqueue_queuename_sync] 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 new file mode 100644 index 00000000000..8c83dbd477e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/getqueue/SyncGetQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_getqueue_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncGetQueueString { + + public static void main(String[] args) throws Exception { + syncGetQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.getQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_getqueue_string_sync] 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 new file mode 100644 index 00000000000..64cb85ce988 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/AsyncGetTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_gettask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.GetTaskRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class AsyncGetTask { + + public static void main(String[] args) throws Exception { + asyncGetTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.getTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_gettask_async] 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 new file mode 100644 index 00000000000..f7ae4a589e3 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_gettask_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.GetTaskRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class SyncGetTask { + + public static void main(String[] args) throws Exception { + syncGetTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + Task response = cloudTasksClient.getTask(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_gettask_sync] 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 new file mode 100644 index 00000000000..36fb1cf3ec0 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_gettask_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class SyncGetTaskString { + + public static void main(String[] args) throws Exception { + syncGetTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Task response = cloudTasksClient.getTask(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_gettask_string_sync] 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 new file mode 100644 index 00000000000..517259c6217 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/gettask/SyncGetTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_gettask_taskname_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class SyncGetTaskTaskname { + + public static void main(String[] args) throws Exception { + syncGetTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task response = cloudTasksClient.getTask(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_gettask_taskname_sync] 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 new file mode 100644 index 00000000000..a712847f0ad --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/AsyncLeaseTasks.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_leasetasks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LeaseTasksRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Duration; + +public class AsyncLeaseTasks { + + public static void main(String[] args) throws Exception { + asyncLeaseTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LeaseTasksRequest request = + LeaseTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setMaxTasks(-233969421) + .setLeaseDuration(Duration.newBuilder().build()) + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + cloudTasksClient.leaseTasksCallable().futureCall(request); + // Do something. + LeaseTasksResponse response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_leasetasks_async] 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 new file mode 100644 index 00000000000..6f6a1b5e84f --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasks.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_leasetasks_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LeaseTasksRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Duration; + +public class SyncLeaseTasks { + + public static void main(String[] args) throws Exception { + syncLeaseTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LeaseTasksRequest request = + LeaseTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setMaxTasks(-233969421) + .setLeaseDuration(Duration.newBuilder().build()) + .setFilter("filter-1274492040") + .build(); + LeaseTasksResponse response = cloudTasksClient.leaseTasks(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_leasetasks_sync] 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 new file mode 100644 index 00000000000..2a935d86962 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksQueuenameDuration.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_leasetasks_queuenameduration_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Duration; + +public class SyncLeaseTasksQueuenameDuration { + + public static void main(String[] args) throws Exception { + syncLeaseTasksQueuenameDuration(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Duration leaseDuration = Duration.newBuilder().build(); + LeaseTasksResponse response = cloudTasksClient.leaseTasks(parent, leaseDuration); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_leasetasks_queuenameduration_sync] 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 new file mode 100644 index 00000000000..a14af6420ad --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/leasetasks/SyncLeaseTasksStringDuration.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_leasetasks_stringduration_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.protobuf.Duration; + +public class SyncLeaseTasksStringDuration { + + public static void main(String[] args) throws Exception { + syncLeaseTasksStringDuration(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Duration leaseDuration = Duration.newBuilder().build(); + LeaseTasksResponse response = cloudTasksClient.leaseTasks(parent, leaseDuration); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_leasetasks_stringduration_sync] 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 new file mode 100644 index 00000000000..0bd56057101 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueues.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listqueues_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.ListQueuesRequest; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.protobuf.FieldMask; + +public class AsyncListQueues { + + public static void main(String[] args) throws Exception { + asyncListQueues(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.listQueuesPagedCallable().futureCall(request); + // Do something. + for (Queue element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listqueues_async] 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 new file mode 100644 index 00000000000..a7ab7e1ae82 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/AsyncListQueuesPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listqueues_paged_async] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.ListQueuesRequest; +import com.google.cloud.tasks.v2beta2.ListQueuesResponse; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; + +public class AsyncListQueuesPaged { + + public static void main(String[] args) throws Exception { + asyncListQueuesPaged(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + while (true) { + ListQueuesResponse response = cloudTasksClient.listQueuesCallable().call(request); + for (Queue element : response.getQueuesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listqueues_paged_async] 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 new file mode 100644 index 00000000000..1572c738d30 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueues.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listqueues_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.ListQueuesRequest; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.protobuf.FieldMask; + +public class SyncListQueues { + + public static void main(String[] args) throws Exception { + syncListQueues(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + for (Queue element : cloudTasksClient.listQueues(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listqueues_sync] 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 new file mode 100644 index 00000000000..b997ba49cd0 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listqueues_locationname_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; + +public class SyncListQueuesLocationname { + + public static void main(String[] args) throws Exception { + syncListQueuesLocationname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listqueues_locationname_sync] 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 new file mode 100644 index 00000000000..ad6691a34c7 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listqueues/SyncListQueuesString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listqueues_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.LocationName; +import com.google.cloud.tasks.v2beta2.Queue; + +public class SyncListQueuesString { + + public static void main(String[] args) throws Exception { + syncListQueuesString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listqueues_string_sync] 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 new file mode 100644 index 00000000000..894fc4df52a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasks.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listtasks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.ListTasksRequest; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class AsyncListTasks { + + public static void main(String[] args) throws Exception { + asyncListTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = cloudTasksClient.listTasksPagedCallable().futureCall(request); + // Do something. + for (Task element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listtasks_async] 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 new file mode 100644 index 00000000000..b8612e2b754 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/AsyncListTasksPaged.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listtasks_paged_async] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.ListTasksRequest; +import com.google.cloud.tasks.v2beta2.ListTasksResponse; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.common.base.Strings; + +public class AsyncListTasksPaged { + + public static void main(String[] args) throws Exception { + asyncListTasksPaged(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListTasksResponse response = cloudTasksClient.listTasksCallable().call(request); + for (Task element : response.getTasksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listtasks_paged_async] 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 new file mode 100644 index 00000000000..558e80a5559 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasks.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listtasks_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.ListTasksRequest; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class SyncListTasks { + + public static void main(String[] args) throws Exception { + syncListTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Task element : cloudTasksClient.listTasks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listtasks_sync] 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 new file mode 100644 index 00000000000..6877cc75be7 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksQueuename.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listtasks_queuename_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class SyncListTasksQueuename { + + public static void main(String[] args) throws Exception { + syncListTasksQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listtasks_queuename_sync] 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 new file mode 100644 index 00000000000..48d68f826bc --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/listtasks/SyncListTasksString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_listtasks_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.Task; + +public class SyncListTasksString { + + public static void main(String[] args) throws Exception { + syncListTasksString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_listtasks_string_sync] 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 new file mode 100644 index 00000000000..8d0f9560e35 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/AsyncPauseQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_pausequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.PauseQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class AsyncPauseQueue { + + public static void main(String[] args) throws Exception { + asyncPauseQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PauseQueueRequest request = + PauseQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.pauseQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_pausequeue_async] 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 new file mode 100644 index 00000000000..7fa8ca8f474 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_pausequeue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.PauseQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncPauseQueue { + + public static void main(String[] args) throws Exception { + syncPauseQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PauseQueueRequest request = + PauseQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.pauseQueue(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_pausequeue_sync] 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 new file mode 100644 index 00000000000..86f55e8daf6 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_pausequeue_queuename_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncPauseQueueQueuename { + + public static void main(String[] args) throws Exception { + syncPauseQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.pauseQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_pausequeue_queuename_sync] 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 new file mode 100644 index 00000000000..b821a4d609b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/pausequeue/SyncPauseQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_pausequeue_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncPauseQueueString { + + public static void main(String[] args) throws Exception { + syncPauseQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.pauseQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_pausequeue_string_sync] 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 new file mode 100644 index 00000000000..515451a99af --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/AsyncPurgeQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_purgequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.PurgeQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class AsyncPurgeQueue { + + public static void main(String[] args) throws Exception { + asyncPurgeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PurgeQueueRequest request = + PurgeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.purgeQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_purgequeue_async] 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 new file mode 100644 index 00000000000..2a7019c1be8 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_purgequeue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.PurgeQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncPurgeQueue { + + public static void main(String[] args) throws Exception { + syncPurgeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PurgeQueueRequest request = + PurgeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.purgeQueue(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_purgequeue_sync] 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 new file mode 100644 index 00000000000..66b1e90a76e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_purgequeue_queuename_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncPurgeQueueQueuename { + + public static void main(String[] args) throws Exception { + syncPurgeQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.purgeQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_purgequeue_queuename_sync] 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 new file mode 100644 index 00000000000..9f932af0705 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/purgequeue/SyncPurgeQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_purgequeue_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncPurgeQueueString { + + public static void main(String[] args) throws Exception { + syncPurgeQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.purgeQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_purgequeue_string_sync] 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 new file mode 100644 index 00000000000..78690e088db --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/AsyncRenewLease.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_renewlease_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.RenewLeaseRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; + +public class AsyncRenewLease { + + public static void main(String[] args) throws Exception { + asyncRenewLease(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .setScheduleTime(Timestamp.newBuilder().build()) + .setLeaseDuration(Duration.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.renewLeaseCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_renewlease_async] 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 new file mode 100644 index 00000000000..3645572a1c2 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLease.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_renewlease_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.RenewLeaseRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; + +public class SyncRenewLease { + + public static void main(String[] args) throws Exception { + syncRenewLease(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .setScheduleTime(Timestamp.newBuilder().build()) + .setLeaseDuration(Duration.newBuilder().build()) + .build(); + Task response = cloudTasksClient.renewLease(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_renewlease_sync] 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 new file mode 100644 index 00000000000..fcbc0c02d59 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseStringTimestampDuration.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_renewlease_stringtimestampduration_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; + +public class SyncRenewLeaseStringTimestampDuration { + + public static void main(String[] args) throws Exception { + syncRenewLeaseStringTimestampDuration(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + Duration leaseDuration = Duration.newBuilder().build(); + Task response = cloudTasksClient.renewLease(name, scheduleTime, leaseDuration); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_renewlease_stringtimestampduration_sync] 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 new file mode 100644 index 00000000000..9811a9eac90 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/renewlease/SyncRenewLeaseTasknameTimestampDuration.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_renewlease_tasknametimestampduration_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; + +public class SyncRenewLeaseTasknameTimestampDuration { + + public static void main(String[] args) throws Exception { + syncRenewLeaseTasknameTimestampDuration(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + Duration leaseDuration = Duration.newBuilder().build(); + Task response = cloudTasksClient.renewLease(name, scheduleTime, leaseDuration); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_renewlease_tasknametimestampduration_sync] 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 new file mode 100644 index 00000000000..14c6db59d2a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/AsyncResumeQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_resumequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.ResumeQueueRequest; + +public class AsyncResumeQueue { + + public static void main(String[] args) throws Exception { + asyncResumeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResumeQueueRequest request = + ResumeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.resumeQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_resumequeue_async] 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 new file mode 100644 index 00000000000..998644e55ee --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_resumequeue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.ResumeQueueRequest; + +public class SyncResumeQueue { + + public static void main(String[] args) throws Exception { + syncResumeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResumeQueueRequest request = + ResumeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.resumeQueue(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_resumequeue_sync] 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 new file mode 100644 index 00000000000..165e4017501 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_resumequeue_queuename_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncResumeQueueQueuename { + + public static void main(String[] args) throws Exception { + syncResumeQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.resumeQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_resumequeue_queuename_sync] 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 new file mode 100644 index 00000000000..7e00ccec5c8 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/resumequeue/SyncResumeQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_resumequeue_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncResumeQueueString { + + public static void main(String[] args) throws Exception { + syncResumeQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.resumeQueue(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_resumequeue_string_sync] 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 new file mode 100644 index 00000000000..7f31a5b67f7 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/AsyncRunTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_runtask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.RunTaskRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class AsyncRunTask { + + public static void main(String[] args) throws Exception { + asyncRunTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RunTaskRequest request = + RunTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.runTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_runtask_async] 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 new file mode 100644 index 00000000000..df779a691dc --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_runtask_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.RunTaskRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class SyncRunTask { + + public static void main(String[] args) throws Exception { + syncRunTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RunTaskRequest request = + RunTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + Task response = cloudTasksClient.runTask(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_runtask_sync] 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 new file mode 100644 index 00000000000..64f301529cf --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_runtask_string_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class SyncRunTaskString { + + public static void main(String[] args) throws Exception { + syncRunTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Task response = cloudTasksClient.runTask(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_runtask_string_sync] 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 new file mode 100644 index 00000000000..68129a6bb88 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/runtask/SyncRunTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_runtask_taskname_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.TaskName; + +public class SyncRunTaskTaskname { + + public static void main(String[] args) throws Exception { + syncRunTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task response = cloudTasksClient.runTask(name); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_runtask_taskname_sync] 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 new file mode 100644 index 00000000000..fd9321dfd5d --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_setiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_setiampolicy_async] 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 new file mode 100644 index 00000000000..9a844bdd74d --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_setiampolicy_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = cloudTasksClient.setIamPolicy(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_setiampolicy_sync] 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 new file mode 100644 index 00000000000..0fb2c9c1aa8 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_setiampolicy_resourcenamepolicy_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyResourcenamePolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyResourcenamePolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy policy = Policy.newBuilder().build(); + Policy response = cloudTasksClient.setIamPolicy(resource, policy); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_setiampolicy_resourcenamepolicy_sync] 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 new file mode 100644 index 00000000000..76d66482c4e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_setiampolicy_stringpolicy_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyStringPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Policy policy = Policy.newBuilder().build(); + Policy response = cloudTasksClient.setIamPolicy(resource, policy); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_setiampolicy_stringpolicy_sync] 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 new file mode 100644 index 00000000000..fb85bdfc468 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_testiampermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + cloudTasksClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_testiampermissions_async] 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 new file mode 100644 index 00000000000..23e0592eeb6 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_testiampermissions_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = cloudTasksClient.testIamPermissions(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_testiampermissions_sync] 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 new file mode 100644 index 00000000000..a36a8bc6760 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_testiampermissions_resourcenameliststring_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; +import java.util.List; + +public class SyncTestIamPermissionsResourcenameListstring { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsResourcenameListstring(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + List permissions = new ArrayList<>(); + TestIamPermissionsResponse response = + cloudTasksClient.testIamPermissions(resource, permissions); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_testiampermissions_resourcenameliststring_sync] 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 new file mode 100644 index 00000000000..ca23ca6f93b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_testiampermissions_stringliststring_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; +import java.util.List; + +public class SyncTestIamPermissionsStringListstring { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringListstring(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + List permissions = new ArrayList<>(); + TestIamPermissionsResponse response = + cloudTasksClient.testIamPermissions(resource, permissions); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_testiampermissions_stringliststring_sync] 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 new file mode 100644 index 00000000000..55067342ae7 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/AsyncUpdateQueue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_updatequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateQueue { + + public static void main(String[] args) throws Exception { + asyncUpdateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UpdateQueueRequest request = + UpdateQueueRequest.newBuilder() + .setQueue(Queue.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.updateQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_updatequeue_async] 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 new file mode 100644 index 00000000000..efa507ef30a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueue.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_updatequeue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateQueue { + + public static void main(String[] args) throws Exception { + syncUpdateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UpdateQueueRequest request = + UpdateQueueRequest.newBuilder() + .setQueue(Queue.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.updateQueue(request); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_updatequeue_sync] 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 new file mode 100644 index 00000000000..e4c8bd50d3b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtasksclient_updatequeue_queuefieldmask_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.protobuf.FieldMask; + +public class SyncUpdateQueueQueueFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateQueueQueueFieldmask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + Queue queue = Queue.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Queue response = cloudTasksClient.updateQueue(queue, updateMask); + } + } +} +// [END tasks_v2beta2_generated_cloudtasksclient_updatequeue_queuefieldmask_sync] 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 new file mode 100644 index 00000000000..1a243ce7709 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtaskssettings/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.samples; + +// [START tasks_v2beta2_generated_cloudtaskssettings_getqueue_sync] +import com.google.cloud.tasks.v2beta2.CloudTasksSettings; +import java.time.Duration; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + CloudTasksSettings.Builder cloudTasksSettingsBuilder = CloudTasksSettings.newBuilder(); + cloudTasksSettingsBuilder + .getQueueSettings() + .setRetrySettings( + cloudTasksSettingsBuilder + .getQueueSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudTasksSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); + } +} +// [END tasks_v2beta2_generated_cloudtaskssettings_getqueue_sync] 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 new file mode 100644 index 00000000000..4b3c654b207 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta2/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta2.stub.samples; + +// [START tasks_v2beta2_generated_cloudtasksstubsettings_getqueue_sync] +import com.google.cloud.tasks.v2beta2.stub.CloudTasksStubSettings; +import java.time.Duration; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + CloudTasksStubSettings.Builder cloudTasksSettingsBuilder = CloudTasksStubSettings.newBuilder(); + cloudTasksSettingsBuilder + .getQueueSettings() + .setRetrySettings( + cloudTasksSettingsBuilder + .getQueueSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudTasksStubSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); + } +} +// [END tasks_v2beta2_generated_cloudtasksstubsettings_getqueue_sync] 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 new file mode 100644 index 00000000000..312b43831f9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.CloudTasksSettings; +import com.google.cloud.tasks.v2beta3.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_create_setcredentialsprovider_sync] 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 new file mode 100644 index 00000000000..85431e3ec23 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_create_setcredentialsprovider1_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.CloudTasksSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + 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. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder() + .setTransportChannelProvider( + CloudTasksSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_create_setcredentialsprovider1_sync] 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 new file mode 100644 index 00000000000..d434e08df9f --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_create_setendpoint_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.CloudTasksSettings; +import com.google.cloud.tasks.v2beta3.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + CloudTasksSettings cloudTasksSettings = + CloudTasksSettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings); + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_create_setendpoint_sync] 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 new file mode 100644 index 00000000000..ca315705c79 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/AsyncCreateQueue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createqueue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.CreateQueueRequest; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; + +public class AsyncCreateQueue { + + public static void main(String[] args) throws Exception { + asyncCreateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateQueueRequest request = + CreateQueueRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueue(Queue.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.createQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createqueue_async] 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 new file mode 100644 index 00000000000..4d711cebdf1 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueue.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createqueue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.CreateQueueRequest; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; + +public class SyncCreateQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateQueueRequest request = + CreateQueueRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueue(Queue.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.createQueue(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createqueue_sync] 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 new file mode 100644 index 00000000000..47be9793244 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueLocationnameQueue.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createqueue_locationnamequeue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; + +public class SyncCreateQueueLocationnameQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueueLocationnameQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Queue queue = Queue.newBuilder().build(); + Queue response = cloudTasksClient.createQueue(parent, queue); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createqueue_locationnamequeue_sync] 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 new file mode 100644 index 00000000000..0d613bc16ef --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createqueue/SyncCreateQueueStringQueue.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createqueue_stringqueue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; + +public class SyncCreateQueueStringQueue { + + public static void main(String[] args) throws Exception { + syncCreateQueueStringQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Queue queue = Queue.newBuilder().build(); + Queue response = cloudTasksClient.createQueue(parent, queue); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createqueue_stringqueue_sync] 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 new file mode 100644 index 00000000000..6305ba81d13 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/AsyncCreateTask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createtask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.CreateTaskRequest; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class AsyncCreateTask { + + public static void main(String[] args) throws Exception { + asyncCreateTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTask(Task.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.createTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createtask_async] 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 new file mode 100644 index 00000000000..9e6e187ad31 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createtask_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.CreateTaskRequest; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class SyncCreateTask { + + public static void main(String[] args) throws Exception { + syncCreateTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTask(Task.newBuilder().build()) + .build(); + Task response = cloudTasksClient.createTask(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createtask_sync] 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 new file mode 100644 index 00000000000..bed8b9319b9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskQueuenameTask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createtask_queuenametask_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class SyncCreateTaskQueuenameTask { + + public static void main(String[] args) throws Exception { + syncCreateTaskQueuenameTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Task task = Task.newBuilder().build(); + Task response = cloudTasksClient.createTask(parent, task); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createtask_queuenametask_sync] 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 new file mode 100644 index 00000000000..b61f91aadf6 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/createtask/SyncCreateTaskStringTask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_createtask_stringtask_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class SyncCreateTaskStringTask { + + public static void main(String[] args) throws Exception { + syncCreateTaskStringTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Task task = Task.newBuilder().build(); + Task response = cloudTasksClient.createTask(parent, task); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_createtask_stringtask_sync] 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 new file mode 100644 index 00000000000..4f774533db9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/AsyncDeleteQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.DeleteQueueRequest; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.protobuf.Empty; + +public class AsyncDeleteQueue { + + public static void main(String[] args) throws Exception { + asyncDeleteQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteQueueRequest request = + DeleteQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.deleteQueueCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletequeue_async] 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 new file mode 100644 index 00000000000..335fd8b93ff --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletequeue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.DeleteQueueRequest; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueue { + + public static void main(String[] args) throws Exception { + syncDeleteQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteQueueRequest request = + DeleteQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + cloudTasksClient.deleteQueue(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletequeue_sync] 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 new file mode 100644 index 00000000000..b03ca7bd9a0 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletequeue_queuename_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueueQueuename { + + public static void main(String[] args) throws Exception { + syncDeleteQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + cloudTasksClient.deleteQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletequeue_queuename_sync] 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 new file mode 100644 index 00000000000..a67c1cd70a2 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletequeue/SyncDeleteQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletequeue_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.protobuf.Empty; + +public class SyncDeleteQueueString { + + public static void main(String[] args) throws Exception { + syncDeleteQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + cloudTasksClient.deleteQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletequeue_string_sync] 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 new file mode 100644 index 00000000000..4c3d45d837e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/AsyncDeleteTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletetask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.DeleteTaskRequest; +import com.google.cloud.tasks.v2beta3.TaskName; +import com.google.protobuf.Empty; + +public class AsyncDeleteTask { + + public static void main(String[] args) throws Exception { + asyncDeleteTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteTaskRequest request = + DeleteTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.deleteTaskCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletetask_async] 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 new file mode 100644 index 00000000000..db5646ff728 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletetask_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.DeleteTaskRequest; +import com.google.cloud.tasks.v2beta3.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTask { + + public static void main(String[] args) throws Exception { + syncDeleteTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + DeleteTaskRequest request = + DeleteTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + cloudTasksClient.deleteTask(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletetask_sync] 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 new file mode 100644 index 00000000000..00c42019e49 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletetask_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTaskString { + + public static void main(String[] args) throws Exception { + syncDeleteTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + cloudTasksClient.deleteTask(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletetask_string_sync] 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 new file mode 100644 index 00000000000..1c7f5c7f5de --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/deletetask/SyncDeleteTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_deletetask_taskname_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.TaskName; +import com.google.protobuf.Empty; + +public class SyncDeleteTaskTaskname { + + public static void main(String[] args) throws Exception { + syncDeleteTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + cloudTasksClient.deleteTask(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_deletetask_taskname_sync] 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 new file mode 100644 index 00000000000..049d109ab41 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getiampolicy_async] 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 new file mode 100644 index 00000000000..3b6c93d6402 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getiampolicy_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = cloudTasksClient.getIamPolicy(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getiampolicy_sync] 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 new file mode 100644 index 00000000000..703b836fa8b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyResourcename.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getiampolicy_resourcename_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyResourcename { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyResourcename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy response = cloudTasksClient.getIamPolicy(resource); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getiampolicy_resourcename_sync] 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 new file mode 100644 index 00000000000..598be27c4d0 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getiampolicy/SyncGetIamPolicyString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getiampolicy_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Policy response = cloudTasksClient.getIamPolicy(resource); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getiampolicy_string_sync] 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 new file mode 100644 index 00000000000..beb5a0a3f81 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/AsyncGetQueue.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getqueue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.GetQueueRequest; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.protobuf.FieldMask; + +public class AsyncGetQueue { + + public static void main(String[] args) throws Exception { + asyncGetQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetQueueRequest request = + GetQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setReadMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.getQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getqueue_async] 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 new file mode 100644 index 00000000000..b7c62e66a84 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getqueue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.GetQueueRequest; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.protobuf.FieldMask; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetQueueRequest request = + GetQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setReadMask(FieldMask.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.getQueue(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getqueue_sync] 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 new file mode 100644 index 00000000000..bbae5407bf4 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getqueue_queuename_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncGetQueueQueuename { + + public static void main(String[] args) throws Exception { + syncGetQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.getQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getqueue_queuename_sync] 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 new file mode 100644 index 00000000000..c5df8b177c9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/getqueue/SyncGetQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_getqueue_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncGetQueueString { + + public static void main(String[] args) throws Exception { + syncGetQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.getQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_getqueue_string_sync] 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 new file mode 100644 index 00000000000..b3ed26bec4c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/AsyncGetTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_gettask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.GetTaskRequest; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class AsyncGetTask { + + public static void main(String[] args) throws Exception { + asyncGetTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.getTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_gettask_async] 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 new file mode 100644 index 00000000000..836db60d8d1 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_gettask_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.GetTaskRequest; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class SyncGetTask { + + public static void main(String[] args) throws Exception { + syncGetTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + Task response = cloudTasksClient.getTask(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_gettask_sync] 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 new file mode 100644 index 00000000000..930c44197ef --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_gettask_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class SyncGetTaskString { + + public static void main(String[] args) throws Exception { + syncGetTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Task response = cloudTasksClient.getTask(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_gettask_string_sync] 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 new file mode 100644 index 00000000000..868eefab88e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/gettask/SyncGetTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_gettask_taskname_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class SyncGetTaskTaskname { + + public static void main(String[] args) throws Exception { + syncGetTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task response = cloudTasksClient.getTask(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_gettask_taskname_sync] 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 new file mode 100644 index 00000000000..5ea1bbde283 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueues.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listqueues_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.ListQueuesRequest; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.protobuf.FieldMask; + +public class AsyncListQueues { + + public static void main(String[] args) throws Exception { + asyncListQueues(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.listQueuesPagedCallable().futureCall(request); + // Do something. + for (Queue element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listqueues_async] 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 new file mode 100644 index 00000000000..d679ca1897c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/AsyncListQueuesPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listqueues_paged_async] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.ListQueuesRequest; +import com.google.cloud.tasks.v2beta3.ListQueuesResponse; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; + +public class AsyncListQueuesPaged { + + public static void main(String[] args) throws Exception { + asyncListQueuesPaged(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + while (true) { + ListQueuesResponse response = cloudTasksClient.listQueuesCallable().call(request); + for (Queue element : response.getQueuesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listqueues_paged_async] 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 new file mode 100644 index 00000000000..d7c5a7d8c31 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueues.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listqueues_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.ListQueuesRequest; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.protobuf.FieldMask; + +public class SyncListQueues { + + public static void main(String[] args) throws Exception { + syncListQueues(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + for (Queue element : cloudTasksClient.listQueues(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listqueues_sync] 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 new file mode 100644 index 00000000000..9f129089e33 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listqueues_locationname_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; + +public class SyncListQueuesLocationname { + + public static void main(String[] args) throws Exception { + syncListQueuesLocationname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listqueues_locationname_sync] 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 new file mode 100644 index 00000000000..60309c64e30 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listqueues/SyncListQueuesString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listqueues_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.LocationName; +import com.google.cloud.tasks.v2beta3.Queue; + +public class SyncListQueuesString { + + public static void main(String[] args) throws Exception { + syncListQueuesString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listqueues_string_sync] 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 new file mode 100644 index 00000000000..c19f0208457 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasks.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listtasks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.ListTasksRequest; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class AsyncListTasks { + + public static void main(String[] args) throws Exception { + asyncListTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = cloudTasksClient.listTasksPagedCallable().futureCall(request); + // Do something. + for (Task element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listtasks_async] 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 new file mode 100644 index 00000000000..17711db6d57 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/AsyncListTasksPaged.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listtasks_paged_async] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.ListTasksRequest; +import com.google.cloud.tasks.v2beta3.ListTasksResponse; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.common.base.Strings; + +public class AsyncListTasksPaged { + + public static void main(String[] args) throws Exception { + asyncListTasksPaged(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListTasksResponse response = cloudTasksClient.listTasksCallable().call(request); + for (Task element : response.getTasksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listtasks_paged_async] 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 new file mode 100644 index 00000000000..046d9477aa9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasks.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listtasks_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.ListTasksRequest; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class SyncListTasks { + + public static void main(String[] args) throws Exception { + syncListTasks(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Task element : cloudTasksClient.listTasks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listtasks_sync] 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 new file mode 100644 index 00000000000..f67e5d81105 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksQueuename.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listtasks_queuename_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class SyncListTasksQueuename { + + public static void main(String[] args) throws Exception { + syncListTasksQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listtasks_queuename_sync] 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 new file mode 100644 index 00000000000..e8fcd18a288 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/listtasks/SyncListTasksString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_listtasks_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.Task; + +public class SyncListTasksString { + + public static void main(String[] args) throws Exception { + syncListTasksString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_listtasks_string_sync] 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 new file mode 100644 index 00000000000..761b5166016 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/AsyncPauseQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_pausequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.PauseQueueRequest; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class AsyncPauseQueue { + + public static void main(String[] args) throws Exception { + asyncPauseQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PauseQueueRequest request = + PauseQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.pauseQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_pausequeue_async] 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 new file mode 100644 index 00000000000..933945740d3 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_pausequeue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.PauseQueueRequest; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncPauseQueue { + + public static void main(String[] args) throws Exception { + syncPauseQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PauseQueueRequest request = + PauseQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.pauseQueue(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_pausequeue_sync] 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 new file mode 100644 index 00000000000..ed9e59e22b2 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_pausequeue_queuename_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncPauseQueueQueuename { + + public static void main(String[] args) throws Exception { + syncPauseQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.pauseQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_pausequeue_queuename_sync] 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 new file mode 100644 index 00000000000..25a0cc0ab5b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/pausequeue/SyncPauseQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_pausequeue_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncPauseQueueString { + + public static void main(String[] args) throws Exception { + syncPauseQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.pauseQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_pausequeue_string_sync] 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 new file mode 100644 index 00000000000..b7d0108d554 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/AsyncPurgeQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_purgequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.PurgeQueueRequest; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class AsyncPurgeQueue { + + public static void main(String[] args) throws Exception { + asyncPurgeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PurgeQueueRequest request = + PurgeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.purgeQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_purgequeue_async] 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 new file mode 100644 index 00000000000..f555c736c2c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_purgequeue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.PurgeQueueRequest; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncPurgeQueue { + + public static void main(String[] args) throws Exception { + syncPurgeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + PurgeQueueRequest request = + PurgeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.purgeQueue(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_purgequeue_sync] 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 new file mode 100644 index 00000000000..9a6f7d07dde --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_purgequeue_queuename_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncPurgeQueueQueuename { + + public static void main(String[] args) throws Exception { + syncPurgeQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.purgeQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_purgequeue_queuename_sync] 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 new file mode 100644 index 00000000000..ba833f52b46 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/purgequeue/SyncPurgeQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_purgequeue_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncPurgeQueueString { + + public static void main(String[] args) throws Exception { + syncPurgeQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.purgeQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_purgequeue_string_sync] 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 new file mode 100644 index 00000000000..8a522847b64 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/AsyncResumeQueue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_resumequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.ResumeQueueRequest; + +public class AsyncResumeQueue { + + public static void main(String[] args) throws Exception { + asyncResumeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResumeQueueRequest request = + ResumeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + ApiFuture future = cloudTasksClient.resumeQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_resumequeue_async] 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 new file mode 100644 index 00000000000..50348c4678c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueue.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_resumequeue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.cloud.tasks.v2beta3.ResumeQueueRequest; + +public class SyncResumeQueue { + + public static void main(String[] args) throws Exception { + syncResumeQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResumeQueueRequest request = + ResumeQueueRequest.newBuilder() + .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .build(); + Queue response = cloudTasksClient.resumeQueue(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_resumequeue_sync] 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 new file mode 100644 index 00000000000..df75ed997f1 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueQueuename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_resumequeue_queuename_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncResumeQueueQueuename { + + public static void main(String[] args) throws Exception { + syncResumeQueueQueuename(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue response = cloudTasksClient.resumeQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_resumequeue_queuename_sync] 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 new file mode 100644 index 00000000000..bdfb0c0102c --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/resumequeue/SyncResumeQueueString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_resumequeue_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncResumeQueueString { + + public static void main(String[] args) throws Exception { + syncResumeQueueString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Queue response = cloudTasksClient.resumeQueue(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_resumequeue_string_sync] 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 new file mode 100644 index 00000000000..8a392118150 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/AsyncRunTask.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_runtask_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.RunTaskRequest; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class AsyncRunTask { + + public static void main(String[] args) throws Exception { + asyncRunTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RunTaskRequest request = + RunTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + ApiFuture future = cloudTasksClient.runTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_runtask_async] 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 new file mode 100644 index 00000000000..8b73a70b883 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_runtask_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.RunTaskRequest; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class SyncRunTask { + + public static void main(String[] args) throws Exception { + syncRunTask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + RunTaskRequest request = + RunTaskRequest.newBuilder() + .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString()) + .build(); + Task response = cloudTasksClient.runTask(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_runtask_sync] 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 new file mode 100644 index 00000000000..d5da488b6f7 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_runtask_string_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class SyncRunTaskString { + + public static void main(String[] args) throws Exception { + syncRunTaskString(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString(); + Task response = cloudTasksClient.runTask(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_runtask_string_sync] 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 new file mode 100644 index 00000000000..edd2d333c92 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/runtask/SyncRunTaskTaskname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_runtask_taskname_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Task; +import com.google.cloud.tasks.v2beta3.TaskName; + +public class SyncRunTaskTaskname { + + public static void main(String[] args) throws Exception { + syncRunTaskTaskname(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task response = cloudTasksClient.runTask(name); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_runtask_taskname_sync] 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 new file mode 100644 index 00000000000..f1e7cd6e1f7 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_setiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_setiampolicy_async] 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 new file mode 100644 index 00000000000..33d53f0f55a --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_setiampolicy_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = cloudTasksClient.setIamPolicy(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_setiampolicy_sync] 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 new file mode 100644 index 00000000000..1b0b0d9256b --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_setiampolicy_resourcenamepolicy_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyResourcenamePolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyResourcenamePolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy policy = Policy.newBuilder().build(); + Policy response = cloudTasksClient.setIamPolicy(resource, policy); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_setiampolicy_resourcenamepolicy_sync] 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 new file mode 100644 index 00000000000..2cbfddff667 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_setiampolicy_stringpolicy_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyStringPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringPolicy(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + Policy policy = Policy.newBuilder().build(); + Policy response = cloudTasksClient.setIamPolicy(resource, policy); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_setiampolicy_stringpolicy_sync] 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 new file mode 100644 index 00000000000..4bece0a9597 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_testiampermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + cloudTasksClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_testiampermissions_async] 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 new file mode 100644 index 00000000000..9b6ec43196e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_testiampermissions_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = cloudTasksClient.testIamPermissions(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_testiampermissions_sync] 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 new file mode 100644 index 00000000000..b92bcce75b9 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsResourcenameListstring.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_testiampermissions_resourcenameliststring_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; +import java.util.List; + +public class SyncTestIamPermissionsResourcenameListstring { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsResourcenameListstring(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + List permissions = new ArrayList<>(); + TestIamPermissionsResponse response = + cloudTasksClient.testIamPermissions(resource, permissions); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_testiampermissions_resourcenameliststring_sync] 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 new file mode 100644 index 00000000000..b144ff3b51e --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/testiampermissions/SyncTestIamPermissionsStringListstring.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_testiampermissions_stringliststring_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; +import java.util.List; + +public class SyncTestIamPermissionsStringListstring { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringListstring(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + List permissions = new ArrayList<>(); + TestIamPermissionsResponse response = + cloudTasksClient.testIamPermissions(resource, permissions); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_testiampermissions_stringliststring_sync] 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 new file mode 100644 index 00000000000..310ec8a0df6 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/AsyncUpdateQueue.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_updatequeue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.UpdateQueueRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateQueue { + + public static void main(String[] args) throws Exception { + asyncUpdateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UpdateQueueRequest request = + UpdateQueueRequest.newBuilder() + .setQueue(Queue.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.updateQueueCallable().futureCall(request); + // Do something. + Queue response = future.get(); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_updatequeue_async] 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 new file mode 100644 index 00000000000..b9b4415cfb4 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueue.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_updatequeue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.cloud.tasks.v2beta3.UpdateQueueRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateQueue { + + public static void main(String[] args) throws Exception { + syncUpdateQueue(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UpdateQueueRequest request = + UpdateQueueRequest.newBuilder() + .setQueue(Queue.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Queue response = cloudTasksClient.updateQueue(request); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_updatequeue_sync] 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 new file mode 100644 index 00000000000..077ea6dc690 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasksclient/updatequeue/SyncUpdateQueueQueueFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtasksclient_updatequeue_queuefieldmask_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.Queue; +import com.google.protobuf.FieldMask; + +public class SyncUpdateQueueQueueFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateQueueQueueFieldmask(); + } + + 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. + try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + Queue queue = Queue.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Queue response = cloudTasksClient.updateQueue(queue, updateMask); + } + } +} +// [END tasks_v2beta3_generated_cloudtasksclient_updatequeue_queuefieldmask_sync] 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 new file mode 100644 index 00000000000..3475de29677 --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtaskssettings/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.samples; + +// [START tasks_v2beta3_generated_cloudtaskssettings_getqueue_sync] +import com.google.cloud.tasks.v2beta3.CloudTasksSettings; +import java.time.Duration; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + CloudTasksSettings.Builder cloudTasksSettingsBuilder = CloudTasksSettings.newBuilder(); + cloudTasksSettingsBuilder + .getQueueSettings() + .setRetrySettings( + cloudTasksSettingsBuilder + .getQueueSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudTasksSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); + } +} +// [END tasks_v2beta3_generated_cloudtaskssettings_getqueue_sync] 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 new file mode 100644 index 00000000000..60609678b5d --- /dev/null +++ b/tasks/snippets/generated/com/google/cloud/tasks/v2beta3/stub/cloudtasksstubsettings/getqueue/SyncGetQueue.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tasks.v2beta3.stub.samples; + +// [START tasks_v2beta3_generated_cloudtasksstubsettings_getqueue_sync] +import com.google.cloud.tasks.v2beta3.stub.CloudTasksStubSettings; +import java.time.Duration; + +public class SyncGetQueue { + + public static void main(String[] args) throws Exception { + syncGetQueue(); + } + + 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. + CloudTasksStubSettings.Builder cloudTasksSettingsBuilder = CloudTasksStubSettings.newBuilder(); + cloudTasksSettingsBuilder + .getQueueSettings() + .setRetrySettings( + cloudTasksSettingsBuilder + .getQueueSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudTasksStubSettings cloudTasksSettings = cloudTasksSettingsBuilder.build(); + } +} +// [END tasks_v2beta3_generated_cloudtasksstubsettings_getqueue_sync] From 2a9d22bdedaa64e8f1def818fba725744e53bcce Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 31 Aug 2022 22:44:18 +0200 Subject: [PATCH 117/123] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#744) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 484f157dcab..ea0b8f55ccc 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 3889124be0d..be1eb61e33a 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import 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 118/123] 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(); From e3a7dda6cc37373fa6da986b82285745284e58ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 17:28:39 +0200 Subject: [PATCH 119/123] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.2 (#755) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index ea0b8f55ccc..1fb97615271 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.1.1 + 26.1.2 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index be1eb61e33a..7fb3bff1e4d 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.1 + 26.1.2 pom import From f4e7623f320e63c08eb062e1f60f9540847453b3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Sep 2022 16:20:32 +0200 Subject: [PATCH 120/123] deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 (#756) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.junit.vintage:junit-vintage-engine](https://junit.org/junit5/) ([source](https://togithub.com/junit-team/junit5)) | `5.9.0` -> `5.9.1` | [![age](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/compatibility-slim/5.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/confidence-slim/5.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index 1fb97615271..ec2ce70ebeb 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -83,7 +83,7 @@ org.junit.vintage junit-vintage-engine - 5.9.0 + 5.9.1 org.graalvm.buildtools From 2b0a7214488f24416d8770072e1c38b09b38b980 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Sep 2022 18:04:20 +0200 Subject: [PATCH 121/123] deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.14 (#761) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.13` -> `0.9.14` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/compatibility-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/confidence-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index ec2ce70ebeb..bd496e7472a 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -108,7 +108,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.13 + 0.9.14 true com.example.tasks.TasksSampleApplication From 1a6d58d624416f6b789668fa475db20958a9718c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Sep 2022 18:08:18 +0200 Subject: [PATCH 122/123] deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.14 (#760) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:junit-platform-native](https://togithub.com/graalvm/native-build-tools) | `0.9.13` -> `0.9.14` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/compatibility-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/confidence-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index bd496e7472a..afc7ddc5736 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -88,7 +88,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.13 + 0.9.14 test From 6d3dd6ddaa7235891efc40fe98243d85ec5a5712 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 7 Oct 2022 20:06:19 +0200 Subject: [PATCH 123/123] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.3 (#800) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-tasks). --- tasks/native-image-sample/pom.xml | 2 +- tasks/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/native-image-sample/pom.xml b/tasks/native-image-sample/pom.xml index afc7ddc5736..ad8b1e2c06b 100644 --- a/tasks/native-image-sample/pom.xml +++ b/tasks/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.1.2 + 26.1.3 pom import diff --git a/tasks/snippets/pom.xml b/tasks/snippets/pom.xml index 7fb3bff1e4d..a8bf8633780 100644 --- a/tasks/snippets/pom.xml +++ b/tasks/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.2 + 26.1.3 pom import