From f857175540627347e7c3f0b9869caf9038af1d2b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 4 Nov 2022 00:39:37 -0400 Subject: [PATCH] feat: [run] Adds Cloud Run Jobs v2 API client libraries (#8723) --- .../google/cloud/run/v2/ExecutionsClient.java | 737 ++ .../cloud/run/v2/ExecutionsSettings.java | 241 + .../com/google/cloud/run/v2/JobsClient.java | 1317 +++ .../com/google/cloud/run/v2/JobsSettings.java | 335 + .../google/cloud/run/v2/RevisionsClient.java | 20 +- .../google/cloud/run/v2/ServicesClient.java | 24 +- .../com/google/cloud/run/v2/TasksClient.java | 550 ++ .../google/cloud/run/v2/TasksSettings.java | 215 + .../google/cloud/run/v2/gapic_metadata.json | 69 + .../com/google/cloud/run/v2/package-info.java | 54 + .../cloud/run/v2/stub/ExecutionsStub.java | 74 + .../run/v2/stub/ExecutionsStubSettings.java | 477 ++ .../stub/GrpcExecutionsCallableFactory.java | 113 + .../cloud/run/v2/stub/GrpcExecutionsStub.java | 251 + .../run/v2/stub/GrpcJobsCallableFactory.java | 113 + .../cloud/run/v2/stub/GrpcJobsStub.java | 452 + .../run/v2/stub/GrpcTasksCallableFactory.java | 113 + .../cloud/run/v2/stub/GrpcTasksStub.java | 196 + .../HttpJsonExecutionsCallableFactory.java | 105 + .../run/v2/stub/HttpJsonExecutionsStub.java | 340 + .../v2/stub/HttpJsonJobsCallableFactory.java | 105 + .../cloud/run/v2/stub/HttpJsonJobsStub.java | 689 ++ .../v2/stub/HttpJsonTasksCallableFactory.java | 105 + .../cloud/run/v2/stub/HttpJsonTasksStub.java | 252 + .../google/cloud/run/v2/stub/JobsStub.java | 118 + .../cloud/run/v2/stub/JobsStubSettings.java | 732 ++ .../google/cloud/run/v2/stub/TasksStub.java | 52 + .../cloud/run/v2/stub/TasksStubSettings.java | 396 + .../run/v2/ExecutionsClientHttpJsonTest.java | 461 + .../cloud/run/v2/ExecutionsClientTest.java | 435 + .../cloud/run/v2/JobsClientHttpJsonTest.java | 1042 +++ .../google/cloud/run/v2/JobsClientTest.java | 944 +++ .../google/cloud/run/v2/MockExecutions.java | 59 + .../cloud/run/v2/MockExecutionsImpl.java | 124 + .../com/google/cloud/run/v2/MockJobs.java | 59 + .../com/google/cloud/run/v2/MockJobsImpl.java | 248 + .../com/google/cloud/run/v2/MockTasks.java | 59 + .../google/cloud/run/v2/MockTasksImpl.java | 101 + .../cloud/run/v2/TasksClientHttpJsonTest.java | 330 + .../google/cloud/run/v2/TasksClientTest.java | 308 + .../google/cloud/run/v2/ExecutionsGrpc.java | 578 ++ .../com/google/cloud/run/v2/JobsGrpc.java | 1210 +++ .../google/cloud/run/v2/RevisionsGrpc.java | 16 +- .../com/google/cloud/run/v2/ServicesGrpc.java | 16 +- .../com/google/cloud/run/v2/TasksGrpc.java | 448 + .../google/cloud/run/v2/CreateJobRequest.java | 1171 +++ .../run/v2/CreateJobRequestOrBuilder.java | 132 + .../cloud/run/v2/CreateServiceRequest.java | 14 +- .../run/v2/CreateServiceRequestOrBuilder.java | 4 +- .../cloud/run/v2/DeleteExecutionRequest.java | 922 ++ .../v2/DeleteExecutionRequestOrBuilder.java | 99 + .../google/cloud/run/v2/DeleteJobRequest.java | 914 ++ .../run/v2/DeleteJobRequestOrBuilder.java | 97 + .../com/google/cloud/run/v2/Execution.java | 5516 ++++++++++++ .../google/cloud/run/v2/ExecutionName.java | 257 + .../cloud/run/v2/ExecutionOrBuilder.java | 809 ++ .../google/cloud/run/v2/ExecutionProto.java | 252 + .../cloud/run/v2/ExecutionReference.java | 1146 +++ .../run/v2/ExecutionReferenceOrBuilder.java | 120 + .../cloud/run/v2/ExecutionTemplate.java | 1568 ++++ .../run/v2/ExecutionTemplateOrBuilder.java | 217 + .../cloud/run/v2/ExecutionTemplateProto.java | 109 + .../cloud/run/v2/GetExecutionRequest.java | 642 ++ .../run/v2/GetExecutionRequestOrBuilder.java | 58 + .../google/cloud/run/v2/GetJobRequest.java | 633 ++ .../cloud/run/v2/GetJobRequestOrBuilder.java | 56 + .../google/cloud/run/v2/GetTaskRequest.java | 641 ++ .../cloud/run/v2/GetTaskRequestOrBuilder.java | 58 + .../java/com/google/cloud/run/v2/Job.java | 5995 +++++++++++++ .../java/com/google/cloud/run/v2/JobName.java | 216 + .../com/google/cloud/run/v2/JobOrBuilder.java | 890 ++ .../com/google/cloud/run/v2/JobProto.java | 341 + .../cloud/run/v2/ListExecutionsRequest.java | 1009 +++ .../v2/ListExecutionsRequestOrBuilder.java | 111 + .../cloud/run/v2/ListExecutionsResponse.java | 1109 +++ .../v2/ListExecutionsResponseOrBuilder.java | 103 + .../google/cloud/run/v2/ListJobsRequest.java | 1001 +++ .../run/v2/ListJobsRequestOrBuilder.java | 109 + .../google/cloud/run/v2/ListJobsResponse.java | 1100 +++ .../run/v2/ListJobsResponseOrBuilder.java | 103 + .../google/cloud/run/v2/ListTasksRequest.java | 1015 +++ .../run/v2/ListTasksRequestOrBuilder.java | 113 + .../cloud/run/v2/ListTasksResponse.java | 1101 +++ .../run/v2/ListTasksResponseOrBuilder.java | 103 + .../google/cloud/run/v2/RunJobRequest.java | 913 ++ .../cloud/run/v2/RunJobRequestOrBuilder.java | 97 + .../java/com/google/cloud/run/v2/Task.java | 7417 +++++++++++++++++ .../cloud/run/v2/TaskAttemptResult.java | 803 ++ .../run/v2/TaskAttemptResultOrBuilder.java | 79 + .../com/google/cloud/run/v2/TaskName.java | 289 + .../google/cloud/run/v2/TaskOrBuilder.java | 1046 +++ .../com/google/cloud/run/v2/TaskProto.java | 258 + .../com/google/cloud/run/v2/TaskTemplate.java | 2741 ++++++ .../cloud/run/v2/TaskTemplateOrBuilder.java | 323 + .../cloud/run/v2/TaskTemplateProto.java | 99 + .../google/cloud/run/v2/UpdateJobRequest.java | 885 ++ .../run/v2/UpdateJobRequestOrBuilder.java | 89 + .../proto/google/cloud/run/v2/execution.proto | 259 + .../cloud/run/v2/execution_template.proto | 54 + .../main/proto/google/cloud/run/v2/job.proto | 400 + .../proto/google/cloud/run/v2/revision.proto | 16 +- .../cloud/run/v2/revision_template.proto | 10 +- .../proto/google/cloud/run/v2/service.proto | 18 +- .../main/proto/google/cloud/run/v2/task.proto | 256 + .../google/cloud/run/v2/task_template.proto | 68 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../create/SyncCreateSetEndpoint.java | 41 + .../deleteexecution/AsyncDeleteExecution.java | 52 + .../AsyncDeleteExecutionLRO.java | 53 + .../deleteexecution/SyncDeleteExecution.java | 49 + .../SyncDeleteExecutionExecutionname.java | 42 + .../SyncDeleteExecutionString.java | 42 + .../getexecution/AsyncGetExecution.java | 50 + .../getexecution/SyncGetExecution.java | 47 + .../SyncGetExecutionExecutionname.java | 42 + .../getexecution/SyncGetExecutionString.java | 42 + .../listexecutions/AsyncListExecutions.java | 55 + .../AsyncListExecutionsPaged.java | 62 + .../listexecutions/SyncListExecutions.java | 51 + .../SyncListExecutionsJobname.java | 44 + .../SyncListExecutionsString.java | 44 + .../getexecution/SyncGetExecution.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../v2/jobs/create/SyncCreateSetEndpoint.java | 40 + .../run/v2/jobs/createjob/AsyncCreateJob.java | 53 + .../v2/jobs/createjob/AsyncCreateJobLRO.java | 53 + .../run/v2/jobs/createjob/SyncCreateJob.java | 49 + .../SyncCreateJobLocationnameJobString.java | 44 + .../SyncCreateJobStringJobString.java | 44 + .../run/v2/jobs/deletejob/AsyncDeleteJob.java | 51 + .../v2/jobs/deletejob/AsyncDeleteJobLRO.java | 52 + .../run/v2/jobs/deletejob/SyncDeleteJob.java | 48 + .../jobs/deletejob/SyncDeleteJobJobname.java | 42 + .../jobs/deletejob/SyncDeleteJobString.java | 42 + .../jobs/getiampolicy/AsyncGetIamPolicy.java | 51 + .../jobs/getiampolicy/SyncGetIamPolicy.java | 48 + .../cloud/run/v2/jobs/getjob/AsyncGetJob.java | 49 + .../cloud/run/v2/jobs/getjob/SyncGetJob.java | 46 + .../run/v2/jobs/getjob/SyncGetJobJobname.java | 42 + .../run/v2/jobs/getjob/SyncGetJobString.java | 42 + .../run/v2/jobs/listjobs/AsyncListJobs.java | 54 + .../v2/jobs/listjobs/AsyncListJobsPaged.java | 62 + .../run/v2/jobs/listjobs/SyncListJobs.java | 51 + .../listjobs/SyncListJobsLocationname.java | 44 + .../v2/jobs/listjobs/SyncListJobsString.java | 44 + .../cloud/run/v2/jobs/runjob/AsyncRunJob.java | 51 + .../run/v2/jobs/runjob/AsyncRunJobLRO.java | 52 + .../cloud/run/v2/jobs/runjob/SyncRunJob.java | 48 + .../run/v2/jobs/runjob/SyncRunJobJobname.java | 42 + .../run/v2/jobs/runjob/SyncRunJobString.java | 42 + .../jobs/setiampolicy/AsyncSetIamPolicy.java | 52 + .../jobs/setiampolicy/SyncSetIamPolicy.java | 49 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + .../run/v2/jobs/updatejob/AsyncUpdateJob.java | 51 + .../v2/jobs/updatejob/AsyncUpdateJobLRO.java | 51 + .../run/v2/jobs/updatejob/SyncUpdateJob.java | 47 + .../v2/jobs/updatejob/SyncUpdateJobJob.java | 41 + .../v2/jobssettings/getjob/SyncGetJob.java | 45 + .../getexecution/SyncGetExecution.java | 45 + .../jobsstubsettings/getjob/SyncGetJob.java | 45 + .../gettask/SyncGetTask.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../tasks/create/SyncCreateSetEndpoint.java | 40 + .../run/v2/tasks/gettask/AsyncGetTask.java | 51 + .../run/v2/tasks/gettask/SyncGetTask.java | 48 + .../v2/tasks/gettask/SyncGetTaskString.java | 43 + .../v2/tasks/gettask/SyncGetTaskTaskname.java | 42 + .../v2/tasks/listtasks/AsyncListTasks.java | 55 + .../tasks/listtasks/AsyncListTasksPaged.java | 63 + .../run/v2/tasks/listtasks/SyncListTasks.java | 52 + .../listtasks/SyncListTasksExecutionname.java | 44 + .../tasks/listtasks/SyncListTasksString.java | 45 + .../v2/taskssettings/gettask/SyncGetTask.java | 45 + 177 files changed, 63984 insertions(+), 68 deletions(-) create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsSettings.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/JobsClient.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/JobsSettings.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksSettings.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStubSettings.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcExecutionsCallableFactory.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcExecutionsStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcJobsCallableFactory.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcJobsStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcTasksCallableFactory.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/GrpcTasksStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonExecutionsCallableFactory.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonExecutionsStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonJobsCallableFactory.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonJobsStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonTasksCallableFactory.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/HttpJsonTasksStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/JobsStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/JobsStubSettings.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/TasksStub.java create mode 100644 java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/TasksStubSettings.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ExecutionsClientHttpJsonTest.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ExecutionsClientTest.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/JobsClientHttpJsonTest.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/JobsClientTest.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockExecutions.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockExecutionsImpl.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockJobs.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockJobsImpl.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockTasks.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockTasksImpl.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/TasksClientHttpJsonTest.java create mode 100644 java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/TasksClientTest.java create mode 100644 java-run/grpc-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionsGrpc.java create mode 100644 java-run/grpc-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/JobsGrpc.java create mode 100644 java-run/grpc-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TasksGrpc.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateJobRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/CreateJobRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteExecutionRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteExecutionRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteJobRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/DeleteJobRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Execution.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionName.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionProto.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionReference.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionReferenceOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionTemplate.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionTemplateOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ExecutionTemplateProto.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetExecutionRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetExecutionRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetJobRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetJobRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetTaskRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/GetTaskRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Job.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/JobName.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/JobOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/JobProto.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListExecutionsRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListExecutionsRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListExecutionsResponse.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListExecutionsResponseOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListJobsRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListJobsRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListJobsResponse.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListJobsResponseOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListTasksRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListTasksRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListTasksResponse.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/ListTasksResponseOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/RunJobRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/RunJobRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/Task.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskAttemptResult.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskAttemptResultOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskName.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskProto.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskTemplate.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskTemplateOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/TaskTemplateProto.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/UpdateJobRequest.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/java/com/google/cloud/run/v2/UpdateJobRequestOrBuilder.java create mode 100644 java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/execution.proto create mode 100644 java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/execution_template.proto create mode 100644 java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/job.proto create mode 100644 java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/task.proto create mode 100644 java-run/proto-google-cloud-run-v2/src/main/proto/google/cloud/run/v2/task_template.proto create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/create/SyncCreateSetEndpoint.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/deleteexecution/AsyncDeleteExecution.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/deleteexecution/AsyncDeleteExecutionLRO.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/deleteexecution/SyncDeleteExecution.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/deleteexecution/SyncDeleteExecutionExecutionname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/deleteexecution/SyncDeleteExecutionString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/getexecution/AsyncGetExecution.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/getexecution/SyncGetExecution.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/getexecution/SyncGetExecutionExecutionname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/getexecution/SyncGetExecutionString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/listexecutions/AsyncListExecutions.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/listexecutions/AsyncListExecutionsPaged.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/listexecutions/SyncListExecutions.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/listexecutions/SyncListExecutionsJobname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executions/listexecutions/SyncListExecutionsString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/executionssettings/getexecution/SyncGetExecution.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/create/SyncCreateSetEndpoint.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/createjob/AsyncCreateJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/createjob/AsyncCreateJobLRO.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/createjob/SyncCreateJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/createjob/SyncCreateJobLocationnameJobString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/createjob/SyncCreateJobStringJobString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/deletejob/AsyncDeleteJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/deletejob/AsyncDeleteJobLRO.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/deletejob/SyncDeleteJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/deletejob/SyncDeleteJobJobname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/deletejob/SyncDeleteJobString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/getjob/AsyncGetJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/getjob/SyncGetJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/getjob/SyncGetJobJobname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/getjob/SyncGetJobString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/listjobs/AsyncListJobs.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/listjobs/AsyncListJobsPaged.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/listjobs/SyncListJobs.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/listjobs/SyncListJobsLocationname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/listjobs/SyncListJobsString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/runjob/AsyncRunJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/runjob/AsyncRunJobLRO.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/runjob/SyncRunJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/runjob/SyncRunJobJobname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/runjob/SyncRunJobString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/updatejob/AsyncUpdateJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/updatejob/AsyncUpdateJobLRO.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/updatejob/SyncUpdateJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobs/updatejob/SyncUpdateJobJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/jobssettings/getjob/SyncGetJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/executionsstubsettings/getexecution/SyncGetExecution.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/jobsstubsettings/getjob/SyncGetJob.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/stub/tasksstubsettings/gettask/SyncGetTask.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/create/SyncCreateSetEndpoint.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/gettask/AsyncGetTask.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/gettask/SyncGetTask.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/gettask/SyncGetTaskString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/gettask/SyncGetTaskTaskname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/listtasks/AsyncListTasks.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/listtasks/AsyncListTasksPaged.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/listtasks/SyncListTasks.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/listtasks/SyncListTasksExecutionname.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/tasks/listtasks/SyncListTasksString.java create mode 100644 java-run/samples/snippets/generated/com/google/cloud/run/v2/taskssettings/gettask/SyncGetTask.java diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java new file mode 100644 index 000000000000..621b60bdfef2 --- /dev/null +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java @@ -0,0 +1,737 @@ +/* + * 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.run.v2; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.run.v2.stub.ExecutionsStub; +import com.google.cloud.run.v2.stub.ExecutionsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Cloud Run Execution Control Plane API. + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"); + * Execution response = executionsClient.getExecution(name); + * } + * }+ * + *
Note: close() needs to be called on the ExecutionsClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of ExecutionsSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ExecutionsSettings executionsSettings = + * ExecutionsSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * ExecutionsClient executionsClient = ExecutionsClient.create(executionsSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ExecutionsSettings executionsSettings = + * ExecutionsSettings.newBuilder().setEndpoint(myEndpoint).build(); + * ExecutionsClient executionsClient = ExecutionsClient.create(executionsSettings); + * }+ * + *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ExecutionsSettings executionsSettings = ExecutionsSettings.newHttpJsonBuilder().build(); + * ExecutionsClient executionsClient = ExecutionsClient.create(executionsSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ExecutionsClient implements BackgroundResource { + private final ExecutionsSettings settings; + private final ExecutionsStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ExecutionsClient with default settings. */ + public static final ExecutionsClient create() throws IOException { + return create(ExecutionsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ExecutionsClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ExecutionsClient create(ExecutionsSettings settings) throws IOException { + return new ExecutionsClient(settings); + } + + /** + * Constructs an instance of ExecutionsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ExecutionsSettings). + */ + public static final ExecutionsClient create(ExecutionsStub stub) { + return new ExecutionsClient(stub); + } + + /** + * Constructs an instance of ExecutionsClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected ExecutionsClient(ExecutionsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ExecutionsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ExecutionsClient(ExecutionsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ExecutionsSettings getSettings() { + return settings; + } + + public ExecutionsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an Execution. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"); + * Execution response = executionsClient.getExecution(name); + * } + * }+ * + * @param name Required. The full name of the Execution. Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Execution getExecution(ExecutionName name) { + GetExecutionRequest request = + GetExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getExecution(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an Execution. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString(); + * Execution response = executionsClient.getExecution(name); + * } + * }+ * + * @param name Required. The full name of the Execution. Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Execution getExecution(String name) { + GetExecutionRequest request = GetExecutionRequest.newBuilder().setName(name).build(); + return getExecution(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an Execution. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * GetExecutionRequest request = + * GetExecutionRequest.newBuilder() + * .setName( + * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString()) + * .build(); + * Execution response = executionsClient.getExecution(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Execution getExecution(GetExecutionRequest request) { + return getExecutionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an Execution. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * GetExecutionRequest request = + * GetExecutionRequest.newBuilder() + * .setName( + * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = executionsClient.getExecutionCallable().futureCall(request); + * // Do something. + * Execution response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * JobName parent = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); + * for (Execution element : executionsClient.listExecutions(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The Execution from which the Executions should be listed. To list all + * Executions across Jobs, use "-" instead of Job name. Format: + * projects/{project}/locations/{location}/jobs/{job} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExecutionsPagedResponse listExecutions(JobName parent) { + ListExecutionsRequest request = + ListExecutionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExecutions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Executions from a Job. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * String parent = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString(); + * for (Execution element : executionsClient.listExecutions(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The Execution from which the Executions should be listed. To list all + * Executions across Jobs, use "-" instead of Job name. Format: + * projects/{project}/locations/{location}/jobs/{job} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExecutionsPagedResponse listExecutions(String parent) { + ListExecutionsRequest request = ListExecutionsRequest.newBuilder().setParent(parent).build(); + return listExecutions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Executions from a Job. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * ListExecutionsRequest request = + * ListExecutionsRequest.newBuilder() + * .setParent(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setShowDeleted(true) + * .build(); + * for (Execution element : executionsClient.listExecutions(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request) { + return listExecutionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Executions from a Job. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * ListExecutionsRequest request = + * ListExecutionsRequest.newBuilder() + * .setParent(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setShowDeleted(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * executionsClient.listExecutionsPagedCallable().futureCall(request); + * // Do something. + * for (Execution element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * ListExecutionsRequest request = + * ListExecutionsRequest.newBuilder() + * .setParent(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setShowDeleted(true) + * .build(); + * while (true) { + * ListExecutionsResponse response = executionsClient.listExecutionsCallable().call(request); + * for (Execution element : response.getExecutionsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]"); + * Execution response = executionsClient.deleteExecutionAsync(name).get(); + * } + * }+ * + * @param name Required. The name of the Execution to delete. Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString(); + * Execution response = executionsClient.deleteExecutionAsync(name).get(); + * } + * }+ * + * @param name Required. The name of the Execution to delete. Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * DeleteExecutionRequest request = + * DeleteExecutionRequest.newBuilder() + * .setName( + * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString()) + * .setValidateOnly(true) + * .setEtag("etag3123477") + * .build(); + * Execution response = executionsClient.deleteExecutionAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * DeleteExecutionRequest request = + * DeleteExecutionRequest.newBuilder() + * .setName( + * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString()) + * .setValidateOnly(true) + * .setEtag("etag3123477") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * executionsClient.deleteExecutionOperationCallable().futureCall(request); + * // Do something. + * Execution response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ExecutionsClient executionsClient = ExecutionsClient.create()) { + * DeleteExecutionRequest request = + * DeleteExecutionRequest.newBuilder() + * .setName( + * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString()) + * .setValidateOnly(true) + * .setEtag("etag3123477") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = executionsClient.deleteExecutionCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getExecution to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ExecutionsSettings.Builder executionsSettingsBuilder = ExecutionsSettings.newBuilder(); + * executionsSettingsBuilder + * .getExecutionSettings() + * .setRetrySettings( + * executionsSettingsBuilder.getExecutionSettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * ExecutionsSettings executionsSettings = executionsSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class ExecutionsSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the JobsClient object to clean up resources such as
+ * threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of JobsSettings to create(). For
+ * example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class JobsClient implements BackgroundResource {
+ private final JobsSettings settings;
+ private final JobsStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of JobsClient with default settings. */
+ public static final JobsClient create() throws IOException {
+ return create(JobsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of JobsClient, using the given settings. The channels are created based
+ * on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final JobsClient create(JobsSettings settings) throws IOException {
+ return new JobsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of JobsClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(JobsSettings).
+ */
+ public static final JobsClient create(JobsStub stub) {
+ return new JobsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of JobsClient, using the given settings. This is protected so that it is
+ * easy to make a subclass, but otherwise, the static factory methods should be preferred.
+ */
+ protected JobsClient(JobsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((JobsStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected JobsClient(JobsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final JobsSettings getSettings() {
+ return settings;
+ }
+
+ public JobsStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Job.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * There are no permissions required for making this API call.
+ *
+ * Sample code:
+ *
+ * There are no permissions required for making this API call.
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getJob to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction Sample code:
*
@@ -346,7 +346,7 @@ public final ListRevisionsPagedResponse listRevisions(ServiceName parent) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Revisions from a given Service, or from a given location.
+ * Lists Revisions from a given Service, or from a given location.
*
* Sample code:
*
@@ -376,7 +376,7 @@ public final ListRevisionsPagedResponse listRevisions(String parent) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Revisions from a given Service, or from a given location.
+ * Lists Revisions from a given Service, or from a given location.
*
* Sample code:
*
@@ -409,7 +409,7 @@ public final ListRevisionsPagedResponse listRevisions(ListRevisionsRequest reque
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Revisions from a given Service, or from a given location.
+ * Lists Revisions from a given Service, or from a given location.
*
* Sample code:
*
@@ -442,7 +442,7 @@ public final ListRevisionsPagedResponse listRevisions(ListRevisionsRequest reque
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Revisions from a given Service, or from a given location.
+ * Lists Revisions from a given Service, or from a given location.
*
* Sample code:
*
@@ -481,7 +481,7 @@ public final UnaryCallable Sample code:
*
@@ -509,7 +509,7 @@ public final OperationFuture Sample code:
*
@@ -537,7 +537,7 @@ public final OperationFuture Sample code:
*
@@ -569,7 +569,7 @@ public final OperationFuture Sample code:
*
@@ -601,7 +601,7 @@ public final OperationFuture Sample code:
*
diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java
index 47dd97ad1937..9ecd1a1bc37f 100644
--- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java
+++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java
@@ -223,8 +223,9 @@ public final OperationsClient getHttpJsonOperationsClient() {
* }
* }
*
- * @param parent The location and project in which this service should be created. Format:
- * projects/{project}/locations/{location} Only lowercase characters, digits, and hyphens.
+ * @param parent Required. The location and project in which this service should be created.
+ * Format: projects/{project}/locations/{location} Only lowercase characters, digits, and
+ * hyphens.
* @param service Required. The Service instance to create.
* @param serviceId Required. The unique identifier for the Service. It must begin with letter,
* and may not end with hyphen; must contain fewer than 50 characters. The name of the service
@@ -262,8 +263,9 @@ public final OperationFuture Sample code:
*
@@ -519,7 +521,7 @@ public final ListServicesPagedResponse listServices(LocationName parent) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Services.
+ * Lists Services.
*
* Sample code:
*
@@ -549,7 +551,7 @@ public final ListServicesPagedResponse listServices(String parent) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Services.
+ * Lists Services.
*
* Sample code:
*
@@ -582,7 +584,7 @@ public final ListServicesPagedResponse listServices(ListServicesRequest request)
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Services.
+ * Lists Services.
*
* Sample code:
*
@@ -615,7 +617,7 @@ public final ListServicesPagedResponse listServices(ListServicesRequest request)
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List Services.
+ * Lists Services.
*
* Sample code:
*
@@ -920,7 +922,7 @@ public final UnaryCallable Sample code:
@@ -950,7 +952,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get the IAM Access Control policy currently in effect for the given Cloud Run Service. This
+ * Gets the IAM Access Control policy currently in effect for the given Cloud Run Service. This
* result does not include any inherited policies.
*
* Sample code:
diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java
new file mode 100644
index 000000000000..afe232919c85
--- /dev/null
+++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java
@@ -0,0 +1,550 @@
+/*
+ * 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.run.v2;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.run.v2.stub.TasksStub;
+import com.google.cloud.run.v2.stub.TasksStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: Cloud Run Task Control Plane API.
+ *
+ * This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the TasksClient object to clean up resources such as
+ * threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of TasksSettings to create(). For
+ * example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class TasksClient implements BackgroundResource {
+ private final TasksSettings settings;
+ private final TasksStub stub;
+
+ /** Constructs an instance of TasksClient with default settings. */
+ public static final TasksClient create() throws IOException {
+ return create(TasksSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of TasksClient, using the given settings. The channels are created based
+ * on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final TasksClient create(TasksSettings settings) throws IOException {
+ return new TasksClient(settings);
+ }
+
+ /**
+ * Constructs an instance of TasksClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(TasksSettings).
+ */
+ public static final TasksClient create(TasksStub stub) {
+ return new TasksClient(stub);
+ }
+
+ /**
+ * Constructs an instance of TasksClient, using the given settings. This is protected so that it
+ * is easy to make a subclass, but otherwise, the static factory methods should be preferred.
+ */
+ protected TasksClient(TasksSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((TasksStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected TasksClient(TasksStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final TasksSettings getSettings() {
+ return settings;
+ }
+
+ public TasksStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a Task.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getTask to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
*
+ * ======================= ExecutionsClient =======================
+ *
+ * Service Description: Cloud Run Execution Control Plane API.
+ *
+ * Sample for ExecutionsClient:
+ *
+ * ======================= JobsClient =======================
+ *
+ * Service Description: Cloud Run Job Control Plane API.
+ *
+ * Sample for JobsClient:
+ *
+ * ======================= RevisionsClient =======================
*
* Service Description: Cloud Run Revision Control Plane API.
@@ -54,6 +90,24 @@
* Service response = servicesClient.getService(name);
* }
* }
+ *
+ * ======================= TasksClient =======================
+ *
+ * Service Description: Cloud Run Task Control Plane API.
+ *
+ * Sample for TasksClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ExecutionsStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getExecution to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcExecutionsCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcExecutionsStub extends ExecutionsStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcJobsCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
+ * Job response = jobsClient.getJob(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * JobsSettings jobsSettings =
+ * JobsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * JobsClient jobsClient = JobsClient.create(jobsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * JobsSettings jobsSettings = JobsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * JobsClient jobsClient = JobsClient.create(jobsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * JobsSettings jobsSettings = JobsSettings.newHttpJsonBuilder().build();
+ * JobsClient jobsClient = JobsClient.create(jobsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Job job = Job.newBuilder().build();
+ * String jobId = "jobId101296568";
+ * Job response = jobsClient.createJobAsync(parent, job, jobId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The location and project in which this Job should be created. Format:
+ * projects/{project}/locations/{location}
+ * @param job Required. The Job instance to create.
+ * @param jobId Required. The unique identifier for the Job. The name of the job becomes
+ * {parent}/jobs/{job_id}.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Job job = Job.newBuilder().build();
+ * String jobId = "jobId101296568";
+ * Job response = jobsClient.createJobAsync(parent, job, jobId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The location and project in which this Job should be created. Format:
+ * projects/{project}/locations/{location}
+ * @param job Required. The Job instance to create.
+ * @param jobId Required. The unique identifier for the Job. The name of the job becomes
+ * {parent}/jobs/{job_id}.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * CreateJobRequest request =
+ * CreateJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setJob(Job.newBuilder().build())
+ * .setJobId("jobId101296568")
+ * .setValidateOnly(true)
+ * .build();
+ * Job response = jobsClient.createJobAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * CreateJobRequest request =
+ * CreateJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setJob(Job.newBuilder().build())
+ * .setJobId("jobId101296568")
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * CreateJobRequest request =
+ * CreateJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setJob(Job.newBuilder().build())
+ * .setJobId("jobId101296568")
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
+ * Job response = jobsClient.getJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Job. Format:
+ * projects/{project}/locations/{location}/jobs/{job}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Job getJob(JobName name) {
+ GetJobRequest request =
+ GetJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a Job.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString();
+ * Job response = jobsClient.getJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Job. Format:
+ * projects/{project}/locations/{location}/jobs/{job}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Job getJob(String name) {
+ GetJobRequest request = GetJobRequest.newBuilder().setName(name).build();
+ return getJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a Job.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * GetJobRequest request =
+ * GetJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .build();
+ * Job response = jobsClient.getJob(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Job getJob(GetJobRequest request) {
+ return getJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a Job.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * GetJobRequest request =
+ * GetJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Job element : jobsClient.listJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The location and project to list resources on. Format:
+ * projects/{project}/locations/{location}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobsPagedResponse listJobs(LocationName parent) {
+ ListJobsRequest request =
+ ListJobsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Jobs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Job element : jobsClient.listJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The location and project to list resources on. Format:
+ * projects/{project}/locations/{location}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobsPagedResponse listJobs(String parent) {
+ ListJobsRequest request = ListJobsRequest.newBuilder().setParent(parent).build();
+ return listJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Jobs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * ListJobsRequest request =
+ * ListJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * for (Job element : jobsClient.listJobs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobsPagedResponse listJobs(ListJobsRequest request) {
+ return listJobsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Jobs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * ListJobsRequest request =
+ * ListJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * ListJobsRequest request =
+ * ListJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * while (true) {
+ * ListJobsResponse response = jobsClient.listJobsCallable().call(request);
+ * for (Job element : response.getJobsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * Job job = Job.newBuilder().build();
+ * Job response = jobsClient.updateJobAsync(job).get();
+ * }
+ * }
+ *
+ * @param job Required. The Job to be updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * UpdateJobRequest request =
+ * UpdateJobRequest.newBuilder()
+ * .setJob(Job.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setAllowMissing(true)
+ * .build();
+ * Job response = jobsClient.updateJobAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * UpdateJobRequest request =
+ * UpdateJobRequest.newBuilder()
+ * .setJob(Job.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setAllowMissing(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * UpdateJobRequest request =
+ * UpdateJobRequest.newBuilder()
+ * .setJob(Job.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setAllowMissing(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
+ * Job response = jobsClient.deleteJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Job. Format:
+ * projects/{project}/locations/{location}/jobs/{job}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString();
+ * Job response = jobsClient.deleteJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Job. Format:
+ * projects/{project}/locations/{location}/jobs/{job}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * DeleteJobRequest request =
+ * DeleteJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * Job response = jobsClient.deleteJobAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * DeleteJobRequest request =
+ * DeleteJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * DeleteJobRequest request =
+ * DeleteJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
+ * Execution response = jobsClient.runJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Job. Format:
+ * projects/{project}/locations/{location}/jobs/{job}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString();
+ * Execution response = jobsClient.runJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Job. Format:
+ * projects/{project}/locations/{location}/jobs/{job}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * RunJobRequest request =
+ * RunJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * Execution response = jobsClient.runJobAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * RunJobRequest request =
+ * RunJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * RunJobRequest request =
+ * RunJobRequest.newBuilder()
+ * .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = jobsClient.getIamPolicy(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get the IAM Access Control policy currently in effect for the given Job. This result does not
+ * include any inherited policies.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = jobsClient.setIamPolicy(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the IAM Access control policy for the specified Job. Overwrites any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified Project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * JobsSettings.Builder jobsSettingsBuilder = JobsSettings.newBuilder();
+ * jobsSettingsBuilder
+ * .getJobSettings()
+ * .setRetrySettings(
+ * jobsSettingsBuilder.getJobSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * JobsSettings jobsSettings = jobsSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class JobsSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]", "[TASK]");
+ * Task response = tasksClient.getTask(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TasksSettings tasksSettings =
+ * TasksSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * TasksClient tasksClient = TasksClient.create(tasksSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TasksSettings tasksSettings = TasksSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TasksClient tasksClient = TasksClient.create(tasksSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TasksSettings tasksSettings = TasksSettings.newHttpJsonBuilder().build();
+ * TasksClient tasksClient = TasksClient.create(tasksSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]", "[TASK]");
+ * Task response = tasksClient.getTask(name);
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Task. Format:
+ * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Task getTask(TaskName name) {
+ GetTaskRequest request =
+ GetTaskRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getTask(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a Task.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * String name =
+ * TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]", "[TASK]").toString();
+ * Task response = tasksClient.getTask(name);
+ * }
+ * }
+ *
+ * @param name Required. The full name of the Task. Format:
+ * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Task getTask(String name) {
+ GetTaskRequest request = GetTaskRequest.newBuilder().setName(name).build();
+ return getTask(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a Task.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * GetTaskRequest request =
+ * GetTaskRequest.newBuilder()
+ * .setName(
+ * TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]", "[TASK]")
+ * .toString())
+ * .build();
+ * Task response = tasksClient.getTask(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Task getTask(GetTaskRequest request) {
+ return getTaskCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a Task.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * GetTaskRequest request =
+ * GetTaskRequest.newBuilder()
+ * .setName(
+ * TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]", "[TASK]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
+ * for (Task element : tasksClient.listTasks(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The Execution from which the Tasks should be listed. To list all Tasks
+ * across Executions of a Job, use "-" instead of Execution name. To list all Tasks across
+ * Jobs, use "-" instead of Job name. Format:
+ * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTasksPagedResponse listTasks(ExecutionName parent) {
+ ListTasksRequest request =
+ ListTasksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listTasks(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Tasks from an Execution of a Job.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * String parent =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString();
+ * for (Task element : tasksClient.listTasks(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The Execution from which the Tasks should be listed. To list all Tasks
+ * across Executions of a Job, use "-" instead of Execution name. To list all Tasks across
+ * Jobs, use "-" instead of Job name. Format:
+ * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTasksPagedResponse listTasks(String parent) {
+ ListTasksRequest request = ListTasksRequest.newBuilder().setParent(parent).build();
+ return listTasks(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Tasks from an Execution of a Job.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * ListTasksRequest request =
+ * ListTasksRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * for (Task element : tasksClient.listTasks(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTasksPagedResponse listTasks(ListTasksRequest request) {
+ return listTasksPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Tasks from an Execution of a Job.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * ListTasksRequest request =
+ * ListTasksRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * ListTasksRequest request =
+ * ListTasksRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * while (true) {
+ * ListTasksResponse response = tasksClient.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;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TasksSettings.Builder tasksSettingsBuilder = TasksSettings.newBuilder();
+ * tasksSettingsBuilder
+ * .getTaskSettings()
+ * .setRetrySettings(
+ * tasksSettingsBuilder.getTaskSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * TasksSettings tasksSettings = tasksSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class TasksSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]");
+ * Execution response = executionsClient.getExecution(name);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (JobsClient jobsClient = JobsClient.create()) {
+ * JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
+ * Job response = jobsClient.getJob(name);
+ * }
+ * }
+ *
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TasksClient tasksClient = TasksClient.create()) {
+ * TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[JOB]", "[EXECUTION]", "[TASK]");
+ * Task response = tasksClient.getTask(name);
+ * }
+ * }
*/
@Generated("by gapic-generator-java")
package com.google.cloud.run.v2;
diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStub.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStub.java
new file mode 100644
index 000000000000..842b9d7e80b9
--- /dev/null
+++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStub.java
@@ -0,0 +1,74 @@
+/*
+ * 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.run.v2.stub;
+
+import static com.google.cloud.run.v2.ExecutionsClient.ListExecutionsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.run.v2.DeleteExecutionRequest;
+import com.google.cloud.run.v2.Execution;
+import com.google.cloud.run.v2.GetExecutionRequest;
+import com.google.cloud.run.v2.ListExecutionsRequest;
+import com.google.cloud.run.v2.ListExecutionsResponse;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the Executions service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ExecutionsStubSettings.Builder executionsSettingsBuilder = ExecutionsStubSettings.newBuilder();
+ * executionsSettingsBuilder
+ * .getExecutionSettings()
+ * .setRetrySettings(
+ * executionsSettingsBuilder.getExecutionSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ExecutionsStubSettings executionsSettings = executionsSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ExecutionsStubSettings extends StubSettings