From 89570323cc4f24f62655e92b9fcdf62532b8bdf5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 15 Jan 2026 23:13:10 +0000 Subject: [PATCH 1/2] feat: add instances client library docs: add instances description PiperOrigin-RevId: 856756379 Source-Link: https://github.com/googleapis/googleapis/commit/a79ccb6aba44d1285d11840033956a0bced351a2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fc9fbefb74a42bca8b0780205b5a625cf24d5b0e Copy-Tag: eyJwIjoiUnVuLy5Pd2xCb3QueWFtbCIsImgiOiJmYzlmYmVmYjc0YTQyYmNhOGIwNzgwMjA1YjVhNjI1Y2YyNGQ1YjBlIn0= --- .../GPBMetadata/Google/Cloud/Run/V2/Build.php | Bin 0 -> 2682 bytes .../Google/Cloud/Run/V2/Condition.php | Bin 0 -> 2482 bytes .../Google/Cloud/Run/V2/ContainerStatus.php | 30 + .../Google/Cloud/Run/V2/Execution.php | 110 + .../Google/Cloud/Run/V2/ExecutionTemplate.php | 42 + .../Google/Cloud/Run/V2/Instance.php | Bin 0 -> 5978 bytes .../Google/Cloud/Run/V2/InstanceSplit.php | Bin 0 -> 1241 bytes .../GPBMetadata/Google/Cloud/Run/V2/Job.php | Bin 0 -> 6807 bytes .../Google/Cloud/Run/V2/K8SMin.php | Bin 0 -> 4262 bytes .../Google/Cloud/Run/V2/Revision.php | Bin 0 -> 5116 bytes .../Google/Cloud/Run/V2/RevisionTemplate.php | Bin 0 -> 2426 bytes .../Google/Cloud/Run/V2/Service.php | 143 ++ .../Google/Cloud/Run/V2/Status.php | 29 + .../GPBMetadata/Google/Cloud/Run/V2/Task.php | Bin 0 -> 4099 bytes .../Google/Cloud/Run/V2/TaskTemplate.php | Bin 0 -> 1725 bytes .../Google/Cloud/Run/V2/TrafficTarget.php | Bin 0 -> 1280 bytes .../Google/Cloud/Run/V2/VendorSettings.php | Bin 0 -> 3198 bytes .../Google/Cloud/Run/V2/WorkerPool.php | 138 ++ .../Run/V2/WorkerPoolRevisionTemplate.php | Bin 0 -> 2198 bytes .../Cloud/Run/V2/BinaryAuthorization.php | 160 ++ .../src/Google/Cloud/Run/V2/BuildConfig.php | 388 ++++ .../src/Google/Cloud/Run/V2/BuildInfo.php | 105 + .../Cloud/Run/V2/CancelExecutionRequest.php | 172 ++ .../Google/Cloud/Run/V2/CloudSqlInstance.php | 86 + .../src/Google/Cloud/Run/V2/Condition.php | 337 ++++ .../Cloud/Run/V2/Condition/CommonReason.php | 155 ++ .../Run/V2/Condition/ExecutionReason.php | 93 + .../Cloud/Run/V2/Condition/RevisionReason.php | 141 ++ .../Cloud/Run/V2/Condition/Severity.php | 71 + .../Google/Cloud/Run/V2/Condition/State.php | 78 + .../src/Google/Cloud/Run/V2/Container.php | 701 +++++++ .../src/Google/Cloud/Run/V2/ContainerPort.php | 109 + .../Google/Cloud/Run/V2/ContainerStatus.php | 114 ++ .../Cloud/Run/V2/CreateInstanceRequest.php | 190 ++ .../Google/Cloud/Run/V2/CreateJobRequest.php | 216 ++ .../Cloud/Run/V2/CreateServiceRequest.php | 221 +++ .../Cloud/Run/V2/CreateWorkerPoolRequest.php | 231 +++ .../Cloud/Run/V2/DeleteExecutionRequest.php | 172 ++ .../Cloud/Run/V2/DeleteInstanceRequest.php | 147 ++ .../Google/Cloud/Run/V2/DeleteJobRequest.php | 167 ++ .../Cloud/Run/V2/DeleteRevisionRequest.php | 169 ++ .../Cloud/Run/V2/DeleteServiceRequest.php | 167 ++ .../Cloud/Run/V2/DeleteWorkerPoolRequest.php | 172 ++ .../Cloud/Run/V2/EmptyDirVolumeSource.php | 143 ++ .../Run/V2/EmptyDirVolumeSource/Medium.php | 58 + .../Run/V2/EncryptionKeyRevocationAction.php | 61 + .../proto/src/Google/Cloud/Run/V2/EnvVar.php | 152 ++ .../src/Google/Cloud/Run/V2/EnvVarSource.php | 77 + .../src/Google/Cloud/Run/V2/Execution.php | 1217 ++++++++++++ .../Cloud/Run/V2/ExecutionEnvironment.php | 61 + .../Cloud/Run/V2/ExecutionReference.php | 238 +++ .../ExecutionReference/CompletionStatus.php | 85 + .../Google/Cloud/Run/V2/ExecutionTemplate.php | 318 +++ .../Google/Cloud/Run/V2/GCSVolumeSource.php | 140 ++ .../src/Google/Cloud/Run/V2/GRPCAction.php | 121 ++ .../Cloud/Run/V2/GetExecutionRequest.php | 96 + .../Cloud/Run/V2/GetInstanceRequest.php | 71 + .../src/Google/Cloud/Run/V2/GetJobRequest.php | 91 + .../Cloud/Run/V2/GetRevisionRequest.php | 91 + .../Google/Cloud/Run/V2/GetServiceRequest.php | 91 + .../Google/Cloud/Run/V2/GetTaskRequest.php | 91 + .../Cloud/Run/V2/GetWorkerPoolRequest.php | 96 + .../src/Google/Cloud/Run/V2/HTTPGetAction.php | 147 ++ .../src/Google/Cloud/Run/V2/HTTPHeader.php | 101 + .../Google/Cloud/Run/V2/IngressTraffic.php | 75 + .../src/Google/Cloud/Run/V2/Instance.php | 1579 +++++++++++++++ .../src/Google/Cloud/Run/V2/InstanceSplit.php | 144 ++ .../Run/V2/InstanceSplitAllocationType.php | 61 + .../Cloud/Run/V2/InstanceSplitStatus.php | 135 ++ .../v2/proto/src/Google/Cloud/Run/V2/Job.php | 1245 ++++++++++++ .../Cloud/Run/V2/ListExecutionsRequest.php | 202 ++ .../Cloud/Run/V2/ListExecutionsResponse.php | 105 + .../Cloud/Run/V2/ListInstancesRequest.php | 201 ++ .../Cloud/Run/V2/ListInstancesResponse.php | 105 + .../Google/Cloud/Run/V2/ListJobsRequest.php | 197 ++ .../Google/Cloud/Run/V2/ListJobsResponse.php | 105 + .../Cloud/Run/V2/ListRevisionsRequest.php | 202 ++ .../Cloud/Run/V2/ListRevisionsResponse.php | 105 + .../Cloud/Run/V2/ListServicesRequest.php | 202 ++ .../Cloud/Run/V2/ListServicesResponse.php | 143 ++ .../Google/Cloud/Run/V2/ListTasksRequest.php | 202 ++ .../Google/Cloud/Run/V2/ListTasksResponse.php | 105 + .../Cloud/Run/V2/ListWorkerPoolsRequest.php | 202 ++ .../Cloud/Run/V2/ListWorkerPoolsResponse.php | 105 + .../Google/Cloud/Run/V2/NFSVolumeSource.php | 135 ++ .../src/Google/Cloud/Run/V2/NodeSelector.php | 67 + .../proto/src/Google/Cloud/Run/V2/Probe.php | 319 +++ .../Cloud/Run/V2/ResourceRequirements.php | 179 ++ .../src/Google/Cloud/Run/V2/Revision.php | 1455 ++++++++++++++ .../Google/Cloud/Run/V2/RevisionScaling.php | 117 ++ .../Cloud/Run/V2/RevisionScalingStatus.php | 67 + .../Google/Cloud/Run/V2/RevisionTemplate.php | 866 ++++++++ .../src/Google/Cloud/Run/V2/RunJobRequest.php | 215 ++ .../Cloud/Run/V2/RunJobRequest/Overrides.php | 160 ++ .../Overrides/ContainerOverride.php | 180 ++ .../Google/Cloud/Run/V2/SecretKeySelector.php | 121 ++ .../Cloud/Run/V2/SecretVolumeSource.php | 217 ++ .../proto/src/Google/Cloud/Run/V2/Service.php | 1761 +++++++++++++++++ .../Run/V2/Service/MultiRegionSettings.php | 104 + .../src/Google/Cloud/Run/V2/ServiceMesh.php | 76 + .../Google/Cloud/Run/V2/ServiceScaling.php | 204 ++ .../Run/V2/ServiceScaling/ScalingMode.php | 65 + .../src/Google/Cloud/Run/V2/SourceCode.php | 75 + .../Run/V2/SourceCode/CloudStorageSource.php | 138 ++ .../Cloud/Run/V2/StartInstanceRequest.php | 172 ++ .../Cloud/Run/V2/StopInstanceRequest.php | 172 ++ .../src/Google/Cloud/Run/V2/StorageSource.php | 155 ++ .../Cloud/Run/V2/SubmitBuildRequest.php | 466 +++++ .../V2/SubmitBuildRequest/BuildpacksBuild.php | 317 +++ .../Run/V2/SubmitBuildRequest/DockerBuild.php | 36 + .../Cloud/Run/V2/SubmitBuildResponse.php | 149 ++ .../Google/Cloud/Run/V2/TCPSocketAction.php | 75 + .../v2/proto/src/Google/Cloud/Run/V2/Task.php | 1431 ++++++++++++++ .../Google/Cloud/Run/V2/TaskAttemptResult.php | 173 ++ .../src/Google/Cloud/Run/V2/TaskTemplate.php | 469 +++++ .../src/Google/Cloud/Run/V2/TrafficTarget.php | 182 ++ .../Run/V2/TrafficTargetAllocationType.php | 61 + .../Cloud/Run/V2/TrafficTargetStatus.php | 203 ++ .../Google/Cloud/Run/V2/UpdateJobRequest.php | 170 ++ .../Cloud/Run/V2/UpdateServiceRequest.php | 229 +++ .../Cloud/Run/V2/UpdateWorkerPoolRequest.php | 287 +++ .../src/Google/Cloud/Run/V2/VersionToPath.php | 188 ++ .../proto/src/Google/Cloud/Run/V2/Volume.php | 247 +++ .../src/Google/Cloud/Run/V2/VolumeMount.php | 155 ++ .../src/Google/Cloud/Run/V2/VpcAccess.php | 160 ++ .../Run/V2/VpcAccess/NetworkInterface.php | 170 ++ .../Cloud/Run/V2/VpcAccess/VpcEgress.php | 64 + .../src/Google/Cloud/Run/V2/WorkerPool.php | 1441 ++++++++++++++ .../Run/V2/WorkerPoolRevisionTemplate.php | 634 ++++++ .../Google/Cloud/Run/V2/WorkerPoolScaling.php | 77 + .../samples/V2/BuildsClient/submit_build.php | 94 + .../V2/ExecutionsClient/cancel_execution.php | 86 + .../V2/ExecutionsClient/delete_execution.php | 86 + .../V2/ExecutionsClient/get_execution.php | 74 + .../V2/ExecutionsClient/list_executions.php | 80 + .../V2/InstancesClient/create_instance.php | 101 + .../V2/InstancesClient/delete_instance.php | 82 + .../V2/InstancesClient/get_instance.php | 70 + .../V2/InstancesClient/list_instances.php | 78 + .../V2/InstancesClient/start_instance.php | 86 + .../V2/InstancesClient/stop_instance.php | 86 + .../v2/samples/V2/JobsClient/create_job.php | 97 + .../v2/samples/V2/JobsClient/delete_job.php | 85 + .../samples/V2/JobsClient/get_iam_policy.php | 72 + .../Run/v2/samples/V2/JobsClient/get_job.php | 73 + .../v2/samples/V2/JobsClient/list_jobs.php | 78 + .../Run/v2/samples/V2/JobsClient/run_job.php | 85 + .../samples/V2/JobsClient/set_iam_policy.php | 74 + .../V2/JobsClient/test_iam_permissions.php | 80 + .../v2/samples/V2/JobsClient/update_job.php | 77 + .../V2/RevisionsClient/delete_revision.php | 90 + .../V2/RevisionsClient/get_revision.php | 78 + .../V2/RevisionsClient/list_revisions.php | 80 + .../V2/ServicesClient/create_service.php | 95 + .../V2/ServicesClient/delete_service.php | 87 + .../V2/ServicesClient/get_iam_policy.php | 72 + .../samples/V2/ServicesClient/get_service.php | 73 + .../V2/ServicesClient/list_services.php | 79 + .../V2/ServicesClient/set_iam_policy.php | 74 + .../ServicesClient/test_iam_permissions.php | 80 + .../V2/ServicesClient/update_service.php | 74 + .../v2/samples/V2/TasksClient/get_task.php | 73 + .../v2/samples/V2/TasksClient/list_tasks.php | 79 + .../WorkerPoolsClient/create_worker_pool.php | 97 + .../WorkerPoolsClient/delete_worker_pool.php | 86 + .../V2/WorkerPoolsClient/get_iam_policy.php | 72 + .../V2/WorkerPoolsClient/get_worker_pool.php | 74 + .../WorkerPoolsClient/list_worker_pools.php | 79 + .../V2/WorkerPoolsClient/set_iam_policy.php | 74 + .../test_iam_permissions.php | 80 + .../WorkerPoolsClient/update_worker_pool.php | 74 + .../Run/v2/src/V2/Client/BuildsClient.php | 255 +++ .../Run/v2/src/V2/Client/ExecutionsClient.php | 417 ++++ .../Run/v2/src/V2/Client/InstancesClient.php | 596 ++++++ .../Run/v2/src/V2/Client/JobsClient.php | 709 +++++++ .../Run/v2/src/V2/Client/RevisionsClient.php | 389 ++++ .../Run/v2/src/V2/Client/ServicesClient.php | 742 +++++++ .../Run/v2/src/V2/Client/TasksClient.php | 310 +++ .../v2/src/V2/Client/WorkerPoolsClient.php | 700 +++++++ .../Run/v2/src/V2/gapic_metadata.json | 286 +++ .../V2/resources/builds_client_config.json | 27 + .../V2/resources/builds_descriptor_config.php | 43 + .../resources/builds_rest_client_config.php | 88 + .../resources/executions_client_config.json | 42 + .../executions_descriptor_config.php | 102 + .../executions_rest_client_config.php | 121 ++ .../V2/resources/instances_client_config.json | 52 + .../resources/instances_descriptor_config.php | 151 ++ .../instances_rest_client_config.php | 148 ++ .../src/V2/resources/jobs_client_config.json | 67 + .../V2/resources/jobs_descriptor_config.php | 191 ++ .../V2/resources/jobs_rest_client_config.php | 184 ++ .../V2/resources/revisions_client_config.json | 37 + .../resources/revisions_descriptor_config.php | 86 + .../revisions_rest_client_config.php | 127 ++ .../V2/resources/services_client_config.json | 94 + .../resources/services_descriptor_config.php | 174 ++ .../resources/services_rest_client_config.php | 172 ++ .../src/V2/resources/tasks_client_config.json | 32 + .../V2/resources/tasks_descriptor_config.php | 64 + .../V2/resources/tasks_rest_client_config.php | 98 + .../resources/worker_pools_client_config.json | 62 + .../worker_pools_descriptor_config.php | 172 ++ .../worker_pools_rest_client_config.php | 172 ++ .../tests/Unit/V2/Client/BuildsClientTest.php | 192 ++ .../Unit/V2/Client/ExecutionsClientTest.php | 646 ++++++ .../Unit/V2/Client/InstancesClientTest.php | 996 ++++++++++ .../tests/Unit/V2/Client/JobsClientTest.php | 1172 +++++++++++ .../Unit/V2/Client/RevisionsClientTest.php | 478 +++++ .../Unit/V2/Client/ServicesClientTest.php | 1064 ++++++++++ .../tests/Unit/V2/Client/TasksClientTest.php | 289 +++ .../Unit/V2/Client/WorkerPoolsClientTest.php | 1024 ++++++++++ 212 files changed, 44509 insertions(+) create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Build.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Condition.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/ContainerStatus.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Execution.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/ExecutionTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Instance.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/InstanceSplit.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Job.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/K8SMin.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Revision.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/RevisionTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Task.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TaskTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TrafficTarget.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/VendorSettings.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPool.php create mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerStatus.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetInstanceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Instance.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StartInstanceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StopInstanceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php create mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/InstancesClient/create_instance.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/InstancesClient/delete_instance.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/InstancesClient/get_instance.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/InstancesClient/list_instances.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/InstancesClient/start_instance.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/InstancesClient/stop_instance.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/InstancesClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php create mode 100644 owl-bot-staging/Run/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/instances_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/instances_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/instances_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php create mode 100644 owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/InstancesClientTest.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php create mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Build.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Build.php new file mode 100644 index 0000000000000000000000000000000000000000..40a4c8b2cb899cd8df8f3489f25c05f87c6d7800 GIT binary patch literal 2682 zcmb7GO>Y}T7-pU3Yn%_U5oBXgbx4ci1iGs_QbA4wvYVu>C?q6Rk&va;cs;ghVhiq}k8*mAWmgd)v@ZY;vqt zFC@8*rAX;`bc_X+sff08-pausKQ%6asTQ+FEsD58fk#QTI;v^p;wr<(A)}GJnav)f zVXIENq|dmxndx%^z;}-%>Cl@Q9@1>4-nhEwJnF#6MJ(zx_G2~4SEHjFe*aUJwYS!4 z<=xza2`}gPt8T2JpBB)aYew5%G77GqeHRjO`<2piW<_EKOQDcAi%=T6Q-ZdF*KcO{ zW(v2*EJF>V4;XNMP_GxNmym6hK(4thy%Bxsu%@qk5znK|6T*mi;c8Wj*B} z70j6!xjsaTnjU}=j(vS{ZfV~iU+()t#;#6ZnJ4=6)UrQEb1fbmQ;|8G)DAb_)Zvb{ z9XfjtEhbd-SwMXf1Uv;~riSTT_8uypaG^pe0&%9bNd0@*@k zc~~KYamV&f^}te{H3R4rb5EstR2(a}^lt$z>eNPfg55OCvSdA)jYPq*Y(Qm5sJ}g4&ElsqTuTsHwR*;=-9a{7Vc*g~ z`mOvf$U3e7E^VQeDr3SNV;S;MqgQm=C)#m^nb>r!-ul``6 zrE?`FF)%*0A7*>w=Zmd<7b~}iD2;8uo3kP8;lc=fy^Ly=XYCTQ$G)Esp;*)`>gpky zKey9rl$t3l*g2AbkG!ei8BIb#^}1so6+p$>-GoN7@{fh4^rR*BFBU3}m1sBCh9z9n z=u-K5MFZFBqaXkL>*vD5)d%W5a%LEAJ8Ng+ZFnIM%x&Rq3_J~gQcX11RIQED-tRSA z@ws8U;S&E*bGuT;N!9aCPEKAEdN4~}^9;HlheWoy=+%F-&@ycQWm(seMnk_l4yxb`7#*&kQxF^~fMnw4mj3;_7TttsYI)IT*=aCV{MitPfoEtZCAHlS2hjMbXy%D{j<6223e*ZF1934veOg>1Vv_20gfa{ za$!>}jWC1uHRYM{%HSR(H|Jonr~Qa}6@zmL%~+~FZlyo`_V=?9#> z=QvKHEb^lM7pX%w35SD&*9iGzFHNyt zK%n0chQD}nIu3lCW?lwAyFuy(AuQpIgI|ID8+_)CQx4gm#-2?=UvR-9!3=%A_X6jb zB6c^9pxQUMAY%yup!gvTGoFOrc-Z2pp9FChB^HD>8s|JKWfLQNFQ&^1xZn)$HOWp$DWBD{(Ae9ye!*;;Oqb7gvT?SFoXw0gbfh<O!=HX1F@L#w;5nH9e+mLwm&)|_FZ4PkfceIjgeh=NY9nB$b->@yB(>5h7<%SBw zx@o{^LQTW92s{}bWl4R2?#+f7foGj|#nespE>dPwZH;yTr=s3RcV?q@U)Kp~!Nl@T z8?D=g;5BsDCIiB#b8?MF6|E4)Oa@DDptWO-8Tn%CXqg&qQ>pCyT|t{y8=yWy_jR+^ z1KNyeHvIIB7HLyMmIWYvJ#(`>YNT+gvlAeZ4pBVx~5|EpO=gqwgSMU9F?9 zuSXQ~nrwr9Nc5wEX;s}tm>4=cvE<|tIe|W1Ul$2t*P`ZNHbj6;bVeN8)u264_FTZG z==re*Mld>V+hnc@t4Kb|EukRo_2AMG1_B6nqHKvl%d{QK1j(m^+i*IpQ^O(5(7K8u zAP1K28pJs^*^vu37eGUwl-oOh-9%gSdq91R9+Z7r+|!vsp~28P!UhB^DPJ7QK;DXA z01PP;{aRMH5CZ!Gny5=z5$!o7TGu(8RzK@R?!Q$bx8AoMvnSf+S{j7HN>HUu$_=un zK1Gjv)NrW*o5}z+Wo=-n+-9=R5TfZ09SFsy?(5PXb>LM4>03%wy^U@eCV0o{nkPMC zI0{l>kIWIYkEmrq@P-g`eo5FSFwjvpcm7;L+t&^N6%0<^61^{7vp`O$^JlZ^ibJ7q zyFyB;LxpBn>~pu+jb9+u0DHe9%!J(mD`O`Y%eaG=wkmolHWaE v9Kfd!+-&jbYx)0lRo)t}o|jkVxA_OamG1>{g9ZMAZv`2d-{>FFM}+internalAddGeneratedFile( + ' +Þ +*google/cloud/run/v2/container_status.protogoogle.cloud.run.v2"5 +ContainerStatus +name (  + image_digest ( B\\ +com.google.cloud.run.v2BContainerStatusProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Execution.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Execution.php new file mode 100644 index 000000000000..57a28c434e0e --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Execution.php @@ -0,0 +1,110 @@ +internalAddGeneratedFile( + ' +– +#google/cloud/run/v2/execution.protogoogle.cloud.run.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/launch_stage.protogoogle/api/resource.proto#google/cloud/run/v2/condition.proto\'google/cloud/run/v2/task_template.proto#google/longrunning/operations.protogoogle/protobuf/timestamp.proto"I +GetExecutionRequest2 +name ( B$àAúA +run.googleapis.com/Execution"Š +ListExecutionsRequest4 +parent ( B$àAúArun.googleapis.com/Execution + page_size ( + +page_token (  + show_deleted ("e +ListExecutionsResponse2 + +executions ( 2.google.cloud.run.v2.Execution +next_page_token ( "q +DeleteExecutionRequest2 +name ( B$àAúA +run.googleapis.com/Execution + validate_only ( +etag ( "q +CancelExecutionRequest2 +name ( B$àAúA +run.googleapis.com/Execution + validate_only ( +etag ( "˜ + + Execution +name ( BàA +uid ( BàA +creator ( BàA + +generation (BàA? +labels ( 2*.google.cloud.run.v2.Execution.LabelsEntryBàAI + annotations ( 2/.google.cloud.run.v2.Execution.AnnotationsEntryBàA4 + create_time ( 2.google.protobuf.TimestampBàA3 + +start_time ( 2.google.protobuf.TimestampBàA8 +completion_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA4 + delete_time ( 2.google.protobuf.TimestampBàA4 + expire_time + ( 2.google.protobuf.TimestampBàA- + launch_stage (2.google.api.LaunchStage+ +job ( BàAúA +run.googleapis.com/Job + parallelism (BàA + +task_count (BàA8 +template ( 2!.google.cloud.run.v2.TaskTemplateBàA + reconciling (BàA7 + +conditions ( 2.google.cloud.run.v2.ConditionBàA +observed_generation (BàA + running_count (BàA +succeeded_count (BàA + failed_count (BàA +cancelled_count (BàA + retried_count (BàA +log_uri ( BàA + satisfies_pzs (BàA +etagc ( BàA- + LabelsEntry +key (  +value ( :82 +AnnotationsEntry +key (  +value ( :8:oêAl +run.googleapis.com/ExecutionIprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}R2± + +Executionsž + GetExecution(.google.cloud.run.v2.GetExecutionRequest.google.cloud.run.v2.Execution"DÚAname‚Óä“75/v2/{name=projects/*/locations/*/jobs/*/executions/*}± +ListExecutions*.google.cloud.run.v2.ListExecutionsRequest+.google.cloud.run.v2.ListExecutionsResponse"FÚAparent‚Óä“75/v2/{parent=projects/*/locations/*/jobs/*}/executions¼ +DeleteExecution+.google.cloud.run.v2.DeleteExecutionRequest.google.longrunning.Operation"]ÊA + Execution ExecutionÚAname‚Óä“7*5/v2/{name=projects/*/locations/*/jobs/*/executions/*}Æ +CancelExecution+.google.cloud.run.v2.CancelExecutionRequest.google.longrunning.Operation"gÊA + Execution ExecutionÚAname‚Óä“A"internalAddGeneratedFile( + ' +Ç +,google/cloud/run/v2/execution_template.protogoogle.cloud.run.v2\'google/cloud/run/v2/task_template.proto"ð +ExecutionTemplateB +labels ( 22.google.cloud.run.v2.ExecutionTemplate.LabelsEntryL + annotations ( 27.google.cloud.run.v2.ExecutionTemplate.AnnotationsEntry + parallelism (BàA + +task_count (8 +template ( 2!.google.cloud.run.v2.TaskTemplateBàA- + LabelsEntry +key (  +value ( :82 +AnnotationsEntry +key (  +value ( :8B^ +com.google.cloud.run.v2BExecutionTemplateProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Instance.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Instance.php new file mode 100644 index 0000000000000000000000000000000000000000..b9b645c95241187b095681e59af18cc1a11da95b GIT binary patch literal 5978 zcmcgwPjB1E6|d~XiAT1R9Xko5)F~|+jjfHPR#{*ZWxWg8j@@9ho4^ioXax`yIg;7X z94?2HqXfS6(xTTMdg#|!p#25~_RvGyOLOX>z3eyGJ@w5$ii&AlO3~(!D4h3u^Zvgd z`N?PDL5P;kT@sMUj)`lw`(}JV%rK%cb*OK)lTL?3rb7=y&nHpUG`F9cUp{?qKH7f# zdc>#;p|G1PI8J}Haw63Xy;d^_ zD31aSSferUX`tdX;Fj-^ARZ61;}PH8BnNiSqtSTKCpHBBU_Z9IWIW&=QI$28cY8F6 zy`Ve#RoSX*ZPCDma-zZe<73-{Rsw(HWQ@cNS@HS({V%-tHQ@ybTpI0@n1^8u3!c!R z3tbxks`WJF!(hD9N;_sdk=W5gm_na>Fdkz2FwDn_CSCv3Q!Uwa-LwODU^cC$J;OWb z4*GfpmCqkacwWj>#o($!2&%n$>4pN@p$8LMeSSQ zQdf<@(#_0qq$*q?jqH&uV|B8uPK1eiwmQ02l~CmrAz6^z2&hOUyObyU@;<8`dVvyI z%M1GvbZsjlu%z@( z*dt#hP%ro%nhNa*a%2?D!s_(q@;{ps-!~WWEuKtyE##3^VTaW;7Jq~;>+NJr0IXPF zRI)>rP}P9VNzjT7RMaTTbB#%HpExO@*&eJRSZKtef!{YSz}aPvDwKB--X*ctq|N>* zy1@70u+iu&qsx7CZJYSyWC+IBg-;mFqaY2&AD|1coVx@63gzDy(83dsrCu=Y#(PEo zI+_llDJ%wiTZI3jh!nnoka!-`mn6tsk8h$Gc0i9TSGezHquWN;-Z6}YuoVgZ37Xc) zVi4uYb8`&WUkS*o*vidf#<&cY73(FfL{Fe`4YhzS3BPD$%m6~A0U8~sbZi|`*MpT68MA}4IW#5L zn=!{9;_GNm{@?16i1D;t5zp7rOm>+WSK;Yg{e})1j917~O7!p!T4;NL9rZ0ci4SPx zy%u!B_yAzV`l^OyS8jDv0Ge5O{4qkk(6MaCA&ePVpl|1*UxZFmNa;Cpg^{S|IfR30 z0=r>eI071Bamt;@j0I6X`5J)>N-?f+0^dcKdel#VpcvN#>Q=rTLI!_|=1AZ~{gAUL z>m}(M*ZK9EKmNYCjFyDoFAtg0kS?b!4xpctK5n&;Ijq2nNRK)qjNlSiYZ#z%u3pcz z<57A$sM|}SO@V|idRIF;NMe^B1(sgR#!V6Jn_7F?6`J4S4Ky227iKt&WCz}hjFLbs zX~a-=zXZvBB`8x=LyO%ov0hVny8`FjByizXv2VE^v)ev#ja#5j?xUam;5UT=et<3k zIR(a%#QUUn&eF)_#2)@7lBG8k{C=kChiwX zb#(Q_6h8;kVBa>wGwBrm1d95XP`j-5M*TXj`Krm_nf`g4e#d}^no%5A2IQiiQprsd z-L}pw>-t|1n$~-j;qMA)ZkW~LN`8j&sBbCdtQqcIO<&*2e<*y@T*$2PbfLd(UXhgf zuJ-3wfBV<(CLWa6`DdFq@@yjwPbCwUN+ukQ)bZbP_&WYjQ*peM3r=IYQ8~u{2H%J2 z>?ytv3n>b8p6|at-FLyeg~PRqbeI$IQ{2rYzj7?xtim!7D)7p=PSz?F{O1BHX81pD z-O0^xM&yKxL$g#@PdR+s%(#O853c;9fM$otHqPg6Lo(W%{K9@mRC4$7S8to@rB3Ea zIX7xyzE3%RT|hHgl8^IwN>)UBc1|1q;?yo2r0?T$U9{e)mDphLKGG;u@E;*1L$3&@ zq-02DM8jLH5iGx7zBjJr@InKomv+8s;*;;_e{EI|;y7fDTJ7lQNVQ7JkvO50ADP!f z-;O&pI^5hrH{jhquc@9De!eDqM}7wo-vGK)d_w`1Fzev{u>DZ{-JXJWj_JKS>4&7d a@>6Z*%P!;JT%DY+xl1L(6E94 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/InstanceSplit.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/InstanceSplit.php new file mode 100644 index 0000000000000000000000000000000000000000..7812488cf0b9f2ad76efdb95a2ba1d62b9a487ed GIT binary patch literal 1241 zcmd5+O>fgc5XGf@tprr=fk+k7P>Pxqa8S6Vw8%-^%2G(I*i>p|DRP`mx{|xQTCXb= z)PKQ=JAaZ3jO{dSXi+)hgTFNI&6{~M`{AQJmgFVuQ%+T+=@>?5ppPj?CA5e|0;6m) zp$cMgB3VL}1<>h3uOEQZaf25KO+}_++JvbP(}dRJL}cT-%6R>>QD;2W5s&FGl?l^U zK}raZPG~Bln8Lo-`b2d!j&v067x=K9a1U1cLKW* zx?EGmqa^ImG*(P%p*#$2Hm6k2`N2_!CJlQ7swM?r2YNfeaMp}jG z7MgCIHrBrx3w%nc{*uAzh^u4Yd4DD{W-?js{-x~&po-_R1^F62S?zv89<&Ie+uWpI&+JWN- zD~9=+gqyd-4x9tm$4o0rtt0Xb+kBIQEpwrOVr@L*s8-I#h2?0`R20VpT81YCS|~@` g#eH93nqM3zH;PRHq)$ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Job.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Job.php new file mode 100644 index 0000000000000000000000000000000000000000..5432791c1604bd972e2bd94f94ac6a54f677f132 GIT binary patch literal 6807 zcmcIp&2t+`6<=AlW3~Jtx086H-DJnwu(5?bBFa_~6r7a4Y#bb0<&P8vs+t;&+VZSN zGqW=zIZnzPC@w5iap1-uz=b2lpTH$>f(xXIf&(Z1gq(QYJzt6?TQZQUSkk=r`n`Vd z_ddGkyU(m+3wlpQy`6mdey5czEbF+coAQApqorbQdqT?zqeB9R@Su-?OQ*`Y$SiCMC zDY`>I?jr9|$536(G(;+}Yp7&-MdWKz-uspbJ6soiGir3xu;Kca;S$?W^m>Ijs;ybB zY1e?YP-qc1a20*ByyB^)%V|gAGPki%xM1YE=-M3;)h>!QaXYs0gxO6OI1j$n`#7m+ zY4xIEnA8iV;S>ttp28&t36^z@8185?8yeA@C338EHPaqVbXx((AMd+Li;O0?M?5@@ zw7WgC<7!50cvVrr)yt;Q1UQ+-HRY?Xhzk1ud-(&>wsgqCYufSs$NMj|>u%yDF`A~m zPh9HA5x}*jwCgV)*5RXOLXw^hZ@VWss@S$^w4l5gU}k;SqE&0OYzUIP(&4hhTO5cU zXi&^trET?>Wp!okspeIYVzU_(jSVQG%R!pcqoO+dr;o?9+Ha+RNp`&?@wk`zai2VPq_$>wEGzw3x(x5K;{o1dz2~uNN;}tm zn1c`5VzBn;>0Wvd&G&#F0yJj^0R2D#>x$57a!n6~9^H>!KzDtpafZyVV<=U&2~-K_ zk9*{+4ge8LXwp(_K!6YvW6O!sy?++R-WLUYn?i+~46$}3=;ApL!&wxE)+~$xb22Y@ z96jigfUOjVW$*%;1YTKd3URhJdw2`YbfNu14=1u|=x4$>(55o$Xl9eRAnF^oipFW< z?==ezFe~#FN*!8s&BzL#sdQggntH)1YVj0KqZvil%~QFpIS!N!ZY!#B~ia|}i_iB4e9@;tVWQlWmwg1%1h z=V%-}?ts(cm+cuZqB(=Sa^;9B8qq|Cpj3rviTH7(NZ=qWOy} zgHOUd!t-ccv0Dykh(oed9OGpaCq@^bMj`XDzk0M^NL8czQn9I#s!kMJW=pWV<*D#K zf#MKL>i>wY6pD8s_ZhG#Uz{$`;>QJOybRoNPWS>%>Pmy?G)~lv`+dy-71B0is~WC- zhM%IO5>Boi7x%?L>sj_+~Qx^-9;Pqra?aK%L4O+HuYqG;i4VStxv=mQY zE;Ti@6nSN7HsMl<;iPV&8*E>uEg+C!agNhk28Sb8ZktUFdb=$oL)t8wRRxL0Cw~r#Z$oPMPaI)^A#o_dPtaUApz!R!32IsP$MFsl z=u{6;<3Mf70kd$MSyzA1*Sx?Jdj!tl1dgxVP5~ut0+y~SoeN2v?xdxcD4@88AUK?4KMLwbKnRM*M9@xGnsbW`O= zg4`Sb>p8uM03P^zz88y?FiLqPBM3z1A8~{)`Wxq>#jv#WzIYFP(r2g&Btf939MQUY zX*t4=&>X#7fuR60lvfDa`7Rd%Ezv?WaizdMnvZA!9Jn3cPG|Fvhr}K|W{%ZEGrwQ6~5W2;(8eFPn3q56Yr`H*uQmdn*@ z1qd;iky0UHqqwyVPsd;wnGc`t9q#OG?QEvvy^m|voeF(C-n)3YxKplf(`6>|U(cd( zXg&`9dkiJY{s@h~(Rcd+-J1&2cYU_VcrOL#&&u-`#eayQDSs5k z{YM9%?8l^k=t3?&PiORZMelgjvymY}a2@ae70?x&Vg{fqp!++y0$o4-5M2}+Y%`DY zs|-)@TN)xVA*S;9TWHFc8ZtzGgslY!ive2;=tFMp)dzVK0bKU~3%I{Qn(#xzfHdhj zQCw93ehwkJjS^ua2){W0lmL2D9%}z3m;+af;e((qd8(qsE6k}dbDm~KGY9T@ z0`1^b{QDTf2QZS+hjeCyivc)$<6xTg?7GO}TNj*AF5&d*&vRyRCG%_~2hxGD*E+B} zz45k)FU}u-E=tF)YdM8n?)3E33uAEOL&tXhUS^G6FCUq9yHrDqFc0_vk9LRB)N`{@ zqi;fLu^+B*3co^P*GDarz1)Gtp^bqhR^ti#+n9tZ@0yPu1ecqu{EbKC1qmHHG_}vm O5yr`1Vw|IMg#H6jHLAJ* literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/K8SMin.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/K8SMin.php new file mode 100644 index 0000000000000000000000000000000000000000..b596449b57ebbc28f44331d297edf77960eb90e3 GIT binary patch literal 4262 zcmb7H(RSO$5j91LriP+qA$G#pIVlX=wcI#lLdT6w*-lAHmK8@fkEpn(IXnjk1eVlB zAQoCI*f2Tzi9YtF-_bwt2lNB_+Pvj8Po3QbC{luB#}6_H%)PraJ9B6D(O2PN2sg|f z5)keP;+g%4DGrGlaweF|e6t@9285d~8->&-ylR?TFU=P(56tbY-Gl20jabZG(lCdN z4SiB`eHME)9tX8?y>|27sh>`x@IICf&bm4kxc_CsN>TgapRB8f#XL6q33M}ao`Hd z0#gEB1}@pSV`@%mdoyI{=wmb8Nk{sQe)o0*L3rT!y)6>CoQ8t&4w^O^Ln5XTlW#We zB+E)VIxsi%9vh8wn|y2v9+TPCO_LK5^I%i$TN0d1pL!W_YKFA;loH=-kwa%p8E-UB zy*ed%6Lg;>2bPIaq4@L(O&o7}-qg>hc>EjFoymRPhJSqo*WY^X#(UbNs#2qhsZkx* zuYQ=|oRHRdvL~G<)-Q{&+-8ArC?=(`0*f+lDmgQ^v1}NyL`Tk$R2JmVR{p=u1>+%< zv`@CnJW^T5FQxh)su`D6+9w z`=kQOhpU-%SRj3Zn=WITa}kFLr1VzEJy_$!@$g)y>#V*NWB_<1B!L&%EU2uggLxlT z`%Xk`l?!&vX{D_E_!6KWQ{O{n7_iEk;{G_(hn6(kMJt&IdF$UfxSV-3+feZ7h+=?q zD!}(M*|MP3Zxn7j5PV`>f}$J7HuZd+x<%tdSWm+zzw{Z41SVl_qj>dGD9vI^kUt`m zqyWmWGjkXLelwoHYD8QVG8=blb23o7E!F>+N!wMX&&i}qeBz?2TK~ww`nk8pCKNQQ z_PzB9R{O8bTW~|a#j-^u;K>pwBvBQMxu$uHzre*Y;Ss8Sq7}7Yn|I+)?*M(JVb*;p z&)3|%6k!g!sY=n-C4Mz!hgvA>%bV@5rJ zWikrIMCpm#cB!7NecRG%i}Ev@xCi-Q5TVLS)7M+Q#p3zTT=OR~0? ztR|G_&G1B38mRu3*6e)h%C0m+aSJY;Jq65*<@ETpQY~BmL`lnvI95hsL_8XgR9UUo zKg$ex7PPvjaM*<*!lBDn%BaiBx(kKm>-%8r;dJ=zp8f5MZfCo_`*e4E>(T`T7529G zUheh#h<**dTV_!AY%qV*is&K$Ai=*R965edf} zN)i=~D^S+O$3i(0Mo5N@-+H|OOS-RFa3z^5ZIAfQ#74ON_$@c8v zptD0nQw_F?8cXpj0O5ux?J5R(4#_T#gLbE@tmX;6fW;vXT^vN-JVfp6ciMBP)(U`{ z8f;Zo$55WzoD{A36wetASW#Xc;+dk{s(I^8Lz^UfrtEYCC7qO8DHuB9);)kzt1OYk zxpAg#Djw@5teuI1+Nq?L#h6gv2RL;&!vO32qRd;0!l_bKlkdRtbi|P9l3qb<9GT?N zPRl(nzv^CW`^?3=&9q~w$>enoKBQ@8<%{gdOfq0PvKQ992%N- zfvbN7wkIp06TQn z9$Tg74$$fW6IXSh&wmxL)R*7vMFP3YAr@6XL2;JUIt8bt|UIt#S< z1aECPX&7BhP`U4@_EYk7QcJ^)@6yMU8V)e~I2_|UHOk=QNzF}Z@U4E9bI!@n&9C2W z7P*nJxE@51P(L7<_j{%jO)Wc6MX914?v)e&{8^6A7sw%`@Mbd?R&rX z7QgsqI0(^AbDsnxvN>_h?#Sc=Vulgr)SQ%Eo5%EhD#09>pYkx@ks)$5C)!+AS1}(_fvONVP(*(+UDA zqCf-IY@YjcuHw6ZJHAH(emTrTkN9qz4D6vtqsu`b+YtD{F}M5Va=;^^GwV{`9nqM3 zLI2`MWwWlcLjxDmi3Z;j|Hanv6Yu+iAx1pD#AQxc{)_}JjgAQy-d{q=V;c0KSOY+H z4nn~Jm&>TMP5Jzt&LY z-CTq}P%<^iS2YMhZP+NUYM>o@KxCp$6myk7&TRBVF<4z)4O(C=BjC%Fx4@-7(c2$p zwj-U`ddtXesqED|H}#G*F`-l^Nl`7do+os&#cHRXrrmNbHG_4KZCc4@o|2(VDU0cx zdc!FHJaOtYO&l$BL+g{Y4>VeLb$00eB%J9!Pf|b$RQ3_xCp;nlBl2|&8G=7US40Of z3T9!W*uMFyHS@Z)hCULPrw)XBV>M`1^#ob@rht|odn{GO5?%MuTxdsd!;{+ZG;R2O zR1D!#Ee7qzm;o!UVvLYn;`D?B#;mXmFQaR0K+i0f_yl^YaRpWvDqXblh9xWn_9pl) zDkhDRfi<%mrN)|eXd*ppiC1_Py%&(@+{&CRtSMF~TG^F{CZdVEmk%9YL5o9Ztk9x~ zMFW2%9bUlK&=qLhedTK9uS;klISay*y`R}vtyz2>&BmT9p~bdbSw*O?rVU^ksbyAe zJV0~4-6cMQc!?NnPK`nBv6S5lcr;S@N2p|qn@ZQ*p;i68{uH4x~-cH?B#mZYAooOq-_i zv696NgodGG*^WaPGZrQCMlSMM=(MC12IfDtpTh(QTm}Q36)BpqfFhkZg4%XQMg=ro z#Z@#f?gZG?cu%VSFj1XeX41bzZE3HCH8ci>xDJ@2FcCC!+k;V=8Sl&V$~O_l2qlI; zMe{@I$I#ylECC-S2Tw%fnUukg&?Mf3a{zvT zmcadJ6iQVmWMr%eAKIV1Zrw!d^6ZmSrfo@Cb4LK^7i5Hg1`MVy)B@WF#t&uG%v|I3 z%|8J--02{5@?f}?A$8(7^~8oMy|5G)M_vTh($wN5{Y--(#{4kcj;MRB^|~v zq^VOb*g&O-h#c``mfisQ1y#X6mp7~?KxTYA{f3p80-ERp+7$sKu9YD-6I5$*TSoIf z?OSo=8SAjBxv-2D8H9$xNWrY|1v7qpZj6DhGpGfT3U;q2Cj61{iP*;bXi1ltm@%M> z8=c#*QEF6kLz>XDF12F`QFd>k#elld&!A^G@U$^Dq@ML$Jzs+4u@;14SnG$e^@76N z2(H+T0~cy=WVs%*yFT>1yV8@nSFHk&#-ks6Qz$@NoR_o;=X?gcItI`*WIu7zrSctA z%CI{wp;?i^vg_kTbQQW%tlDp}IkQzLH_-JrdHh|NCjU?C>#36iJ^*U?HAIEgU+Q1u zy06m_){>v&x-Jx0)4#^)yBF3V{pAyQd{ij3O?1PW8n(t?=20=ZFou6OgG!k>2zPGh z-b_YB_xtkn0iyD!!arNGSO4Z8|Ni~V2ycnk`b#lfZKrNmGwxQ;y{u-utB$|g#`oWe zJ)_YHk?&?!pM?Kb9A5*Pl*Zs&xre8*-mZ@8)hhnO3|gF+q;USIFd>r!Ccj4B5LJU& z<~WX*d0?Cea}VA?kA zm=Dx(+rL7q@D9nV*7jmj--qHO(_!JOO*IRsCyac)^r?LA!3p9cS{#Jk n`|@vh4hn?Rd$-d!@2BcxQs&!}XbGN^^W8~Gs_#Q%G)CyZ&gG&m literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/RevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/RevisionTemplate.php new file mode 100644 index 0000000000000000000000000000000000000000..3a7cabd458af03e96548bc304d473e2eab80abbf GIT binary patch literal 2426 zcmb7GT~8ZF6s<$U$2bt;6m>%i8UkvJTGooIw#bxJHeZQS0s_QCRrxsymVPh!zLuWlhk1ELf@Nu|zG zCG;1<@D;|bfK#kA(ePu9D~}7VISKeXC}tbCNuU^r+{CtHK{e!t6T*?8th|n`W`bP{ zB^1Anvz(3-KfsITOQBgLNYLD6ibg!tGCBrmt=3_B=wkAh@_HIJk>hP#wmH^nHGCE~ibJ0<^7a2BWH-^E5KIT(RA2*)!v}<+WA2w+p=D9qyH8J@q z`sW_{?lT6t^w5G`GxaV^z1y!YK1vlx$YBGlwRZ3qSMtO!HkI4sB89ByLHfoePo*}c z(B%|rmI{Wm;-_BN|3CR}2F+jJo6?VHI$KMpfD7fB#_GTI!u$FXdYt5MB_Va?!p>JR zdTAd`2BgIT<=nv&IQJ)xsPV*=uoj!}^aA(MTTLOByg?5Ep_ z)knlJ#TuGY6c%1|oG+oCVs-7KYNr-!v-ugJen>q+DO1XsH1y?M`gus}24#sAG^Kfu z$yhtnhV>|8WzBH2!L)>L(0#?CKBp{+CS#$U8RNcjr3zo~1q;?X5e8mQ(4TO8-EnI9kjc|ayi2V^W zr9H5M#!&>?1Lr;{-nHSj(7nt;D7x#+!@r7EoSXEi_4*KSmP`=7nkz)>OKQdtI+9f2 zJTNX)a|QQ?g+k^q<|(yqm^Q?V8zEFT*1r5xc-dk)C6n`~hGhxOD;UV6OQhXSPWixj z2+V04=m}crG7{*nN4tz(cs^I86)@lVYJ}NFvqJg|PDa2eJW|eriM*0q+-pFdra&8_ zf|fdA?7frl)PYleEPQCuU=+$3hI;YE--W{B1}cv2dZ~yel6f!(rZkK0_DK*kI2~|r zYIimZi&Zp#eVaeUX<)SMeKe`Y@91kdT6rZl7OtNr^MD)|-mKegv3JkhypA-VUtnO9 nk1(+aTU+LPYtroY4^M}W#`pH+9((9N_{bZieTpy9B|`rLeb^TP literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php new file mode 100644 index 000000000000..0134f596fa4b --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php @@ -0,0 +1,143 @@ +internalAddGeneratedFile( + ' +‡( +!google/cloud/run/v2/service.protogoogle.cloud.run.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/launch_stage.protogoogle/api/resource.protogoogle/api/routing.proto#google/cloud/run/v2/condition.proto+google/cloud/run/v2/revision_template.proto(google/cloud/run/v2/traffic_target.proto)google/cloud/run/v2/vendor_settings.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"® +CreateServiceRequest2 +parent ( B"àAúArun.googleapis.com/Service2 +service ( 2.google.cloud.run.v2.ServiceBàA + +service_id ( BàA + validate_only ("³ +UpdateServiceRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA2 +service ( 2.google.cloud.run.v2.ServiceBàA + validate_only ( + allow_missing (BàA"† +ListServicesRequest2 +parent ( B"àAúArun.googleapis.com/Service + page_size ( + +page_token (  + show_deleted ("y +ListServicesResponse. +services ( 2.google.cloud.run.v2.Service +next_page_token (  + unreachable ( BàA"E +GetServiceRequest0 +name ( B"àAúA +run.googleapis.com/Service"m +DeleteServiceRequest0 +name ( B"àAúA +run.googleapis.com/Service + validate_only ( +etag ( "¤ +Service +name ( BàA + description (  +uid ( BàA + +generation (BàA= +labels ( 2(.google.cloud.run.v2.Service.LabelsEntryBàAG + annotations ( 2-.google.cloud.run.v2.Service.AnnotationsEntryBàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA4 + delete_time ( 2.google.protobuf.TimestampBàA4 + expire_time + ( 2.google.protobuf.TimestampBàA +creator ( BàA + last_modifier ( BàA +client (  +client_version ( 9 +ingress (2#.google.cloud.run.v2.IngressTrafficBàA2 + launch_stage (2.google.api.LaunchStageBàAK +binary_authorization ( 2(.google.cloud.run.v2.BinaryAuthorizationBàA< +template ( 2%.google.cloud.run.v2.RevisionTemplateBàA8 +traffic ( 2".google.cloud.run.v2.TrafficTargetBàA9 +scaling ( 2#.google.cloud.run.v2.ServiceScalingBàA! +invoker_iam_disabled (BàA! +default_uri_disabled (BàA +urls ( BàA + iap_enabled (BàAT +multi_region_settings ( 20.google.cloud.run.v2.Service.MultiRegionSettingsBàA +custom_audiences% (  +observed_generation (BàA? +terminal_condition ( 2.google.cloud.run.v2.ConditionBàA7 + +conditions ( 2.google.cloud.run.v2.ConditionBàAB +latest_ready_revision! ( B#àAúA +run.googleapis.com/RevisionD +latest_created_revision" ( B#àAúA +run.googleapis.com/RevisionG +traffic_statuses# ( 2(.google.cloud.run.v2.TrafficTargetStatusBàA +uri$ ( BàA + satisfies_pzs& (BàA% +threat_detection_enabled( (BàA; + build_config) ( 2 .google.cloud.run.v2.BuildConfigBàA + reconcilingb (BàA +etagc ( BàAI +MultiRegionSettings +regions ( BàA +multi_region_id ( BàA- + LabelsEntry +key (  +value ( :82 +AnnotationsEntry +key (  +value ( :8:^êA[ +run.googleapis.com/Service:projects/{project}/locations/{location}/services/{service}R2Í +Servicesý + CreateService).google.cloud.run.v2.CreateServiceRequest.google.longrunning.Operation"¡ÊA +ServiceServiceÚAparent,service,service_id‚Óä“7",/v2/{parent=projects/*/locations/*}/services:serviceŠÓä“-+ +parent!projects/*/locations/{location=*}à + +GetService&.google.cloud.run.v2.GetServiceRequest.google.cloud.run.v2.Service"oÚAname‚Óä“.,/v2/{name=projects/*/locations/*/services/*}ŠÓä“., +name$projects/*/locations/{location=*}/**Õ + ListServices(.google.cloud.run.v2.ListServicesRequest).google.cloud.run.v2.ListServicesResponse"pÚAparent‚Óä“.,/v2/{parent=projects/*/locations/*}/servicesŠÓä“-+ +parent!projects/*/locations/{location=*}’ + UpdateService).google.cloud.run.v2.UpdateServiceRequest.google.longrunning.Operation"¶ÊA +ServiceServiceÚAserviceÚAservice,update_mask‚Óä“?24/v2/{service.name=projects/*/locations/*/services/*}:serviceŠÓä“64 + service.name$projects/*/locations/{location=*}/**à + DeleteService).google.cloud.run.v2.DeleteServiceRequest.google.longrunning.Operation"„ÊA +ServiceServiceÚAname‚Óä“.*,/v2/{name=projects/*/locations/*/services/*}ŠÓä“., +name$projects/*/locations/{location=*}/** + GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"E‚Óä“?=/v2/{resource=projects/*/locations/*/services/*}:getIamPolicy“ + SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"H‚Óä“B"=/v2/{resource=projects/*/locations/*/services/*}:setIamPolicy:*¹ +TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"N‚Óä“H"C/v2/{resource=projects/*/locations/*/services/*}:testIamPermissions:*FÊArun.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBT +com.google.cloud.run.v2B ServiceProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php new file mode 100644 index 000000000000..2b1ce742f014 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + ' +Ñ + google/cloud/run/v2/status.protogoogle.cloud.run.v2"; +RevisionScalingStatus" +desired_min_instance_count (BS +com.google.cloud.run.v2B StatusProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Task.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Task.php new file mode 100644 index 0000000000000000000000000000000000000000..a2051a018d3e75233e1f79cbea99baa688115784 GIT binary patch literal 4099 zcmbVP&2JM&6t6K!@G}Wy`N(1*Yyy-d1zR$eK&C0ON%$yVX%gj7Sz4`kC(e-d&UR z!1W!@t#w4h8?f*%j9Wf+EiN2^|E^JP(|`)<`1Cc}yl8DYJ|_tLPjvA~Le%%G`W%tW-xg ztvPLDt@eSDi!SJUZz(2ja_MHA-@CFGy7OfE> zXwW_a%~|v;#h6S-GCqT@Q%n=#bi&~sUk%;n8pcF?h^Z>bZ+%IVkgj`P7QqiOr{}Vm zlM#3Wewl*lk0-NnM(>wZvX?R0%iU^eDgikm#VR0!O{ae8O5et&j3~R6gj6DMp-&)6 z;wIU;nrx|)(z4>F!I22f3=-PD%gY@aBqH;JM7rvpZJu0oBAPm{>K4|5ikIAGvY)z> z?Thrv5`mP6D0C~b8pK?0%-)BIM?}c7wo1N@@tTcWa9q|!GiT-I3XLmo>&M>JFTj*! zR2z(B@-i0RibTzRmxI&KC|4?Ys-ps;_EsS-?ZAL&TVa5n1XvT9BVBRxc#RABc~# z^uU;cQvul(cHe2zg2L?Y<8WL_Odg;l|F)htPD4JXo-(!2P%BdaZQZgk%apx&y-|Zv z-)Rw_qq)+Q>xY_Bex~G>0}<_M>=G26{pxCtCQR zR!gatG-%3Mp6j#kzyx=)ZsO*I3YF>flKabI89SL4Gj76Im-#W)ck`42 zTpS44P%_3DD0ZA(8z+Q_BH}a}H)1Tnn2ahG3v*J@k)>J|SZVK(sm4jvr7p1@*JUvl z2t#^kJce_b(>4jZG-5$V){nEeJyD$>XjSI=@;<;Yp%@Y5!KFTSO7k4zPo(iI`Oz($ zo992yj~3HF3(l~Xv>WrFFU6-&b&}!+jL^U%yQYb2BN}xU#xzl$d0~I`F`U6cQrM0V zq!S9{lE=O|103su5wlRfhiDk(JPRj^!z8Fl5` z9iAx7%Ju_^VNb~(h8lE3S6&6-+`O!87#uMhp<7o{nQuO8+i^rqOC72zUI^g#1Mq515Aq9xJztldE}6oi;Pj;}U739jC378 z*6pWIJ9al$s>12_3+jJiYCHeb#i8BO*ub24g#_@*o8+rk@tLcK=gOP(vsb}-fin2p zt7M6R3)y#1J!Ei2Ho4wvF4wSN+Wsg4kWyAe z4hTtQv(Nsjs|n@%KmY#m*nMMBzUtn{k!3L>ccG8e1A@J> zo3s67z9|h()IKpigv`G9tDX!(2aMIT(Gko|ZoBmGx4Q9R5BQ^A-V!3@wMu1YXXpKN zcVe-npTM_5-w~TE>NLKFDQvcb?x9hT9IwbX=SuFIdCk6_`_#V=;d(Z>;7n>z07XSbN literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TaskTemplate.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TaskTemplate.php new file mode 100644 index 0000000000000000000000000000000000000000..253ebfc4ce8ef4cce225b0099c72937e939ef6f7 GIT binary patch literal 1725 zcma)7T~8B16t$utgCDVmSW(F!M%qMoV|~yR(X@bQ3?BhPqS<6KoxLp+wlkZV*~Vgc z_h6#2JI@ot$H`Qen_X;*kgs%%<^NwFwnk0Pk%6L5?3rKAer0*;WP2o`iT`Zt(ny@qds4yb` z|Izm=b-HMK4$R;||{X5LSLpX8I~laZoFl9pU~&!jZ$Y zrhYU_<#{sKV_!mSU@ed~MN8GI?=O{oGGj##RB9_%@Ta-@y`j?Z0^TsmT;~C~WkB}@ zhmdiuQfVt!kvN$RcycsAbVkg<7A$mQOUn;^L! zBu?)H29+6i){|e&WwPW%PI{&g#b}L(i_l-s22?;!G^0OoX`JnSZEc&czCq2*C3BPRJEjD%tB7^2E` zl)L7z?@QlGrPeH&DUxYXvKaoC-1B1tuFQnYc_=}PYIYQ3&h zP(OwT_yWF;C&qS~HngZb;s@U}=ggToGyDF7JeKGM?omz^(R7BVXILLoES1nA5D}gx zVMrAY#EE1PRTjpb0qzex>~vi3IY48PsDRe-T!?u@t3f1^Syd&xdRnV$MZ%B;6HU~d zYAYi}h?5f?XbtG)y}I zUGQD5sp2H^J2VaylUk@Dgx2d&+OmJ?pK@i9Hl<@BF6SES^=l%VSgV9y&5p66I#Ill z=}rmGmv8$JA>%|MS<3^Vu9hCY+DXkerKxc1h%0cEWq>?jfe_$s&uIJ1WCD|*Ue_%5yi z$AcFBWj{mPX~LX~NETZ#qt($O&U}LINeY9>b#Waao908buF1T(k>YoL8fa@J;~2&$ ziT^*Psq93t;$|v)@4JDvS7iUuC=2a*BfHym+Y`?o^&D?v9~=zYw&xD|6YulTnSAPx zhfdq=x=yEX$E={2x5OXVo-_6ehWQHlrCVZ0&Y?SoOog@95qb)4++=jiTqz*iuAy;M z$w%m7GQi2X$W9S(77h|{T233;eR?-LM&6Z{gZnz)qAN@H*M-X>^W8W{=Lr1<&5@7> literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/VendorSettings.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/VendorSettings.php new file mode 100644 index 0000000000000000000000000000000000000000..f346e1785e73f5800d77679f4fcc8c7e1d5725cd GIT binary patch literal 3198 zcmb7GTXWh*6b|4x@o{1kITzwIjZBgnyD2p8B-6olI|5{f1`7(9)E%apMJ!l}SZQ>j zaWa1BTmMSmI@ABs=g#ykKf%+7o?QuS6FYHvKpO2i-=6Dt&NtsVdk)-}w%wjha4>#rpAs*{G25FawYmkmM~0^D=JQ8h z9f6#sTBlJ0Pt_8k_~KhLa$Mw95V-O*e4Y3f) z%VGiNiX(Yx1Ey&o;k{HGHRskck?09qvg6D6n=0fBiNBSYR0D}o{}L9WF(;ME;4pZvl8gXLP{Lp9zh+22(!ihh~JI z(m#lRg_cW;aI;k_>grZqZ8Y>9tx;2p<;}8MN?wrWVOFVB^k!Yz+$_oYjOPf;@y&$ED;|pA&-qGVpw}XBy&ik;KsD z!Zn!Zs0jH+A5gTgn{L2-oeoV8&1@LR4y-TT18HC~Odd8Sw!d!J0Sk@37zUFIkk^v} zJldf^T7}sLb%&-wx2d-$J%uUcw7n=%nM36v+>dhPg<{^MXIwA+dmQE>oO9duJzViZ zKlFj!r6Q}+($HmZHd&#AGWQhOP03Va#fc$T8x zM^fkzY(H_Bx_ESeT|*h^SX9TBum^ln>Vbpv7Ws-NFzitYbH~|?x;meIsY?Q2+@>FK z<|rr9&v1jXq3POeK$))(iEHx9z0_sFjrmi#@mM^w>XCM9q^vUE-4DwZqZ750jtLS? zJ2Q56aUE`-sV~h!;uYNw6D3`Ri$h`sG-Qr^{Oj22pD~y#GePoAm-LWZkR|S5`3ky> zm~o2F3s`X?7>+$-etX9?3 z0(=|_89&6(D_<2 zzUshTl^O27!|#7i_mO9#a#qBGC4C8xRIOOwtqDV(tGjw#ZB>id_Gp(<6p!~tQ4M9d zt(y7*ZMXuL8_#x{rRoa}+2P+f+`?IYS|Jq{POgb!Z>zinternalAddGeneratedFile( + ' +þ& +%google/cloud/run/v2/worker_pool.protogoogle.cloud.run.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/launch_stage.protogoogle/api/resource.protogoogle/api/routing.proto#google/cloud/run/v2/condition.proto(google/cloud/run/v2/instance_split.proto)google/cloud/run/v2/vendor_settings.proto7google/cloud/run/v2/worker_pool_revision_template.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ä +CreateWorkerPoolRequest5 +parent ( B%àAúArun.googleapis.com/WorkerPool9 + worker_pool ( 2.google.cloud.run.v2.WorkerPoolBàA +worker_pool_id ( BàA + validate_only (BàA"ã +UpdateWorkerPoolRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA9 + worker_pool ( 2.google.cloud.run.v2.WorkerPoolBàA + validate_only (BàA + allow_missing (BàA +force_new_revision (BàA"Œ +ListWorkerPoolsRequest5 +parent ( B%àAúArun.googleapis.com/WorkerPool + page_size ( + +page_token (  + show_deleted ("i +ListWorkerPoolsResponse5 + worker_pools ( 2.google.cloud.run.v2.WorkerPool +next_page_token ( "K +GetWorkerPoolRequest3 +name ( B%àAúA +run.googleapis.com/WorkerPool"x +DeleteWorkerPoolRequest3 +name ( B%àAúA +run.googleapis.com/WorkerPool + validate_only (BàA +etag ( "Ê + +WorkerPool +name (  + description (  +uid ( BàA + +generation (BàA@ +labels ( 2+.google.cloud.run.v2.WorkerPool.LabelsEntryBàAJ + annotations ( 20.google.cloud.run.v2.WorkerPool.AnnotationsEntryBàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA4 + delete_time ( 2.google.protobuf.TimestampBàA4 + expire_time + ( 2.google.protobuf.TimestampBàA +creator ( BàA + last_modifier ( BàA +client (  +client_version ( 2 + launch_stage (2.google.api.LaunchStageBàAK +binary_authorization ( 2(.google.cloud.run.v2.BinaryAuthorizationBàAF +template ( 2/.google.cloud.run.v2.WorkerPoolRevisionTemplateBàA@ +instance_splits ( 2".google.cloud.run.v2.InstanceSplitBàA< +scaling ( 2&.google.cloud.run.v2.WorkerPoolScalingBàA +observed_generation (BàA? +terminal_condition ( 2.google.cloud.run.v2.ConditionBàA7 + +conditions ( 2.google.cloud.run.v2.ConditionBàAB +latest_ready_revision! ( B#àAúA +run.googleapis.com/RevisionD +latest_created_revision" ( B#àAúA +run.googleapis.com/RevisionN +instance_split_statuses ( 2(.google.cloud.run.v2.InstanceSplitStatusBàA% +threat_detection_enabled (BàA +custom_audiences% (  + satisfies_pzs& (BàA + reconcilingb (BàA +etagc ( BàA- + LabelsEntry +key (  +value ( :82 +AnnotationsEntry +key (  +value ( :8:êA~ +run.googleapis.com/WorkerPoolAprojects/{project}/locations/{location}/workerPools/{worker_pool}* workerPools2 +workerPoolR2¾ + WorkerPools˜ +CreateWorkerPool,.google.cloud.run.v2.CreateWorkerPoolRequest.google.longrunning.Operation"¶ÊA + +WorkerPool +WorkerPoolÚA!parent,worker_pool,worker_pool_id‚Óä“>"//v2/{parent=projects/*/locations/*}/workerPools: worker_poolŠÓä“-+ +parent!projects/*/locations/{location=*}Ï + GetWorkerPool).google.cloud.run.v2.GetWorkerPoolRequest.google.cloud.run.v2.WorkerPool"rÚAname‚Óä“1//v2/{name=projects/*/locations/*/workerPools/*}ŠÓä“., +name$projects/*/locations/{location=*}/**á +ListWorkerPools+.google.cloud.run.v2.ListWorkerPoolsRequest,.google.cloud.run.v2.ListWorkerPoolsResponse"sÚAparent‚Óä“1//v2/{parent=projects/*/locations/*}/workerPoolsŠÓä“-+ +parent!projects/*/locations/{location=*}µ +UpdateWorkerPool,.google.cloud.run.v2.UpdateWorkerPoolRequest.google.longrunning.Operation"ÓÊA + +WorkerPool +WorkerPoolÚA worker_poolÚAworker_pool,update_mask‚Óä“J2;/v2/{worker_pool.name=projects/*/locations/*/workerPools/*}: worker_poolŠÓä“:8 +worker_pool.name$projects/*/locations/{location=*}/**ï +DeleteWorkerPool,.google.cloud.run.v2.DeleteWorkerPoolRequest.google.longrunning.Operation"ÊA + +WorkerPool +WorkerPoolÚAname‚Óä“1*//v2/{name=projects/*/locations/*/workerPools/*}ŠÓä“., +name$projects/*/locations/{location=*}/**“ + GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"H‚Óä“B@/v2/{resource=projects/*/locations/*/workerPools/*}:getIamPolicy– + SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"K‚Óä“E"@/v2/{resource=projects/*/locations/*/workerPools/*}:setIamPolicy:*¼ +TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"Q‚Óä“K"F/v2/{resource=projects/*/locations/*/workerPools/*}:testIamPermissions:*FÊArun.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBW +com.google.cloud.run.v2BWorkerPoolProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php new file mode 100644 index 0000000000000000000000000000000000000000..ed68845a192c4dcc9ab5b1d2a03498ad2ac46bde GIT binary patch literal 2198 zcmbVNT~8ZF6sg#rJoWDEt}$iZ((+&szUSO?KhB*WevC&k+QbJ;FhvXtaes=|!c>l99x>%&ymy4(9-ZR-z1OE30M#;4l(q0s%3;KsG?Gc!REcO#yyknU z&Y22gDWgEK3D;bTz_4)~K`z(kKuC}=(=nk8AN0D1%#e^6;vZN#e>bJ`j}zgad2NJf zM6|}gSlS-29_OT|IVbuRVfcxYe#9x(h8XzunCpNGZa9hf2Pkm|4@jgL&|QxmB!U`H ziBrIlpscZlGtM;jaasxB3w6D;OVAfQ^jK=RVuI58ZtBMZTg?aR-QJc z;{)8tG`3pTMDAdt5;mV5W5rCOMBD042`*-T`6a#U#N2<$Srm5Jh)lRtt=45#mn4gz z$1ET1jZyQ%^51Nq9CC5YJ0y2C|pHI>Q{xp>~eXUhsTsoiLmY z=_PD=W7gKR$xqPl2tEIw>s`B_0bT107kuGPy!wNjjl{gE@-}C7sBe@dI^Wjrn2S7Q zt1M(!Ia{^jV~xTX?Ba_1byll_t20^SVD<^u91^+FgQ-wRfmWgpjG9 zrO?ijrTyu@(snK>=D43DG>K_IC}mnZpF){cZ@rZIET$bBm5KTieXg0BaLQ7!OoVZ6 z+a_7b9$YIa4B>EDwX8V zI;&R0Hy=BjXv1#Z`B>*Pvr+A)0QrVZYi;ydQ3RwNId^RRxHRucR_!6gWyuM`SCgk# zUQ#``+e}<}adt9rcrF1&hMzu9`dqSdwfkD7kty|lbx`*!leLw#V)5T~# z_(xIQA^HNWSyp2AtHlPiXS7#&x0UrI^SSl-P};X0773nrxB+p$Z9n_Vw(H+LnVrt3 V+50v3+%0_SY-IKzU7!nu{sO;J)VBZt literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php new file mode 100644 index 000000000000..c0169d3c5d71 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php @@ -0,0 +1,160 @@ +google.cloud.run.v2.BinaryAuthorization + */ +class BinaryAuthorization extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If present, indicates to use Breakglass using this justification. + * If use_default is False, then it must be empty. + * For more information on breakglass, see + * https://cloud.google.com/binary-authorization/docs/using-breakglass + * + * Generated from protobuf field string breakglass_justification = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $breakglass_justification = ''; + protected $binauthz_method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_default + * Optional. If True, indicates to use the default project's binary + * authorization policy. If False, binary authorization will be disabled. + * @type string $policy + * Optional. The path to a binary authorization policy. + * Format: `projects/{project}/platforms/cloudRun/{policy-name}` + * @type string $breakglass_justification + * Optional. If present, indicates to use Breakglass using this justification. + * If use_default is False, then it must be empty. + * For more information on breakglass, see + * https://cloud.google.com/binary-authorization/docs/using-breakglass + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If True, indicates to use the default project's binary + * authorization policy. If False, binary authorization will be disabled. + * + * Generated from protobuf field bool use_default = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseDefault() + { + return $this->readOneof(1); + } + + public function hasUseDefault() + { + return $this->hasOneof(1); + } + + /** + * Optional. If True, indicates to use the default project's binary + * authorization policy. If False, binary authorization will be disabled. + * + * Generated from protobuf field bool use_default = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseDefault($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. The path to a binary authorization policy. + * Format: `projects/{project}/platforms/cloudRun/{policy-name}` + * + * Generated from protobuf field string policy = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getPolicy() + { + return $this->readOneof(3); + } + + public function hasPolicy() + { + return $this->hasOneof(3); + } + + /** + * Optional. The path to a binary authorization policy. + * Format: `projects/{project}/platforms/cloudRun/{policy-name}` + * + * Generated from protobuf field string policy = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. If present, indicates to use Breakglass using this justification. + * If use_default is False, then it must be empty. + * For more information on breakglass, see + * https://cloud.google.com/binary-authorization/docs/using-breakglass + * + * Generated from protobuf field string breakglass_justification = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBreakglassJustification() + { + return $this->breakglass_justification; + } + + /** + * Optional. If present, indicates to use Breakglass using this justification. + * If use_default is False, then it must be empty. + * For more information on breakglass, see + * https://cloud.google.com/binary-authorization/docs/using-breakglass + * + * Generated from protobuf field string breakglass_justification = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBreakglassJustification($var) + { + GPBUtil::checkString($var, True); + $this->breakglass_justification = $var; + + return $this; + } + + /** + * @return string + */ + public function getBinauthzMethod() + { + return $this->whichOneof("binauthz_method"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php new file mode 100644 index 000000000000..6c756d34055e --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php @@ -0,0 +1,388 @@ +google.cloud.run.v2.BuildConfig + */ +class BuildConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Cloud Build name of the latest successful deployment of + * the function. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The Cloud Storage bucket URI where the function source code is located. + * + * Generated from protobuf field string source_location = 2; + */ + protected $source_location = ''; + /** + * Optional. The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * + * Generated from protobuf field string function_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $function_target = ''; + /** + * Optional. Artifact Registry URI to store the built image. + * + * Generated from protobuf field string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_uri = ''; + /** + * Optional. The base image used to build the function. + * + * Generated from protobuf field string base_image = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $base_image = ''; + /** + * Optional. Sets whether the function will receive automatic base image + * updates. + * + * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_automatic_updates = false; + /** + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the Cloud Run function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * + * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $worker_pool = ''; + /** + * Optional. User-provided build-time environment variables for the function + * + * Generated from protobuf field map environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $environment_variables; + /** + * Optional. Service account to be used for building the container. The format + * of this field is + * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The Cloud Build name of the latest successful deployment of + * the function. + * @type string $source_location + * The Cloud Storage bucket URI where the function source code is located. + * @type string $function_target + * Optional. The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * @type string $image_uri + * Optional. Artifact Registry URI to store the built image. + * @type string $base_image + * Optional. The base image used to build the function. + * @type bool $enable_automatic_updates + * Optional. Sets whether the function will receive automatic base image + * updates. + * @type string $worker_pool + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the Cloud Run function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * @type array|\Google\Protobuf\Internal\MapField $environment_variables + * Optional. User-provided build-time environment variables for the function + * @type string $service_account + * Optional. Service account to be used for building the container. The format + * of this field is + * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Cloud Build name of the latest successful deployment of + * the function. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The Cloud Build name of the latest successful deployment of + * the function. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The Cloud Storage bucket URI where the function source code is located. + * + * Generated from protobuf field string source_location = 2; + * @return string + */ + public function getSourceLocation() + { + return $this->source_location; + } + + /** + * The Cloud Storage bucket URI where the function source code is located. + * + * Generated from protobuf field string source_location = 2; + * @param string $var + * @return $this + */ + public function setSourceLocation($var) + { + GPBUtil::checkString($var, True); + $this->source_location = $var; + + return $this; + } + + /** + * Optional. The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * + * Generated from protobuf field string function_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFunctionTarget() + { + return $this->function_target; + } + + /** + * Optional. The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * + * Generated from protobuf field string function_target = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFunctionTarget($var) + { + GPBUtil::checkString($var, True); + $this->function_target = $var; + + return $this; + } + + /** + * Optional. Artifact Registry URI to store the built image. + * + * Generated from protobuf field string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * Optional. Artifact Registry URI to store the built image. + * + * Generated from protobuf field string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * Optional. The base image used to build the function. + * + * Generated from protobuf field string base_image = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBaseImage() + { + return $this->base_image; + } + + /** + * Optional. The base image used to build the function. + * + * Generated from protobuf field string base_image = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBaseImage($var) + { + GPBUtil::checkString($var, True); + $this->base_image = $var; + + return $this; + } + + /** + * Optional. Sets whether the function will receive automatic base image + * updates. + * + * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableAutomaticUpdates() + { + return $this->enable_automatic_updates; + } + + /** + * Optional. Sets whether the function will receive automatic base image + * updates. + * + * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableAutomaticUpdates($var) + { + GPBUtil::checkBool($var); + $this->enable_automatic_updates = $var; + + return $this; + } + + /** + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the Cloud Run function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * + * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getWorkerPool() + { + return $this->worker_pool; + } + + /** + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the Cloud Run function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * + * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWorkerPool($var) + { + GPBUtil::checkString($var, True); + $this->worker_pool = $var; + + return $this; + } + + /** + * Optional. User-provided build-time environment variables for the function + * + * Generated from protobuf field map environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnvironmentVariables() + { + return $this->environment_variables; + } + + /** + * Optional. User-provided build-time environment variables for the function + * + * Generated from protobuf field map environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnvironmentVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environment_variables = $arr; + + return $this; + } + + /** + * Optional. Service account to be used for building the container. The format + * of this field is + * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. Service account to be used for building the container. The format + * of this field is + * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php new file mode 100644 index 000000000000..55c736e08086 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php @@ -0,0 +1,105 @@ +google.cloud.run.v2.BuildInfo + */ +class BuildInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Entry point of the function when the image is a Cloud Run + * function. + * + * Generated from protobuf field string function_target = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $function_target = ''; + /** + * Output only. Source code location of the image. + * + * Generated from protobuf field string source_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $function_target + * Output only. Entry point of the function when the image is a Cloud Run + * function. + * @type string $source_location + * Output only. Source code location of the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Entry point of the function when the image is a Cloud Run + * function. + * + * Generated from protobuf field string function_target = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFunctionTarget() + { + return $this->function_target; + } + + /** + * Output only. Entry point of the function when the image is a Cloud Run + * function. + * + * Generated from protobuf field string function_target = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFunctionTarget($var) + { + GPBUtil::checkString($var, True); + $this->function_target = $var; + + return $this; + } + + /** + * Output only. Source code location of the image. + * + * Generated from protobuf field string source_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceLocation() + { + return $this->source_location; + } + + /** + * Output only. Source code location of the image. + * + * Generated from protobuf field string source_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceLocation($var) + { + GPBUtil::checkString($var, True); + $this->source_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php new file mode 100644 index 000000000000..771e535b0e3a --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php @@ -0,0 +1,172 @@ +google.cloud.run.v2.CancelExecutionRequest + */ +class CancelExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Execution to cancel. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates that the request should be validated without actually + * cancelling any resources. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + + /** + * @param string $name Required. The name of the Execution to cancel. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. Please see + * {@see ExecutionsClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\CancelExecutionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Execution to cancel. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * @type bool $validate_only + * Indicates that the request should be validated without actually + * cancelling any resources. + * @type string $etag + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Execution to cancel. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Execution to cancel. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates that the request should be validated without actually + * cancelling any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated without actually + * cancelling any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php new file mode 100644 index 000000000000..93ca08a9f462 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php @@ -0,0 +1,86 @@ +google.cloud.run.v2.CloudSqlInstance + */ +class CloudSqlInstance extends \Google\Protobuf\Internal\Message +{ + /** + * The Cloud SQL instance connection names, as can be found in + * https://console.cloud.google.com/sql/instances. Visit + * https://cloud.google.com/sql/docs/mysql/connect-run for more information on + * how to connect Cloud SQL and Cloud Run. Format: + * {project}:{location}:{instance} + * + * Generated from protobuf field repeated string instances = 1; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $instances + * The Cloud SQL instance connection names, as can be found in + * https://console.cloud.google.com/sql/instances. Visit + * https://cloud.google.com/sql/docs/mysql/connect-run for more information on + * how to connect Cloud SQL and Cloud Run. Format: + * {project}:{location}:{instance} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud SQL instance connection names, as can be found in + * https://console.cloud.google.com/sql/instances. Visit + * https://cloud.google.com/sql/docs/mysql/connect-run for more information on + * how to connect Cloud SQL and Cloud Run. Format: + * {project}:{location}:{instance} + * + * Generated from protobuf field repeated string instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The Cloud SQL instance connection names, as can be found in + * https://console.cloud.google.com/sql/instances. Visit + * https://cloud.google.com/sql/docs/mysql/connect-run for more information on + * how to connect Cloud SQL and Cloud Run. Format: + * {project}:{location}:{instance} + * + * Generated from protobuf field repeated string instances = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php new file mode 100644 index 000000000000..e15712d24b3f --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php @@ -0,0 +1,337 @@ +google.cloud.run.v2.Condition + */ +class Condition extends \Google\Protobuf\Internal\Message +{ + /** + * type is used to communicate the status of the reconciliation process. + * See also: + * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting + * Types common to all resources include: + * * "Ready": True when the Resource is ready. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * State of the condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.State state = 2; + */ + protected $state = 0; + /** + * Human readable message indicating details about the current status. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + /** + * Last time the condition transitioned from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 4; + */ + protected $last_transition_time = null; + /** + * How to interpret failures of this condition, one of Error, Warning, Info + * + * Generated from protobuf field .google.cloud.run.v2.Condition.Severity severity = 5; + */ + protected $severity = 0; + protected $reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * type is used to communicate the status of the reconciliation process. + * See also: + * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting + * Types common to all resources include: + * * "Ready": True when the Resource is ready. + * @type int $state + * State of the condition. + * @type string $message + * Human readable message indicating details about the current status. + * @type \Google\Protobuf\Timestamp $last_transition_time + * Last time the condition transitioned from one status to another. + * @type int $severity + * How to interpret failures of this condition, one of Error, Warning, Info + * @type int $reason + * Output only. A common (service-level) reason for this condition. + * @type int $revision_reason + * Output only. A reason for the revision condition. + * @type int $execution_reason + * Output only. A reason for the execution condition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Condition::initOnce(); + parent::__construct($data); + } + + /** + * type is used to communicate the status of the reconciliation process. + * See also: + * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting + * Types common to all resources include: + * * "Ready": True when the Resource is ready. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * type is used to communicate the status of the reconciliation process. + * See also: + * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting + * Types common to all resources include: + * * "Ready": True when the Resource is ready. + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * State of the condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of the condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\State::class); + $this->state = $var; + + return $this; + } + + /** + * Human readable message indicating details about the current status. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human readable message indicating details about the current status. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Last time the condition transitioned from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastTransitionTime() + { + return $this->last_transition_time; + } + + public function hasLastTransitionTime() + { + return isset($this->last_transition_time); + } + + public function clearLastTransitionTime() + { + unset($this->last_transition_time); + } + + /** + * Last time the condition transitioned from one status to another. + * + * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastTransitionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_transition_time = $var; + + return $this; + } + + /** + * How to interpret failures of this condition, one of Error, Warning, Info + * + * Generated from protobuf field .google.cloud.run.v2.Condition.Severity severity = 5; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * How to interpret failures of this condition, one of Error, Warning, Info + * + * Generated from protobuf field .google.cloud.run.v2.Condition.Severity severity = 5; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Output only. A common (service-level) reason for this condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.CommonReason reason = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReason() + { + return $this->readOneof(6); + } + + public function hasReason() + { + return $this->hasOneof(6); + } + + /** + * Output only. A common (service-level) reason for this condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.CommonReason reason = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\CommonReason::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. A reason for the revision condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.RevisionReason revision_reason = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRevisionReason() + { + return $this->readOneof(9); + } + + public function hasRevisionReason() + { + return $this->hasOneof(9); + } + + /** + * Output only. A reason for the revision condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.RevisionReason revision_reason = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRevisionReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\RevisionReason::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Output only. A reason for the execution condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.ExecutionReason execution_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getExecutionReason() + { + return $this->readOneof(11); + } + + public function hasExecutionReason() + { + return $this->hasOneof(11); + } + + /** + * Output only. A reason for the execution condition. + * + * Generated from protobuf field .google.cloud.run.v2.Condition.ExecutionReason execution_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setExecutionReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\ExecutionReason::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * @return string + */ + public function getReasons() + { + return $this->whichOneof("reasons"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php new file mode 100644 index 000000000000..ac9f6d89e665 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php @@ -0,0 +1,155 @@ +google.cloud.run.v2.Condition.CommonReason + */ +class CommonReason +{ + /** + * Default value. + * + * Generated from protobuf enum COMMON_REASON_UNDEFINED = 0; + */ + const COMMON_REASON_UNDEFINED = 0; + /** + * Reason unknown. Further details will be in message. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Revision creation process failed. + * + * Generated from protobuf enum REVISION_FAILED = 3; + */ + const REVISION_FAILED = 3; + /** + * Timed out waiting for completion. + * + * Generated from protobuf enum PROGRESS_DEADLINE_EXCEEDED = 4; + */ + const PROGRESS_DEADLINE_EXCEEDED = 4; + /** + * The container image path is incorrect. + * + * Generated from protobuf enum CONTAINER_MISSING = 6; + */ + const CONTAINER_MISSING = 6; + /** + * Insufficient permissions on the container image. + * + * Generated from protobuf enum CONTAINER_PERMISSION_DENIED = 7; + */ + const CONTAINER_PERMISSION_DENIED = 7; + /** + * Container image is not authorized by policy. + * + * Generated from protobuf enum CONTAINER_IMAGE_UNAUTHORIZED = 8; + */ + const CONTAINER_IMAGE_UNAUTHORIZED = 8; + /** + * Container image policy authorization check failed. + * + * Generated from protobuf enum CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9; + */ + const CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9; + /** + * Insufficient permissions on encryption key. + * + * Generated from protobuf enum ENCRYPTION_KEY_PERMISSION_DENIED = 10; + */ + const ENCRYPTION_KEY_PERMISSION_DENIED = 10; + /** + * Permission check on encryption key failed. + * + * Generated from protobuf enum ENCRYPTION_KEY_CHECK_FAILED = 11; + */ + const ENCRYPTION_KEY_CHECK_FAILED = 11; + /** + * At least one Access check on secrets failed. + * + * Generated from protobuf enum SECRETS_ACCESS_CHECK_FAILED = 12; + */ + const SECRETS_ACCESS_CHECK_FAILED = 12; + /** + * Waiting for operation to complete. + * + * Generated from protobuf enum WAITING_FOR_OPERATION = 13; + */ + const WAITING_FOR_OPERATION = 13; + /** + * System will retry immediately. + * + * Generated from protobuf enum IMMEDIATE_RETRY = 14; + */ + const IMMEDIATE_RETRY = 14; + /** + * System will retry later; current attempt failed. + * + * Generated from protobuf enum POSTPONED_RETRY = 15; + */ + const POSTPONED_RETRY = 15; + /** + * An internal error occurred. Further information may be in the message. + * + * Generated from protobuf enum INTERNAL = 16; + */ + const INTERNAL = 16; + /** + * User-provided VPC network was not found. + * + * Generated from protobuf enum VPC_NETWORK_NOT_FOUND = 17; + */ + const VPC_NETWORK_NOT_FOUND = 17; + + private static $valueToName = [ + self::COMMON_REASON_UNDEFINED => 'COMMON_REASON_UNDEFINED', + self::UNKNOWN => 'UNKNOWN', + self::REVISION_FAILED => 'REVISION_FAILED', + self::PROGRESS_DEADLINE_EXCEEDED => 'PROGRESS_DEADLINE_EXCEEDED', + self::CONTAINER_MISSING => 'CONTAINER_MISSING', + self::CONTAINER_PERMISSION_DENIED => 'CONTAINER_PERMISSION_DENIED', + self::CONTAINER_IMAGE_UNAUTHORIZED => 'CONTAINER_IMAGE_UNAUTHORIZED', + self::CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED => 'CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED', + self::ENCRYPTION_KEY_PERMISSION_DENIED => 'ENCRYPTION_KEY_PERMISSION_DENIED', + self::ENCRYPTION_KEY_CHECK_FAILED => 'ENCRYPTION_KEY_CHECK_FAILED', + self::SECRETS_ACCESS_CHECK_FAILED => 'SECRETS_ACCESS_CHECK_FAILED', + self::WAITING_FOR_OPERATION => 'WAITING_FOR_OPERATION', + self::IMMEDIATE_RETRY => 'IMMEDIATE_RETRY', + self::POSTPONED_RETRY => 'POSTPONED_RETRY', + self::INTERNAL => 'INTERNAL', + self::VPC_NETWORK_NOT_FOUND => 'VPC_NETWORK_NOT_FOUND', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CommonReason::class, \Google\Cloud\Run\V2\Condition_CommonReason::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php new file mode 100644 index 000000000000..be73c847927d --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php @@ -0,0 +1,93 @@ +google.cloud.run.v2.Condition.ExecutionReason + */ +class ExecutionReason +{ + /** + * Default value. + * + * Generated from protobuf enum EXECUTION_REASON_UNDEFINED = 0; + */ + const EXECUTION_REASON_UNDEFINED = 0; + /** + * Internal system error getting execution status. System will retry. + * + * Generated from protobuf enum JOB_STATUS_SERVICE_POLLING_ERROR = 1; + */ + const JOB_STATUS_SERVICE_POLLING_ERROR = 1; + /** + * A task reached its retry limit and the last attempt failed due to the + * user container exiting with a non-zero exit code. + * + * Generated from protobuf enum NON_ZERO_EXIT_CODE = 2; + */ + const NON_ZERO_EXIT_CODE = 2; + /** + * The execution was cancelled by users. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The execution is in the process of being cancelled. + * + * Generated from protobuf enum CANCELLING = 4; + */ + const CANCELLING = 4; + /** + * The execution was deleted. + * + * Generated from protobuf enum DELETED = 5; + */ + const DELETED = 5; + /** + * A delayed execution is waiting for a start time. + * + * Generated from protobuf enum DELAYED_START_PENDING = 6; + */ + const DELAYED_START_PENDING = 6; + + private static $valueToName = [ + self::EXECUTION_REASON_UNDEFINED => 'EXECUTION_REASON_UNDEFINED', + self::JOB_STATUS_SERVICE_POLLING_ERROR => 'JOB_STATUS_SERVICE_POLLING_ERROR', + self::NON_ZERO_EXIT_CODE => 'NON_ZERO_EXIT_CODE', + self::CANCELLED => 'CANCELLED', + self::CANCELLING => 'CANCELLING', + self::DELETED => 'DELETED', + self::DELAYED_START_PENDING => 'DELAYED_START_PENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionReason::class, \Google\Cloud\Run\V2\Condition_ExecutionReason::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php new file mode 100644 index 000000000000..267653375813 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php @@ -0,0 +1,141 @@ +google.cloud.run.v2.Condition.RevisionReason + */ +class RevisionReason +{ + /** + * Default value. + * + * Generated from protobuf enum REVISION_REASON_UNDEFINED = 0; + */ + const REVISION_REASON_UNDEFINED = 0; + /** + * Revision in Pending state. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * Revision is in Reserve state. + * + * Generated from protobuf enum RESERVE = 2; + */ + const RESERVE = 2; + /** + * Revision is Retired. + * + * Generated from protobuf enum RETIRED = 3; + */ + const RETIRED = 3; + /** + * Revision is being retired. + * + * Generated from protobuf enum RETIRING = 4; + */ + const RETIRING = 4; + /** + * Revision is being recreated. + * + * Generated from protobuf enum RECREATING = 5; + */ + const RECREATING = 5; + /** + * There was a health check error. + * + * Generated from protobuf enum HEALTH_CHECK_CONTAINER_ERROR = 6; + */ + const HEALTH_CHECK_CONTAINER_ERROR = 6; + /** + * Health check failed due to user error from customized path of the + * container. System will retry. + * + * Generated from protobuf enum CUSTOMIZED_PATH_RESPONSE_PENDING = 7; + */ + const CUSTOMIZED_PATH_RESPONSE_PENDING = 7; + /** + * A revision with min_instance_count > 0 was created and is reserved, but + * it was not configured to serve traffic, so it's not live. This can also + * happen momentarily during traffic migration. + * + * Generated from protobuf enum MIN_INSTANCES_NOT_PROVISIONED = 8; + */ + const MIN_INSTANCES_NOT_PROVISIONED = 8; + /** + * The maximum allowed number of active revisions has been reached. + * + * Generated from protobuf enum ACTIVE_REVISION_LIMIT_REACHED = 9; + */ + const ACTIVE_REVISION_LIMIT_REACHED = 9; + /** + * There was no deployment defined. + * This value is no longer used, but Services created in older versions of + * the API might contain this value. + * + * Generated from protobuf enum NO_DEPLOYMENT = 10; + */ + const NO_DEPLOYMENT = 10; + /** + * A revision's container has no port specified since the revision is of a + * manually scaled service with 0 instance count + * + * Generated from protobuf enum HEALTH_CHECK_SKIPPED = 11; + */ + const HEALTH_CHECK_SKIPPED = 11; + /** + * A revision with min_instance_count > 0 was created and is waiting for + * enough instances to begin a traffic migration. + * + * Generated from protobuf enum MIN_INSTANCES_WARMING = 12; + */ + const MIN_INSTANCES_WARMING = 12; + + private static $valueToName = [ + self::REVISION_REASON_UNDEFINED => 'REVISION_REASON_UNDEFINED', + self::PENDING => 'PENDING', + self::RESERVE => 'RESERVE', + self::RETIRED => 'RETIRED', + self::RETIRING => 'RETIRING', + self::RECREATING => 'RECREATING', + self::HEALTH_CHECK_CONTAINER_ERROR => 'HEALTH_CHECK_CONTAINER_ERROR', + self::CUSTOMIZED_PATH_RESPONSE_PENDING => 'CUSTOMIZED_PATH_RESPONSE_PENDING', + self::MIN_INSTANCES_NOT_PROVISIONED => 'MIN_INSTANCES_NOT_PROVISIONED', + self::ACTIVE_REVISION_LIMIT_REACHED => 'ACTIVE_REVISION_LIMIT_REACHED', + self::NO_DEPLOYMENT => 'NO_DEPLOYMENT', + self::HEALTH_CHECK_SKIPPED => 'HEALTH_CHECK_SKIPPED', + self::MIN_INSTANCES_WARMING => 'MIN_INSTANCES_WARMING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RevisionReason::class, \Google\Cloud\Run\V2\Condition_RevisionReason::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php new file mode 100644 index 000000000000..eb2c0967fd4b --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php @@ -0,0 +1,71 @@ +google.cloud.run.v2.Condition.Severity + */ +class Severity +{ + /** + * Unspecified severity + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Error severity. + * + * Generated from protobuf enum ERROR = 1; + */ + const ERROR = 1; + /** + * Warning severity. + * + * Generated from protobuf enum WARNING = 2; + */ + const WARNING = 2; + /** + * Info severity. + * + * Generated from protobuf enum INFO = 3; + */ + const INFO = 3; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::ERROR => 'ERROR', + self::WARNING => 'WARNING', + self::INFO => 'INFO', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Severity::class, \Google\Cloud\Run\V2\Condition_Severity::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php new file mode 100644 index 000000000000..3ca42a0f1e32 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php @@ -0,0 +1,78 @@ +google.cloud.run.v2.Condition.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Transient state: Reconciliation has not started yet. + * + * Generated from protobuf enum CONDITION_PENDING = 1; + */ + const CONDITION_PENDING = 1; + /** + * Transient state: reconciliation is still in progress. + * + * Generated from protobuf enum CONDITION_RECONCILING = 2; + */ + const CONDITION_RECONCILING = 2; + /** + * Terminal state: Reconciliation did not succeed. + * + * Generated from protobuf enum CONDITION_FAILED = 3; + */ + const CONDITION_FAILED = 3; + /** + * Terminal state: Reconciliation completed successfully. + * + * Generated from protobuf enum CONDITION_SUCCEEDED = 4; + */ + const CONDITION_SUCCEEDED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CONDITION_PENDING => 'CONDITION_PENDING', + self::CONDITION_RECONCILING => 'CONDITION_RECONCILING', + self::CONDITION_FAILED => 'CONDITION_FAILED', + self::CONDITION_SUCCEEDED => 'CONDITION_SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Run\V2\Condition_State::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php new file mode 100644 index 000000000000..2ffcd41a34c8 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php @@ -0,0 +1,701 @@ +google.cloud.run.v2.Container + */ +class Container extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the container specified as a DNS_LABEL (RFC 1123). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. Name of the container image in Dockerhub, Google Artifact + * Registry, or Google Container Registry. If the host is not provided, + * Dockerhub is assumed. + * + * Generated from protobuf field string image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $image = ''; + /** + * Optional. Location of the source. + * + * Generated from protobuf field .google.cloud.run.v2.SourceCode source_code = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $source_code = null; + /** + * Entrypoint array. Not executed within a shell. + * The docker image's ENTRYPOINT is used if this is not provided. + * + * Generated from protobuf field repeated string command = 3; + */ + private $command; + /** + * Arguments to the entrypoint. + * The docker image's CMD is used if this is not provided. + * + * Generated from protobuf field repeated string args = 4; + */ + private $args; + /** + * List of environment variables to set in the container. + * + * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 5; + */ + private $env; + /** + * Compute Resource requirements by this container. + * + * Generated from protobuf field .google.cloud.run.v2.ResourceRequirements resources = 6; + */ + protected $resources = null; + /** + * List of ports to expose from the container. Only a single port can be + * specified. The specified ports must be listening on all interfaces + * (0.0.0.0) within the container to be accessible. + * If omitted, a port number will be chosen and passed to the container + * through the PORT environment variable for the container to listen on. + * + * Generated from protobuf field repeated .google.cloud.run.v2.ContainerPort ports = 7; + */ + private $ports; + /** + * Volume to mount into the container's filesystem. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8; + */ + private $volume_mounts; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * + * Generated from protobuf field string working_dir = 9; + */ + protected $working_dir = ''; + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * + * Generated from protobuf field .google.cloud.run.v2.Probe liveness_probe = 10; + */ + protected $liveness_probe = null; + /** + * Startup probe of application within the container. + * All other probes are disabled if a startup probe is provided, until it + * succeeds. Container will not be added to service endpoints if the probe + * fails. + * + * Generated from protobuf field .google.cloud.run.v2.Probe startup_probe = 11; + */ + protected $startup_probe = null; + /** + * Readiness probe to be used for health checks. + * + * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; + */ + protected $readiness_probe = null; + /** + * Names of the containers that must start before this container. + * + * Generated from protobuf field repeated string depends_on = 12; + */ + private $depends_on; + /** + * Base image for this container. Only supported for services. If set, it + * indicates that the service is enrolled into automatic base image update. + * + * Generated from protobuf field string base_image_uri = 13; + */ + protected $base_image_uri = ''; + /** + * Output only. The build info of the container image. + * + * Generated from protobuf field .google.cloud.run.v2.BuildInfo build_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $build_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the container specified as a DNS_LABEL (RFC 1123). + * @type string $image + * Required. Name of the container image in Dockerhub, Google Artifact + * Registry, or Google Container Registry. If the host is not provided, + * Dockerhub is assumed. + * @type \Google\Cloud\Run\V2\SourceCode $source_code + * Optional. Location of the source. + * @type array|\Google\Protobuf\Internal\RepeatedField $command + * Entrypoint array. Not executed within a shell. + * The docker image's ENTRYPOINT is used if this is not provided. + * @type array|\Google\Protobuf\Internal\RepeatedField $args + * Arguments to the entrypoint. + * The docker image's CMD is used if this is not provided. + * @type array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $env + * List of environment variables to set in the container. + * @type \Google\Cloud\Run\V2\ResourceRequirements $resources + * Compute Resource requirements by this container. + * @type array<\Google\Cloud\Run\V2\ContainerPort>|\Google\Protobuf\Internal\RepeatedField $ports + * List of ports to expose from the container. Only a single port can be + * specified. The specified ports must be listening on all interfaces + * (0.0.0.0) within the container to be accessible. + * If omitted, a port number will be chosen and passed to the container + * through the PORT environment variable for the container to listen on. + * @type array<\Google\Cloud\Run\V2\VolumeMount>|\Google\Protobuf\Internal\RepeatedField $volume_mounts + * Volume to mount into the container's filesystem. + * @type string $working_dir + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * @type \Google\Cloud\Run\V2\Probe $liveness_probe + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * @type \Google\Cloud\Run\V2\Probe $startup_probe + * Startup probe of application within the container. + * All other probes are disabled if a startup probe is provided, until it + * succeeds. Container will not be added to service endpoints if the probe + * fails. + * @type \Google\Cloud\Run\V2\Probe $readiness_probe + * Readiness probe to be used for health checks. + * @type array|\Google\Protobuf\Internal\RepeatedField $depends_on + * Names of the containers that must start before this container. + * @type string $base_image_uri + * Base image for this container. Only supported for services. If set, it + * indicates that the service is enrolled into automatic base image update. + * @type \Google\Cloud\Run\V2\BuildInfo $build_info + * Output only. The build info of the container image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Name of the container specified as a DNS_LABEL (RFC 1123). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the container specified as a DNS_LABEL (RFC 1123). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Name of the container image in Dockerhub, Google Artifact + * Registry, or Google Container Registry. If the host is not provided, + * Dockerhub is assumed. + * + * Generated from protobuf field string image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImage() + { + return $this->image; + } + + /** + * Required. Name of the container image in Dockerhub, Google Artifact + * Registry, or Google Container Registry. If the host is not provided, + * Dockerhub is assumed. + * + * Generated from protobuf field string image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkString($var, True); + $this->image = $var; + + return $this; + } + + /** + * Optional. Location of the source. + * + * Generated from protobuf field .google.cloud.run.v2.SourceCode source_code = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\SourceCode|null + */ + public function getSourceCode() + { + return $this->source_code; + } + + public function hasSourceCode() + { + return isset($this->source_code); + } + + public function clearSourceCode() + { + unset($this->source_code); + } + + /** + * Optional. Location of the source. + * + * Generated from protobuf field .google.cloud.run.v2.SourceCode source_code = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\SourceCode $var + * @return $this + */ + public function setSourceCode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SourceCode::class); + $this->source_code = $var; + + return $this; + } + + /** + * Entrypoint array. Not executed within a shell. + * The docker image's ENTRYPOINT is used if this is not provided. + * + * Generated from protobuf field repeated string command = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCommand() + { + return $this->command; + } + + /** + * Entrypoint array. Not executed within a shell. + * The docker image's ENTRYPOINT is used if this is not provided. + * + * Generated from protobuf field repeated string command = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCommand($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->command = $arr; + + return $this; + } + + /** + * Arguments to the entrypoint. + * The docker image's CMD is used if this is not provided. + * + * Generated from protobuf field repeated string args = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArgs() + { + return $this->args; + } + + /** + * Arguments to the entrypoint. + * The docker image's CMD is used if this is not provided. + * + * Generated from protobuf field repeated string args = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->args = $arr; + + return $this; + } + + /** + * List of environment variables to set in the container. + * + * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnv() + { + return $this->env; + } + + /** + * List of environment variables to set in the container. + * + * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 5; + * @param array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnv($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\EnvVar::class); + $this->env = $arr; + + return $this; + } + + /** + * Compute Resource requirements by this container. + * + * Generated from protobuf field .google.cloud.run.v2.ResourceRequirements resources = 6; + * @return \Google\Cloud\Run\V2\ResourceRequirements|null + */ + public function getResources() + { + return $this->resources; + } + + public function hasResources() + { + return isset($this->resources); + } + + public function clearResources() + { + unset($this->resources); + } + + /** + * Compute Resource requirements by this container. + * + * Generated from protobuf field .google.cloud.run.v2.ResourceRequirements resources = 6; + * @param \Google\Cloud\Run\V2\ResourceRequirements $var + * @return $this + */ + public function setResources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ResourceRequirements::class); + $this->resources = $var; + + return $this; + } + + /** + * List of ports to expose from the container. Only a single port can be + * specified. The specified ports must be listening on all interfaces + * (0.0.0.0) within the container to be accessible. + * If omitted, a port number will be chosen and passed to the container + * through the PORT environment variable for the container to listen on. + * + * Generated from protobuf field repeated .google.cloud.run.v2.ContainerPort ports = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPorts() + { + return $this->ports; + } + + /** + * List of ports to expose from the container. Only a single port can be + * specified. The specified ports must be listening on all interfaces + * (0.0.0.0) within the container to be accessible. + * If omitted, a port number will be chosen and passed to the container + * through the PORT environment variable for the container to listen on. + * + * Generated from protobuf field repeated .google.cloud.run.v2.ContainerPort ports = 7; + * @param array<\Google\Cloud\Run\V2\ContainerPort>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\ContainerPort::class); + $this->ports = $arr; + + return $this; + } + + /** + * Volume to mount into the container's filesystem. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumeMounts() + { + return $this->volume_mounts; + } + + /** + * Volume to mount into the container's filesystem. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8; + * @param array<\Google\Cloud\Run\V2\VolumeMount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumeMounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\VolumeMount::class); + $this->volume_mounts = $arr; + + return $this; + } + + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * + * Generated from protobuf field string working_dir = 9; + * @return string + */ + public function getWorkingDir() + { + return $this->working_dir; + } + + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * + * Generated from protobuf field string working_dir = 9; + * @param string $var + * @return $this + */ + public function setWorkingDir($var) + { + GPBUtil::checkString($var, True); + $this->working_dir = $var; + + return $this; + } + + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * + * Generated from protobuf field .google.cloud.run.v2.Probe liveness_probe = 10; + * @return \Google\Cloud\Run\V2\Probe|null + */ + public function getLivenessProbe() + { + return $this->liveness_probe; + } + + public function hasLivenessProbe() + { + return isset($this->liveness_probe); + } + + public function clearLivenessProbe() + { + unset($this->liveness_probe); + } + + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * + * Generated from protobuf field .google.cloud.run.v2.Probe liveness_probe = 10; + * @param \Google\Cloud\Run\V2\Probe $var + * @return $this + */ + public function setLivenessProbe($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Probe::class); + $this->liveness_probe = $var; + + return $this; + } + + /** + * Startup probe of application within the container. + * All other probes are disabled if a startup probe is provided, until it + * succeeds. Container will not be added to service endpoints if the probe + * fails. + * + * Generated from protobuf field .google.cloud.run.v2.Probe startup_probe = 11; + * @return \Google\Cloud\Run\V2\Probe|null + */ + public function getStartupProbe() + { + return $this->startup_probe; + } + + public function hasStartupProbe() + { + return isset($this->startup_probe); + } + + public function clearStartupProbe() + { + unset($this->startup_probe); + } + + /** + * Startup probe of application within the container. + * All other probes are disabled if a startup probe is provided, until it + * succeeds. Container will not be added to service endpoints if the probe + * fails. + * + * Generated from protobuf field .google.cloud.run.v2.Probe startup_probe = 11; + * @param \Google\Cloud\Run\V2\Probe $var + * @return $this + */ + public function setStartupProbe($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Probe::class); + $this->startup_probe = $var; + + return $this; + } + + /** + * Readiness probe to be used for health checks. + * + * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; + * @return \Google\Cloud\Run\V2\Probe|null + */ + public function getReadinessProbe() + { + return $this->readiness_probe; + } + + public function hasReadinessProbe() + { + return isset($this->readiness_probe); + } + + public function clearReadinessProbe() + { + unset($this->readiness_probe); + } + + /** + * Readiness probe to be used for health checks. + * + * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; + * @param \Google\Cloud\Run\V2\Probe $var + * @return $this + */ + public function setReadinessProbe($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Probe::class); + $this->readiness_probe = $var; + + return $this; + } + + /** + * Names of the containers that must start before this container. + * + * Generated from protobuf field repeated string depends_on = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDependsOn() + { + return $this->depends_on; + } + + /** + * Names of the containers that must start before this container. + * + * Generated from protobuf field repeated string depends_on = 12; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDependsOn($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->depends_on = $arr; + + return $this; + } + + /** + * Base image for this container. Only supported for services. If set, it + * indicates that the service is enrolled into automatic base image update. + * + * Generated from protobuf field string base_image_uri = 13; + * @return string + */ + public function getBaseImageUri() + { + return $this->base_image_uri; + } + + /** + * Base image for this container. Only supported for services. If set, it + * indicates that the service is enrolled into automatic base image update. + * + * Generated from protobuf field string base_image_uri = 13; + * @param string $var + * @return $this + */ + public function setBaseImageUri($var) + { + GPBUtil::checkString($var, True); + $this->base_image_uri = $var; + + return $this; + } + + /** + * Output only. The build info of the container image. + * + * Generated from protobuf field .google.cloud.run.v2.BuildInfo build_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\BuildInfo|null + */ + public function getBuildInfo() + { + return $this->build_info; + } + + public function hasBuildInfo() + { + return isset($this->build_info); + } + + public function clearBuildInfo() + { + unset($this->build_info); + } + + /** + * Output only. The build info of the container image. + * + * Generated from protobuf field .google.cloud.run.v2.BuildInfo build_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\BuildInfo $var + * @return $this + */ + public function setBuildInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BuildInfo::class); + $this->build_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php new file mode 100644 index 000000000000..9fad73b12eed --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php @@ -0,0 +1,109 @@ +google.cloud.run.v2.ContainerPort + */ +class ContainerPort extends \Google\Protobuf\Internal\Message +{ + /** + * If specified, used to specify which protocol to use. + * Allowed values are "http1" and "h2c". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Port number the container listens on. + * This must be a valid TCP port number, 0 < container_port < 65536. + * + * Generated from protobuf field int32 container_port = 3; + */ + protected $container_port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * If specified, used to specify which protocol to use. + * Allowed values are "http1" and "h2c". + * @type int $container_port + * Port number the container listens on. + * This must be a valid TCP port number, 0 < container_port < 65536. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * If specified, used to specify which protocol to use. + * Allowed values are "http1" and "h2c". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * If specified, used to specify which protocol to use. + * Allowed values are "http1" and "h2c". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Port number the container listens on. + * This must be a valid TCP port number, 0 < container_port < 65536. + * + * Generated from protobuf field int32 container_port = 3; + * @return int + */ + public function getContainerPort() + { + return $this->container_port; + } + + /** + * Port number the container listens on. + * This must be a valid TCP port number, 0 < container_port < 65536. + * + * Generated from protobuf field int32 container_port = 3; + * @param int $var + * @return $this + */ + public function setContainerPort($var) + { + GPBUtil::checkInt32($var); + $this->container_port = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerStatus.php new file mode 100644 index 000000000000..793b0b005d77 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerStatus.php @@ -0,0 +1,114 @@ +google.cloud.run.v2.ContainerStatus + */ +class ContainerStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the container, if specified. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * ImageDigest holds the resolved digest for the image specified and resolved + * during the creation of Revision. This field holds the digest value + * regardless of whether a tag or digest was originally specified in the + * Container object. + * + * Generated from protobuf field string image_digest = 2; + */ + protected $image_digest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the container, if specified. + * @type string $image_digest + * ImageDigest holds the resolved digest for the image specified and resolved + * during the creation of Revision. This field holds the digest value + * regardless of whether a tag or digest was originally specified in the + * Container object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\ContainerStatus::initOnce(); + parent::__construct($data); + } + + /** + * The name of the container, if specified. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the container, if specified. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * ImageDigest holds the resolved digest for the image specified and resolved + * during the creation of Revision. This field holds the digest value + * regardless of whether a tag or digest was originally specified in the + * Container object. + * + * Generated from protobuf field string image_digest = 2; + * @return string + */ + public function getImageDigest() + { + return $this->image_digest; + } + + /** + * ImageDigest holds the resolved digest for the image specified and resolved + * during the creation of Revision. This field holds the digest value + * regardless of whether a tag or digest was originally specified in the + * Container object. + * + * Generated from protobuf field string image_digest = 2; + * @param string $var + * @return $this + */ + public function setImageDigest($var) + { + GPBUtil::checkString($var, True); + $this->image_digest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateInstanceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateInstanceRequest.php new file mode 100644 index 000000000000..efbfeb467beb --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateInstanceRequest.php @@ -0,0 +1,190 @@ +google.cloud.run.v2.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Generated from protobuf field .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Required. The unique identifier for the Instance. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the instance becomes {parent}/instances/{instance_id}. + * + * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Please see {@see InstancesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Run\V2\Instance $instance + * + * @return \Google\Cloud\Run\V2\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Run\V2\Instance $instance): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * @type \Google\Cloud\Run\V2\Instance $instance + * @type string $instance_id + * Required. The unique identifier for the Instance. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the instance becomes {parent}/instances/{instance_id}. + * @type bool $validate_only + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Generated from protobuf field .google.cloud.run.v2.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Required. The unique identifier for the Instance. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the instance becomes {parent}/instances/{instance_id}. + * + * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The unique identifier for the Instance. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the instance becomes {parent}/instances/{instance_id}. + * + * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php new file mode 100644 index 000000000000..f201e0ba2b8c --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php @@ -0,0 +1,216 @@ +google.cloud.run.v2.CreateJobRequest + */ +class CreateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location and project in which this Job should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Job instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + /** + * Required. The unique identifier for the Job. The name of the job becomes + * {parent}/jobs/{job_id}. + * + * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_id = ''; + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The location and project in which this Job should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Please see + * {@see JobsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Run\V2\Job $job Required. The Job instance to create. + * @param string $jobId Required. The unique identifier for the Job. The name of the job becomes + * {parent}/jobs/{job_id}. + * + * @return \Google\Cloud\Run\V2\CreateJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Run\V2\Job $job, string $jobId): self + { + return (new self()) + ->setParent($parent) + ->setJob($job) + ->setJobId($jobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location and project in which this Job should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * @type \Google\Cloud\Run\V2\Job $job + * Required. The Job instance to create. + * @type string $job_id + * Required. The unique identifier for the Job. The name of the job becomes + * {parent}/jobs/{job_id}. + * @type bool $validate_only + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location and project in which this Job should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location and project in which this Job should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The Job instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Required. The Job instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Job::class); + $this->job = $var; + + return $this; + } + + /** + * Required. The unique identifier for the Job. The name of the job becomes + * {parent}/jobs/{job_id}. + * + * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Required. The unique identifier for the Job. The name of the job becomes + * {parent}/jobs/{job_id}. + * + * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php new file mode 100644 index 000000000000..7a5677b8d359 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php @@ -0,0 +1,221 @@ +google.cloud.run.v2.CreateServiceRequest + */ +class CreateServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location and project in which this service should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Only lowercase characters, digits, and hyphens. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Service instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service = null; + /** + * Required. The unique identifier for the Service. It must begin with letter, + * and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the service becomes {parent}/services/{service_id}. + * + * Generated from protobuf field string service_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_id = ''; + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The location and project in which this service should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Only lowercase characters, digits, and hyphens. Please see + * {@see ServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Run\V2\Service $service Required. The Service instance to create. + * @param string $serviceId Required. The unique identifier for the Service. It must begin with letter, + * and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the service becomes {parent}/services/{service_id}. + * + * @return \Google\Cloud\Run\V2\CreateServiceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Run\V2\Service $service, string $serviceId): self + { + return (new self()) + ->setParent($parent) + ->setService($service) + ->setServiceId($serviceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location and project in which this service should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Only lowercase characters, digits, and hyphens. + * @type \Google\Cloud\Run\V2\Service $service + * Required. The Service instance to create. + * @type string $service_id + * Required. The unique identifier for the Service. It must begin with letter, + * and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the service becomes {parent}/services/{service_id}. + * @type bool $validate_only + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location and project in which this service should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Only lowercase characters, digits, and hyphens. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location and project in which this service should be created. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Only lowercase characters, digits, and hyphens. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The Service instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\Service|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Required. The Service instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\Service $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Service::class); + $this->service = $var; + + return $this; + } + + /** + * Required. The unique identifier for the Service. It must begin with letter, + * and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the service becomes {parent}/services/{service_id}. + * + * Generated from protobuf field string service_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServiceId() + { + return $this->service_id; + } + + /** + * Required. The unique identifier for the Service. It must begin with letter, + * and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the service becomes {parent}/services/{service_id}. + * + * Generated from protobuf field string service_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServiceId($var) + { + GPBUtil::checkString($var, True); + $this->service_id = $var; + + return $this; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php new file mode 100644 index 000000000000..9c089a86fa79 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php @@ -0,0 +1,231 @@ +google.cloud.run.v2.CreateWorkerPoolRequest + */ +class CreateWorkerPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location and project in which this worker pool should be + * created. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. Only lowercase characters, digits, + * and hyphens. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The WorkerPool instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $worker_pool = null; + /** + * Required. The unique identifier for the WorkerPool. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the worker pool becomes + * `{parent}/workerPools/{worker_pool_id}`. + * + * Generated from protobuf field string worker_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $worker_pool_id = ''; + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The location and project in which this worker pool should be + * created. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. Only lowercase characters, digits, + * and hyphens. Please see + * {@see WorkerPoolsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Run\V2\WorkerPool $workerPool Required. The WorkerPool instance to create. + * @param string $workerPoolId Required. The unique identifier for the WorkerPool. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the worker pool becomes + * `{parent}/workerPools/{worker_pool_id}`. + * + * @return \Google\Cloud\Run\V2\CreateWorkerPoolRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Run\V2\WorkerPool $workerPool, string $workerPoolId): self + { + return (new self()) + ->setParent($parent) + ->setWorkerPool($workerPool) + ->setWorkerPoolId($workerPoolId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location and project in which this worker pool should be + * created. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. Only lowercase characters, digits, + * and hyphens. + * @type \Google\Cloud\Run\V2\WorkerPool $worker_pool + * Required. The WorkerPool instance to create. + * @type string $worker_pool_id + * Required. The unique identifier for the WorkerPool. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the worker pool becomes + * `{parent}/workerPools/{worker_pool_id}`. + * @type bool $validate_only + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location and project in which this worker pool should be + * created. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. Only lowercase characters, digits, + * and hyphens. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location and project in which this worker pool should be + * created. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. Only lowercase characters, digits, + * and hyphens. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The WorkerPool instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\WorkerPool|null + */ + public function getWorkerPool() + { + return $this->worker_pool; + } + + public function hasWorkerPool() + { + return isset($this->worker_pool); + } + + public function clearWorkerPool() + { + unset($this->worker_pool); + } + + /** + * Required. The WorkerPool instance to create. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\WorkerPool $var + * @return $this + */ + public function setWorkerPool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPool::class); + $this->worker_pool = $var; + + return $this; + } + + /** + * Required. The unique identifier for the WorkerPool. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the worker pool becomes + * `{parent}/workerPools/{worker_pool_id}`. + * + * Generated from protobuf field string worker_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getWorkerPoolId() + { + return $this->worker_pool_id; + } + + /** + * Required. The unique identifier for the WorkerPool. It must begin with + * letter, and cannot end with hyphen; must contain fewer than 50 characters. + * The name of the worker pool becomes + * `{parent}/workerPools/{worker_pool_id}`. + * + * Generated from protobuf field string worker_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setWorkerPoolId($var) + { + GPBUtil::checkString($var, True); + $this->worker_pool_id = $var; + + return $this; + } + + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or creating any resources. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php new file mode 100644 index 000000000000..ea7d31e245fe --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php @@ -0,0 +1,172 @@ +google.cloud.run.v2.DeleteExecutionRequest + */ +class DeleteExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Execution to delete. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + + /** + * @param string $name Required. The name of the Execution to delete. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. Please see + * {@see ExecutionsClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\DeleteExecutionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Execution to delete. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * @type bool $validate_only + * Indicates that the request should be validated without actually + * deleting any resources. + * @type string $etag + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Execution to delete. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Execution to delete. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteInstanceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteInstanceRequest.php new file mode 100644 index 000000000000..6f6a803224bd --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteInstanceRequest.php @@ -0,0 +1,147 @@ +google.cloud.run.v2.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Please see {@see InstancesClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\DeleteInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * @type bool $validate_only + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * @type string $etag + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php new file mode 100644 index 000000000000..0c4f53d97680 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php @@ -0,0 +1,167 @@ +google.cloud.run.v2.DeleteJobRequest + */ +class DeleteJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + + /** + * @param string $name Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. Please see + * {@see JobsClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\DeleteJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * @type bool $validate_only + * Indicates that the request should be validated without actually + * deleting any resources. + * @type string $etag + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php new file mode 100644 index 000000000000..0b7bb2e76937 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php @@ -0,0 +1,169 @@ +google.cloud.run.v2.DeleteRevisionRequest + */ +class DeleteRevisionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Revision to delete. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * A system-generated fingerprint for this version of the + * resource. This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + + /** + * @param string $name Required. The name of the Revision to delete. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * Please see {@see RevisionsClient::revisionName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\DeleteRevisionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Revision to delete. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * @type bool $validate_only + * Indicates that the request should be validated without actually + * deleting any resources. + * @type string $etag + * A system-generated fingerprint for this version of the + * resource. This may be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Revision to delete. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Revision to delete. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * A system-generated fingerprint for this version of the + * resource. This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * A system-generated fingerprint for this version of the + * resource. This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php new file mode 100644 index 000000000000..16182d4a1603 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php @@ -0,0 +1,167 @@ +google.cloud.run.v2.DeleteServiceRequest + */ +class DeleteServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + + /** + * @param string $name Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. Please see + * {@see ServicesClient::serviceName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\DeleteServiceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * @type bool $validate_only + * Indicates that the request should be validated without actually + * deleting any resources. + * @type string $etag + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php new file mode 100644 index 000000000000..70978326316a --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php @@ -0,0 +1,172 @@ +google.cloud.run.v2.DeleteWorkerPoolRequest + */ +class DeleteWorkerPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + + /** + * @param string $name Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. Please see + * {@see WorkerPoolsClient::workerPoolName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\DeleteWorkerPoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * @type bool $validate_only + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * @type string $etag + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php new file mode 100644 index 000000000000..be49c7f974ba --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php @@ -0,0 +1,143 @@ +google.cloud.run.v2.EmptyDirVolumeSource + */ +class EmptyDirVolumeSource extends \Google\Protobuf\Internal\Message +{ + /** + * The medium on which the data is stored. Acceptable values today is only + * MEMORY or none. When none, the default will currently be backed by memory + * but could change over time. +optional + * + * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1; + */ + protected $medium = 0; + /** + * Limit on the storage usable by this EmptyDir volume. + * The size limit is also applicable for memory medium. + * The maximum usage on memory medium EmptyDir would be the minimum value + * between the SizeLimit specified here and the sum of memory limits of all + * containers. The default is nil which means that the limit is undefined. + * More info: + * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. + * Info in Kubernetes: + * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir + * + * Generated from protobuf field string size_limit = 2; + */ + protected $size_limit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $medium + * The medium on which the data is stored. Acceptable values today is only + * MEMORY or none. When none, the default will currently be backed by memory + * but could change over time. +optional + * @type string $size_limit + * Limit on the storage usable by this EmptyDir volume. + * The size limit is also applicable for memory medium. + * The maximum usage on memory medium EmptyDir would be the minimum value + * between the SizeLimit specified here and the sum of memory limits of all + * containers. The default is nil which means that the limit is undefined. + * More info: + * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. + * Info in Kubernetes: + * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * The medium on which the data is stored. Acceptable values today is only + * MEMORY or none. When none, the default will currently be backed by memory + * but could change over time. +optional + * + * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1; + * @return int + */ + public function getMedium() + { + return $this->medium; + } + + /** + * The medium on which the data is stored. Acceptable values today is only + * MEMORY or none. When none, the default will currently be backed by memory + * but could change over time. +optional + * + * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1; + * @param int $var + * @return $this + */ + public function setMedium($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EmptyDirVolumeSource\Medium::class); + $this->medium = $var; + + return $this; + } + + /** + * Limit on the storage usable by this EmptyDir volume. + * The size limit is also applicable for memory medium. + * The maximum usage on memory medium EmptyDir would be the minimum value + * between the SizeLimit specified here and the sum of memory limits of all + * containers. The default is nil which means that the limit is undefined. + * More info: + * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. + * Info in Kubernetes: + * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir + * + * Generated from protobuf field string size_limit = 2; + * @return string + */ + public function getSizeLimit() + { + return $this->size_limit; + } + + /** + * Limit on the storage usable by this EmptyDir volume. + * The size limit is also applicable for memory medium. + * The maximum usage on memory medium EmptyDir would be the minimum value + * between the SizeLimit specified here and the sum of memory limits of all + * containers. The default is nil which means that the limit is undefined. + * More info: + * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. + * Info in Kubernetes: + * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir + * + * Generated from protobuf field string size_limit = 2; + * @param string $var + * @return $this + */ + public function setSizeLimit($var) + { + GPBUtil::checkString($var, True); + $this->size_limit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php new file mode 100644 index 000000000000..f226a6c0cdda --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php @@ -0,0 +1,58 @@ +google.cloud.run.v2.EmptyDirVolumeSource.Medium + */ +class Medium +{ + /** + * When not specified, falls back to the default implementation which + * is currently in memory (this may change over time). + * + * Generated from protobuf enum MEDIUM_UNSPECIFIED = 0; + */ + const MEDIUM_UNSPECIFIED = 0; + /** + * Explicitly set the EmptyDir to be in memory. Uses tmpfs. + * + * Generated from protobuf enum MEMORY = 1; + */ + const MEMORY = 1; + + private static $valueToName = [ + self::MEDIUM_UNSPECIFIED => 'MEDIUM_UNSPECIFIED', + self::MEMORY => 'MEMORY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Medium::class, \Google\Cloud\Run\V2\EmptyDirVolumeSource_Medium::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php new file mode 100644 index 000000000000..0b07b810a082 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php @@ -0,0 +1,61 @@ +google.cloud.run.v2.EncryptionKeyRevocationAction + */ +class EncryptionKeyRevocationAction +{ + /** + * Unspecified + * + * Generated from protobuf enum ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED = 0; + */ + const ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED = 0; + /** + * Prevents the creation of new instances. + * + * Generated from protobuf enum PREVENT_NEW = 1; + */ + const PREVENT_NEW = 1; + /** + * Shuts down existing instances, and prevents creation of new ones. + * + * Generated from protobuf enum SHUTDOWN = 2; + */ + const SHUTDOWN = 2; + + private static $valueToName = [ + self::ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED => 'ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED', + self::PREVENT_NEW => 'PREVENT_NEW', + self::SHUTDOWN => 'SHUTDOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php new file mode 100644 index 000000000000..2073c4252a57 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php @@ -0,0 +1,152 @@ +google.cloud.run.v2.EnvVar + */ +class EnvVar extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the environment variable. Must not exceed 32768 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + protected $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the environment variable. Must not exceed 32768 + * characters. + * @type string $value + * Literal value of the environment variable. + * Defaults to "", and the maximum length is 32768 bytes. + * Variable references are not supported in Cloud Run. + * @type \Google\Cloud\Run\V2\EnvVarSource $value_source + * Source for the environment variable's value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the environment variable. Must not exceed 32768 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the environment variable. Must not exceed 32768 + * characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Literal value of the environment variable. + * Defaults to "", and the maximum length is 32768 bytes. + * Variable references are not supported in Cloud Run. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->readOneof(2); + } + + public function hasValue() + { + return $this->hasOneof(2); + } + + /** + * Literal value of the environment variable. + * Defaults to "", and the maximum length is 32768 bytes. + * Variable references are not supported in Cloud Run. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Source for the environment variable's value. + * + * Generated from protobuf field .google.cloud.run.v2.EnvVarSource value_source = 3; + * @return \Google\Cloud\Run\V2\EnvVarSource|null + */ + public function getValueSource() + { + return $this->readOneof(3); + } + + public function hasValueSource() + { + return $this->hasOneof(3); + } + + /** + * Source for the environment variable's value. + * + * Generated from protobuf field .google.cloud.run.v2.EnvVarSource value_source = 3; + * @param \Google\Cloud\Run\V2\EnvVarSource $var + * @return $this + */ + public function setValueSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\EnvVarSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValues() + { + return $this->whichOneof("values"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php new file mode 100644 index 000000000000..99ffb8e651c0 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php @@ -0,0 +1,77 @@ +google.cloud.run.v2.EnvVarSource + */ +class EnvVarSource extends \Google\Protobuf\Internal\Message +{ + /** + * Selects a secret and a specific version from Cloud Secret Manager. + * + * Generated from protobuf field .google.cloud.run.v2.SecretKeySelector secret_key_ref = 1; + */ + protected $secret_key_ref = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Run\V2\SecretKeySelector $secret_key_ref + * Selects a secret and a specific version from Cloud Secret Manager. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Selects a secret and a specific version from Cloud Secret Manager. + * + * Generated from protobuf field .google.cloud.run.v2.SecretKeySelector secret_key_ref = 1; + * @return \Google\Cloud\Run\V2\SecretKeySelector|null + */ + public function getSecretKeyRef() + { + return $this->secret_key_ref; + } + + public function hasSecretKeyRef() + { + return isset($this->secret_key_ref); + } + + public function clearSecretKeyRef() + { + unset($this->secret_key_ref); + } + + /** + * Selects a secret and a specific version from Cloud Secret Manager. + * + * Generated from protobuf field .google.cloud.run.v2.SecretKeySelector secret_key_ref = 1; + * @param \Google\Cloud\Run\V2\SecretKeySelector $var + * @return $this + */ + public function setSecretKeyRef($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SecretKeySelector::class); + $this->secret_key_ref = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php new file mode 100644 index 000000000000..2c4d599cde47 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php @@ -0,0 +1,1217 @@ +google.cloud.run.v2.Execution + */ +class Execution extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique name of this Execution. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation = 0; + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $labels; + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $annotations; + /** + * Output only. Represents time when the execution was acknowledged by the + * execution controller. It is not guaranteed to be set in happens-before + * order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Represents time when the execution started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Represents time when the execution was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $completion_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 11; + */ + protected $launch_stage = 0; + /** + * Output only. The name of the parent Job. + * + * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $job = ''; + /** + * Output only. Specifies the maximum desired number of tasks the execution + * should run at any given time. Must be <= task_count. The actual number of + * tasks running in steady state will be less than this number when + * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when + * the work left to do is less than max parallelism. + * + * Generated from protobuf field int32 parallelism = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parallelism = 0; + /** + * Output only. Specifies the desired number of tasks the execution should + * run. Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. + * + * Generated from protobuf field int32 task_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $task_count = 0; + /** + * Output only. The template used to create tasks for this execution. + * + * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $template = null; + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The Condition of this Execution, containing its readiness + * status, and detailed error information in case it did not reach the desired + * state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. The generation of this Execution. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field int64 observed_generation = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $observed_generation = 0; + /** + * Output only. The number of actively running tasks. + * + * Generated from protobuf field int32 running_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $running_count = 0; + /** + * Output only. The number of tasks which reached phase Succeeded. + * + * Generated from protobuf field int32 succeeded_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $succeeded_count = 0; + /** + * Output only. The number of tasks which reached phase Failed. + * + * Generated from protobuf field int32 failed_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failed_count = 0; + /** + * Output only. The number of tasks which reached phase Cancelled. + * + * Generated from protobuf field int32 cancelled_count = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cancelled_count = 0; + /** + * Output only. The number of tasks which have retried at least once. + * + * Generated from protobuf field int32 retried_count = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $retried_count = 0; + /** + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * + * Generated from protobuf field string log_uri = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $log_uri = ''; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique name of this Execution. + * @type string $uid + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type string $creator + * Output only. Email address of the authenticated creator. + * @type int|string $generation + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Represents time when the execution was acknowledged by the + * execution controller. It is not guaranteed to be set in happens-before + * order across separate operations. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Represents time when the execution started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * @type \Google\Protobuf\Timestamp $completion_time + * Output only. Represents time when the execution was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * @type int $launch_stage + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * @type string $job + * Output only. The name of the parent Job. + * @type int $parallelism + * Output only. Specifies the maximum desired number of tasks the execution + * should run at any given time. Must be <= task_count. The actual number of + * tasks running in steady state will be less than this number when + * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when + * the work left to do is less than max parallelism. + * @type int $task_count + * Output only. Specifies the desired number of tasks the execution should + * run. Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. + * @type \Google\Cloud\Run\V2\TaskTemplate $template + * Output only. The template used to create tasks for this execution. + * @type bool $reconciling + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * Output only. The Condition of this Execution, containing its readiness + * status, and detailed error information in case it did not reach the desired + * state. + * @type int|string $observed_generation + * Output only. The generation of this Execution. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * @type int $running_count + * Output only. The number of actively running tasks. + * @type int $succeeded_count + * Output only. The number of tasks which reached phase Succeeded. + * @type int $failed_count + * Output only. The number of tasks which reached phase Failed. + * @type int $cancelled_count + * Output only. The number of tasks which reached phase Cancelled. + * @type int $retried_count + * Output only. The number of tasks which have retried at least once. + * @type string $log_uri + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type string $etag + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique name of this Execution. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique name of this Execution. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. Represents time when the execution was acknowledged by the + * execution controller. It is not guaranteed to be set in happens-before + * order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Represents time when the execution was acknowledged by the + * execution controller. It is not guaranteed to be set in happens-before + * order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Represents time when the execution started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Represents time when the execution started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Represents time when the execution was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCompletionTime() + { + return $this->completion_time; + } + + public function hasCompletionTime() + { + return isset($this->completion_time); + } + + public function clearCompletionTime() + { + unset($this->completion_time); + } + + /** + * Output only. Represents time when the execution was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCompletionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->completion_time = $var; + + return $this; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 11; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 11; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + + /** + * Output only. The name of the parent Job. + * + * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getJob() + { + return $this->job; + } + + /** + * Output only. The name of the parent Job. + * + * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkString($var, True); + $this->job = $var; + + return $this; + } + + /** + * Output only. Specifies the maximum desired number of tasks the execution + * should run at any given time. Must be <= task_count. The actual number of + * tasks running in steady state will be less than this number when + * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when + * the work left to do is less than max parallelism. + * + * Generated from protobuf field int32 parallelism = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getParallelism() + { + return $this->parallelism; + } + + /** + * Output only. Specifies the maximum desired number of tasks the execution + * should run at any given time. Must be <= task_count. The actual number of + * tasks running in steady state will be less than this number when + * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when + * the work left to do is less than max parallelism. + * + * Generated from protobuf field int32 parallelism = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setParallelism($var) + { + GPBUtil::checkInt32($var); + $this->parallelism = $var; + + return $this; + } + + /** + * Output only. Specifies the desired number of tasks the execution should + * run. Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. + * + * Generated from protobuf field int32 task_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTaskCount() + { + return $this->task_count; + } + + /** + * Output only. Specifies the desired number of tasks the execution should + * run. Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. + * + * Generated from protobuf field int32 task_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTaskCount($var) + { + GPBUtil::checkInt32($var); + $this->task_count = $var; + + return $this; + } + + /** + * Output only. The template used to create tasks for this execution. + * + * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\TaskTemplate|null + */ + public function getTemplate() + { + return $this->template; + } + + public function hasTemplate() + { + return isset($this->template); + } + + public function clearTemplate() + { + unset($this->template); + } + + /** + * Output only. The template used to create tasks for this execution. + * + * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\TaskTemplate $var + * @return $this + */ + public function setTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TaskTemplate::class); + $this->template = $var; + + return $this; + } + + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The Condition of this Execution, containing its readiness + * status, and detailed error information in case it did not reach the desired + * state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The Condition of this Execution, containing its readiness + * status, and detailed error information in case it did not reach the desired + * state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. The generation of this Execution. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field int64 observed_generation = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getObservedGeneration() + { + return $this->observed_generation; + } + + /** + * Output only. The generation of this Execution. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field int64 observed_generation = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setObservedGeneration($var) + { + GPBUtil::checkInt64($var); + $this->observed_generation = $var; + + return $this; + } + + /** + * Output only. The number of actively running tasks. + * + * Generated from protobuf field int32 running_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRunningCount() + { + return $this->running_count; + } + + /** + * Output only. The number of actively running tasks. + * + * Generated from protobuf field int32 running_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRunningCount($var) + { + GPBUtil::checkInt32($var); + $this->running_count = $var; + + return $this; + } + + /** + * Output only. The number of tasks which reached phase Succeeded. + * + * Generated from protobuf field int32 succeeded_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSucceededCount() + { + return $this->succeeded_count; + } + + /** + * Output only. The number of tasks which reached phase Succeeded. + * + * Generated from protobuf field int32 succeeded_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSucceededCount($var) + { + GPBUtil::checkInt32($var); + $this->succeeded_count = $var; + + return $this; + } + + /** + * Output only. The number of tasks which reached phase Failed. + * + * Generated from protobuf field int32 failed_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFailedCount() + { + return $this->failed_count; + } + + /** + * Output only. The number of tasks which reached phase Failed. + * + * Generated from protobuf field int32 failed_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFailedCount($var) + { + GPBUtil::checkInt32($var); + $this->failed_count = $var; + + return $this; + } + + /** + * Output only. The number of tasks which reached phase Cancelled. + * + * Generated from protobuf field int32 cancelled_count = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCancelledCount() + { + return $this->cancelled_count; + } + + /** + * Output only. The number of tasks which reached phase Cancelled. + * + * Generated from protobuf field int32 cancelled_count = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCancelledCount($var) + { + GPBUtil::checkInt32($var); + $this->cancelled_count = $var; + + return $this; + } + + /** + * Output only. The number of tasks which have retried at least once. + * + * Generated from protobuf field int32 retried_count = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRetriedCount() + { + return $this->retried_count; + } + + /** + * Output only. The number of tasks which have retried at least once. + * + * Generated from protobuf field int32 retried_count = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRetriedCount($var) + { + GPBUtil::checkInt32($var); + $this->retried_count = $var; + + return $this; + } + + /** + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * + * Generated from protobuf field string log_uri = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLogUri() + { + return $this->log_uri; + } + + /** + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * + * Generated from protobuf field string log_uri = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLogUri($var) + { + GPBUtil::checkString($var, True); + $this->log_uri = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php new file mode 100644 index 000000000000..da77efe77d8f --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php @@ -0,0 +1,61 @@ +google.cloud.run.v2.ExecutionEnvironment + */ +class ExecutionEnvironment +{ + /** + * Unspecified + * + * Generated from protobuf enum EXECUTION_ENVIRONMENT_UNSPECIFIED = 0; + */ + const EXECUTION_ENVIRONMENT_UNSPECIFIED = 0; + /** + * Uses the First Generation environment. + * + * Generated from protobuf enum EXECUTION_ENVIRONMENT_GEN1 = 1; + */ + const EXECUTION_ENVIRONMENT_GEN1 = 1; + /** + * Uses Second Generation environment. + * + * Generated from protobuf enum EXECUTION_ENVIRONMENT_GEN2 = 2; + */ + const EXECUTION_ENVIRONMENT_GEN2 = 2; + + private static $valueToName = [ + self::EXECUTION_ENVIRONMENT_UNSPECIFIED => 'EXECUTION_ENVIRONMENT_UNSPECIFIED', + self::EXECUTION_ENVIRONMENT_GEN1 => 'EXECUTION_ENVIRONMENT_GEN1', + self::EXECUTION_ENVIRONMENT_GEN2 => 'EXECUTION_ENVIRONMENT_GEN2', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php new file mode 100644 index 000000000000..4de3dd33ddee --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php @@ -0,0 +1,238 @@ +google.cloud.run.v2.ExecutionReference + */ +class ExecutionReference extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the execution. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Creation timestamp of the execution. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * Creation timestamp of the execution. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 3; + */ + protected $completion_time = null; + /** + * The deletion time of the execution. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; + */ + protected $delete_time = null; + /** + * Status for the execution completion. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionReference.CompletionStatus completion_status = 4; + */ + protected $completion_status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the execution. + * @type \Google\Protobuf\Timestamp $create_time + * Creation timestamp of the execution. + * @type \Google\Protobuf\Timestamp $completion_time + * Creation timestamp of the execution. + * @type \Google\Protobuf\Timestamp $delete_time + * The deletion time of the execution. It is only + * populated as a response to a Delete request. + * @type int $completion_status + * Status for the execution completion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Name of the execution. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the execution. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Creation timestamp of the execution. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Creation timestamp of the execution. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Creation timestamp of the execution. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCompletionTime() + { + return $this->completion_time; + } + + public function hasCompletionTime() + { + return isset($this->completion_time); + } + + public function clearCompletionTime() + { + unset($this->completion_time); + } + + /** + * Creation timestamp of the execution. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCompletionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->completion_time = $var; + + return $this; + } + + /** + * The deletion time of the execution. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * The deletion time of the execution. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Status for the execution completion. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionReference.CompletionStatus completion_status = 4; + * @return int + */ + public function getCompletionStatus() + { + return $this->completion_status; + } + + /** + * Status for the execution completion. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionReference.CompletionStatus completion_status = 4; + * @param int $var + * @return $this + */ + public function setCompletionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionReference\CompletionStatus::class); + $this->completion_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php new file mode 100644 index 000000000000..329e05e4330a --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php @@ -0,0 +1,85 @@ +google.cloud.run.v2.ExecutionReference.CompletionStatus + */ +class CompletionStatus +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum COMPLETION_STATUS_UNSPECIFIED = 0; + */ + const COMPLETION_STATUS_UNSPECIFIED = 0; + /** + * Job execution has succeeded. + * + * Generated from protobuf enum EXECUTION_SUCCEEDED = 1; + */ + const EXECUTION_SUCCEEDED = 1; + /** + * Job execution has failed. + * + * Generated from protobuf enum EXECUTION_FAILED = 2; + */ + const EXECUTION_FAILED = 2; + /** + * Job execution is running normally. + * + * Generated from protobuf enum EXECUTION_RUNNING = 3; + */ + const EXECUTION_RUNNING = 3; + /** + * Waiting for backing resources to be provisioned. + * + * Generated from protobuf enum EXECUTION_PENDING = 4; + */ + const EXECUTION_PENDING = 4; + /** + * Job execution has been cancelled by the user. + * + * Generated from protobuf enum EXECUTION_CANCELLED = 5; + */ + const EXECUTION_CANCELLED = 5; + + private static $valueToName = [ + self::COMPLETION_STATUS_UNSPECIFIED => 'COMPLETION_STATUS_UNSPECIFIED', + self::EXECUTION_SUCCEEDED => 'EXECUTION_SUCCEEDED', + self::EXECUTION_FAILED => 'EXECUTION_FAILED', + self::EXECUTION_RUNNING => 'EXECUTION_RUNNING', + self::EXECUTION_PENDING => 'EXECUTION_PENDING', + self::EXECUTION_CANCELLED => 'EXECUTION_CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompletionStatus::class, \Google\Cloud\Run\V2\ExecutionReference_CompletionStatus::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php new file mode 100644 index 000000000000..ebfae139e069 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php @@ -0,0 +1,318 @@ +google.cloud.run.v2.ExecutionTemplate + */ +class ExecutionTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 ExecutionTemplate. + * + * Generated from protobuf field map labels = 1; + */ + private $labels; + /** + * Unstructured key value map that may be set by external tools to store and + * arbitrary metadata. They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 ExecutionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 2; + */ + private $annotations; + /** + * Optional. Specifies the maximum desired number of tasks the execution + * should run at given time. When the job is run, if this field is 0 or unset, + * the maximum possible value will be used for that execution. The actual + * number of tasks running in steady state will be less than this number when + * there are fewer tasks waiting to be completed remaining, i.e. when the work + * left to do is less than max parallelism. + * + * Generated from protobuf field int32 parallelism = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parallelism = 0; + /** + * Specifies the desired number of tasks the execution should run. + * Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. Defaults to 1. + * + * Generated from protobuf field int32 task_count = 4; + */ + protected $task_count = 0; + /** + * Required. Describes the task(s) that will be created when executing an + * execution. + * + * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $template = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $labels + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 ExecutionTemplate. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Unstructured key value map that may be set by external tools to store and + * arbitrary metadata. They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 ExecutionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * @type int $parallelism + * Optional. Specifies the maximum desired number of tasks the execution + * should run at given time. When the job is run, if this field is 0 or unset, + * the maximum possible value will be used for that execution. The actual + * number of tasks running in steady state will be less than this number when + * there are fewer tasks waiting to be completed remaining, i.e. when the work + * left to do is less than max parallelism. + * @type int $task_count + * Specifies the desired number of tasks the execution should run. + * Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. Defaults to 1. + * @type \Google\Cloud\Run\V2\TaskTemplate $template + * Required. Describes the task(s) that will be created when executing an + * execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\ExecutionTemplate::initOnce(); + parent::__construct($data); + } + + /** + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 ExecutionTemplate. + * + * Generated from protobuf field map labels = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 ExecutionTemplate. + * + * Generated from protobuf field map labels = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Unstructured key value map that may be set by external tools to store and + * arbitrary metadata. They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 ExecutionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Unstructured key value map that may be set by external tools to store and + * arbitrary metadata. They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 ExecutionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Optional. Specifies the maximum desired number of tasks the execution + * should run at given time. When the job is run, if this field is 0 or unset, + * the maximum possible value will be used for that execution. The actual + * number of tasks running in steady state will be less than this number when + * there are fewer tasks waiting to be completed remaining, i.e. when the work + * left to do is less than max parallelism. + * + * Generated from protobuf field int32 parallelism = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getParallelism() + { + return $this->parallelism; + } + + /** + * Optional. Specifies the maximum desired number of tasks the execution + * should run at given time. When the job is run, if this field is 0 or unset, + * the maximum possible value will be used for that execution. The actual + * number of tasks running in steady state will be less than this number when + * there are fewer tasks waiting to be completed remaining, i.e. when the work + * left to do is less than max parallelism. + * + * Generated from protobuf field int32 parallelism = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setParallelism($var) + { + GPBUtil::checkInt32($var); + $this->parallelism = $var; + + return $this; + } + + /** + * Specifies the desired number of tasks the execution should run. + * Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. Defaults to 1. + * + * Generated from protobuf field int32 task_count = 4; + * @return int + */ + public function getTaskCount() + { + return $this->task_count; + } + + /** + * Specifies the desired number of tasks the execution should run. + * Setting to 1 means that parallelism is limited to 1 and the success of + * that task signals the success of the execution. Defaults to 1. + * + * Generated from protobuf field int32 task_count = 4; + * @param int $var + * @return $this + */ + public function setTaskCount($var) + { + GPBUtil::checkInt32($var); + $this->task_count = $var; + + return $this; + } + + /** + * Required. Describes the task(s) that will be created when executing an + * execution. + * + * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\TaskTemplate|null + */ + public function getTemplate() + { + return $this->template; + } + + public function hasTemplate() + { + return isset($this->template); + } + + public function clearTemplate() + { + unset($this->template); + } + + /** + * Required. Describes the task(s) that will be created when executing an + * execution. + * + * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\TaskTemplate $var + * @return $this + */ + public function setTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TaskTemplate::class); + $this->template = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php new file mode 100644 index 000000000000..659846b4e6bd --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php @@ -0,0 +1,140 @@ +google.cloud.run.v2.GCSVolumeSource + */ +class GCSVolumeSource extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage Bucket name. + * + * Generated from protobuf field string bucket = 1; + */ + protected $bucket = ''; + /** + * If true, the volume will be mounted as read only for all mounts. + * + * Generated from protobuf field bool read_only = 2; + */ + protected $read_only = false; + /** + * A list of additional flags to pass to the gcsfuse CLI. + * Options should be specified without the leading "--". + * + * Generated from protobuf field repeated string mount_options = 3; + */ + private $mount_options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Cloud Storage Bucket name. + * @type bool $read_only + * If true, the volume will be mounted as read only for all mounts. + * @type array|\Google\Protobuf\Internal\RepeatedField $mount_options + * A list of additional flags to pass to the gcsfuse CLI. + * Options should be specified without the leading "--". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage Bucket name. + * + * Generated from protobuf field string bucket = 1; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Cloud Storage Bucket name. + * + * Generated from protobuf field string bucket = 1; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * If true, the volume will be mounted as read only for all mounts. + * + * Generated from protobuf field bool read_only = 2; + * @return bool + */ + public function getReadOnly() + { + return $this->read_only; + } + + /** + * If true, the volume will be mounted as read only for all mounts. + * + * Generated from protobuf field bool read_only = 2; + * @param bool $var + * @return $this + */ + public function setReadOnly($var) + { + GPBUtil::checkBool($var); + $this->read_only = $var; + + return $this; + } + + /** + * A list of additional flags to pass to the gcsfuse CLI. + * Options should be specified without the leading "--". + * + * Generated from protobuf field repeated string mount_options = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMountOptions() + { + return $this->mount_options; + } + + /** + * A list of additional flags to pass to the gcsfuse CLI. + * Options should be specified without the leading "--". + * + * Generated from protobuf field repeated string mount_options = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMountOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mount_options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php new file mode 100644 index 000000000000..826f06cb4711 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php @@ -0,0 +1,121 @@ +google.cloud.run.v2.GRPCAction + */ +class GRPCAction extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Port number of the gRPC service. Number must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $port = 0; + /** + * Optional. Service is the name of the service to place in the gRPC + * HealthCheckRequest (see + * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this + * is not specified, the default behavior is defined by gRPC. + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $port + * Optional. Port number of the gRPC service. Number must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * @type string $service + * Optional. Service is the name of the service to place in the gRPC + * HealthCheckRequest (see + * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this + * is not specified, the default behavior is defined by gRPC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Port number of the gRPC service. Number must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Optional. Port number of the gRPC service. Number must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Optional. Service is the name of the service to place in the gRPC + * HealthCheckRequest (see + * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this + * is not specified, the default behavior is defined by gRPC. + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Optional. Service is the name of the service to place in the gRPC + * HealthCheckRequest (see + * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this + * is not specified, the default behavior is defined by gRPC. + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php new file mode 100644 index 000000000000..8ecf98e5ef55 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php @@ -0,0 +1,96 @@ +google.cloud.run.v2.GetExecutionRequest + */ +class GetExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Execution. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the Execution. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. Please see + * {@see ExecutionsClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\GetExecutionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Execution. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Execution. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Execution. + * Format: + * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetInstanceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetInstanceRequest.php new file mode 100644 index 000000000000..f32ee862bb05 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.run.v2.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Please see {@see InstancesClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php new file mode 100644 index 000000000000..8d43efd711f4 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php @@ -0,0 +1,91 @@ +google.cloud.run.v2.GetJobRequest + */ +class GetJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. Please see + * {@see JobsClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\GetJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php new file mode 100644 index 000000000000..23fa3012691d --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php @@ -0,0 +1,91 @@ +google.cloud.run.v2.GetRevisionRequest + */ +class GetRevisionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Revision. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the Revision. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * Please see {@see RevisionsClient::revisionName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\GetRevisionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Revision. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Revision. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Revision. + * Format: + * projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php new file mode 100644 index 000000000000..4a5aeb399c01 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php @@ -0,0 +1,91 @@ +google.cloud.run.v2.GetServiceRequest + */ +class GetServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. Please see + * {@see ServicesClient::serviceName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\GetServiceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Service. + * Format: projects/{project}/locations/{location}/services/{service}, where + * {project} can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php new file mode 100644 index 000000000000..925a9bb98395 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php @@ -0,0 +1,91 @@ +google.cloud.run.v2.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Task. + * Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the Task. + * Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} + * Please see {@see TasksClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\GetTaskRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Task. + * Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Task. + * Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Task. + * Format: + * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php new file mode 100644 index 000000000000..2e28539a3c31 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php @@ -0,0 +1,96 @@ +google.cloud.run.v2.GetWorkerPoolRequest + */ +class GetWorkerPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. Please see + * {@see WorkerPoolsClient::workerPoolName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\GetWorkerPoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the WorkerPool. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php new file mode 100644 index 000000000000..371a24d2a139 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php @@ -0,0 +1,147 @@ +google.cloud.run.v2.HTTPGetAction + */ +class HTTPGetAction extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Path to access on the HTTP server. Defaults to '/'. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + /** + * Optional. Custom headers to set in the request. HTTP allows repeated + * headers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.HTTPHeader http_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $http_headers; + /** + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Optional. Path to access on the HTTP server. Defaults to '/'. + * @type array<\Google\Cloud\Run\V2\HTTPHeader>|\Google\Protobuf\Internal\RepeatedField $http_headers + * Optional. Custom headers to set in the request. HTTP allows repeated + * headers. + * @type int $port + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Path to access on the HTTP server. Defaults to '/'. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. Path to access on the HTTP server. Defaults to '/'. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional. Custom headers to set in the request. HTTP allows repeated + * headers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.HTTPHeader http_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHttpHeaders() + { + return $this->http_headers; + } + + /** + * Optional. Custom headers to set in the request. HTTP allows repeated + * headers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.HTTPHeader http_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Run\V2\HTTPHeader>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHttpHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\HTTPHeader::class); + $this->http_headers = $arr; + + return $this; + } + + /** + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php new file mode 100644 index 000000000000..036332d24bb8 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php @@ -0,0 +1,101 @@ +google.cloud.run.v2.HTTPHeader + */ +class HTTPHeader extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The header field name + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. The header field value + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The header field name + * @type string $value + * Optional. The header field value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The header field name + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The header field name + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The header field value + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. The header field value + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php new file mode 100644 index 000000000000..c9e391f2e464 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php @@ -0,0 +1,75 @@ +google.cloud.run.v2.IngressTraffic + */ +class IngressTraffic +{ + /** + * Unspecified + * + * Generated from protobuf enum INGRESS_TRAFFIC_UNSPECIFIED = 0; + */ + const INGRESS_TRAFFIC_UNSPECIFIED = 0; + /** + * All inbound traffic is allowed. + * + * Generated from protobuf enum INGRESS_TRAFFIC_ALL = 1; + */ + const INGRESS_TRAFFIC_ALL = 1; + /** + * Only internal traffic is allowed. + * + * Generated from protobuf enum INGRESS_TRAFFIC_INTERNAL_ONLY = 2; + */ + const INGRESS_TRAFFIC_INTERNAL_ONLY = 2; + /** + * Both internal and Google Cloud Load Balancer traffic is allowed. + * + * Generated from protobuf enum INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER = 3; + */ + const INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER = 3; + /** + * No ingress traffic is allowed. + * + * Generated from protobuf enum INGRESS_TRAFFIC_NONE = 4; + */ + const INGRESS_TRAFFIC_NONE = 4; + + private static $valueToName = [ + self::INGRESS_TRAFFIC_UNSPECIFIED => 'INGRESS_TRAFFIC_UNSPECIFIED', + self::INGRESS_TRAFFIC_ALL => 'INGRESS_TRAFFIC_ALL', + self::INGRESS_TRAFFIC_INTERNAL_ONLY => 'INGRESS_TRAFFIC_INTERNAL_ONLY', + self::INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER => 'INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER', + self::INGRESS_TRAFFIC_NONE => 'INGRESS_TRAFFIC_NONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Instance.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Instance.php new file mode 100644 index 000000000000..c1ed7068c81f --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Instance.php @@ -0,0 +1,1579 @@ +google.cloud.run.v2.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * The fully qualified name of this Instance. In CreateInstanceRequest, this + * field is ignored, and instead composed from CreateInstanceRequest.parent + * and CreateInstanceRequest.instance_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance_id} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * User-provided description of the Instance. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation = 0; + /** + * Generated from protobuf field map labels = 6; + */ + private $labels; + /** + * Generated from protobuf field map annotations = 7; + */ + private $annotations; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The deletion time. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modifier = ''; + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 14; + */ + protected $client = ''; + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 15; + */ + protected $client_version = ''; + /** + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + *

+ * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16; + */ + protected $launch_stage = 0; + /** + * Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + */ + protected $binary_authorization = null; + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vpc_access = null; + /** + * Generated from protobuf field string service_account = 19; + */ + protected $service_account = ''; + /** + * Required. Holds the single container that defines the unit of execution for + * this Instance. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + */ + private $containers; + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 21; + */ + private $volumes; + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 22 [(.google.api.resource_reference) = { + */ + protected $encryption_key = ''; + /** + * The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + */ + protected $encryption_key_revocation_action = 0; + /** + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 25; + */ + protected $encryption_key_shutdown_duration = null; + /** + * Optional. The node selector for the instance. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_selector = null; + /** + * Optional. True if GPU zonal redundancy is disabled on this instance. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gpu_zonal_redundancy_disabled = null; + /** + * Optional. Provides the ingress settings for this Instance. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * + * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ingress = 0; + /** + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this Instance. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * + * Generated from protobuf field bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $invoker_iam_disabled = false; + /** + * Optional. IAP settings on the Instance. + * + * Generated from protobuf field bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $iap_enabled = false; + /** + * Output only. The generation of this Instance currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $observed_generation = 0; + /** + * Output only. The Google Console URI to obtain logs for the Instance. + * + * Generated from protobuf field string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $log_uri = ''; + /** + * Output only. The Condition of this Instance, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $terminal_condition = null; + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Instance does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. Status information for each of the specified containers. The + * status includes the resolved digest for specified images. + * + * Generated from protobuf field repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $container_statuses; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. All URLs serving traffic for this Instance. + * + * Generated from protobuf field repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $urls; + /** + * Output only. Returns true if the Instance is currently being acted upon by + * the system to bring it into the desired state. + * When a new Instance is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Instance to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation` will have a transient + * value that might mismatch the intended state. + * Once reconciliation is over (and this field is false), there are two + * possible outcomes: reconciliation succeeded and the serving state matches + * the Instance, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The fully qualified name of this Instance. In CreateInstanceRequest, this + * field is ignored, and instead composed from CreateInstanceRequest.parent + * and CreateInstanceRequest.instance_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance_id} + * @type string $description + * User-provided description of the Instance. This field currently has a + * 512-character limit. + * @type string $uid + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type int|string $generation + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * @type array|\Google\Protobuf\Internal\MapField $annotations + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The deletion time. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * @type string $creator + * Output only. Email address of the authenticated creator. + * @type string $last_modifier + * Output only. Email address of the last authenticated modifier. + * @type string $client + * Arbitrary identifier for the API client. + * @type string $client_version + * Arbitrary version identifier for the API client. + * @type int $launch_stage + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + *

+ * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * @type \Google\Cloud\Run\V2\BinaryAuthorization $binary_authorization + * Settings for the Binary Authorization feature. + * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * @type string $service_account + * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Required. Holds the single container that defines the unit of execution for + * this Instance. + * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * A list of Volumes to make available to containers. + * @type string $encryption_key + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * @type int $encryption_key_revocation_action + * The action to take if the encryption key is revoked. + * @type \Google\Protobuf\Duration $encryption_key_shutdown_duration + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * @type \Google\Cloud\Run\V2\NodeSelector $node_selector + * Optional. The node selector for the instance. + * @type bool $gpu_zonal_redundancy_disabled + * Optional. True if GPU zonal redundancy is disabled on this instance. + * @type int $ingress + * Optional. Provides the ingress settings for this Instance. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * @type bool $invoker_iam_disabled + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this Instance. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * @type bool $iap_enabled + * Optional. IAP settings on the Instance. + * @type int|string $observed_generation + * Output only. The generation of this Instance currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * @type string $log_uri + * Output only. The Google Console URI to obtain logs for the Instance. + * @type \Google\Cloud\Run\V2\Condition $terminal_condition + * Output only. The Condition of this Instance, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Instance does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * @type array<\Google\Cloud\Run\V2\ContainerStatus>|\Google\Protobuf\Internal\RepeatedField $container_statuses + * Output only. Status information for each of the specified containers. The + * status includes the resolved digest for specified images. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type array|\Google\Protobuf\Internal\RepeatedField $urls + * Output only. All URLs serving traffic for this Instance. + * @type bool $reconciling + * Output only. Returns true if the Instance is currently being acted upon by + * the system to bring it into the desired state. + * When a new Instance is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Instance to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation` will have a transient + * value that might mismatch the intended state. + * Once reconciliation is over (and this field is false), there are two + * possible outcomes: reconciliation succeeded and the serving state matches + * the Instance, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * @type string $etag + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The fully qualified name of this Instance. In CreateInstanceRequest, this + * field is ignored, and instead composed from CreateInstanceRequest.parent + * and CreateInstanceRequest.instance_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance_id} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The fully qualified name of this Instance. In CreateInstanceRequest, this + * field is ignored, and instead composed from CreateInstanceRequest.parent + * and CreateInstanceRequest.instance_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance_id} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * User-provided description of the Instance. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the Instance. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + + /** + * Generated from protobuf field map labels = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Generated from protobuf field map labels = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Generated from protobuf field map annotations = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Generated from protobuf field map annotations = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The deletion time. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The deletion time. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastModifier() + { + return $this->last_modifier; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastModifier($var) + { + GPBUtil::checkString($var, True); + $this->last_modifier = $var; + + return $this; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 14; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 14; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 15; + * @return string + */ + public function getClientVersion() + { + return $this->client_version; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 15; + * @param string $var + * @return $this + */ + public function setClientVersion($var) + { + GPBUtil::checkString($var, True); + $this->client_version = $var; + + return $this; + } + + /** + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + *

+ * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + *

+ * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + + /** + * Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * @return \Google\Cloud\Run\V2\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17; + * @param \Google\Cloud\Run\V2\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\VpcAccess|null + */ + public function getVpcAccess() + { + return $this->vpc_access; + } + + public function hasVpcAccess() + { + return isset($this->vpc_access); + } + + public function clearVpcAccess() + { + unset($this->vpc_access); + } + + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\VpcAccess $var + * @return $this + */ + public function setVpcAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); + $this->vpc_access = $var; + + return $this; + } + + /** + * Generated from protobuf field string service_account = 19; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Generated from protobuf field string service_account = 19; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Required. Holds the single container that defines the unit of execution for + * this Instance. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Required. Holds the single container that defines the unit of execution for + * this Instance. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 20 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); + $this->containers = $arr; + + return $this; + } + + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 21; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 21; + * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 22 [(.google.api.resource_reference) = { + * @return string + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 22 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->encryption_key = $var; + + return $this; + } + + /** + * The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * @return int + */ + public function getEncryptionKeyRevocationAction() + { + return $this->encryption_key_revocation_action; + } + + /** + * The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 24; + * @param int $var + * @return $this + */ + public function setEncryptionKeyRevocationAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class); + $this->encryption_key_revocation_action = $var; + + return $this; + } + + /** + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * @return \Google\Protobuf\Duration|null + */ + public function getEncryptionKeyShutdownDuration() + { + return $this->encryption_key_shutdown_duration; + } + + public function hasEncryptionKeyShutdownDuration() + { + return isset($this->encryption_key_shutdown_duration); + } + + public function clearEncryptionKeyShutdownDuration() + { + unset($this->encryption_key_shutdown_duration); + } + + /** + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 25; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEncryptionKeyShutdownDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->encryption_key_shutdown_duration = $var; + + return $this; + } + + /** + * Optional. The node selector for the instance. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\NodeSelector|null + */ + public function getNodeSelector() + { + return $this->node_selector; + } + + public function hasNodeSelector() + { + return isset($this->node_selector); + } + + public function clearNodeSelector() + { + unset($this->node_selector); + } + + /** + * Optional. The node selector for the instance. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\NodeSelector $var + * @return $this + */ + public function setNodeSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); + $this->node_selector = $var; + + return $this; + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this instance. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; + } + + public function hasGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled); + } + + public function clearGpuZonalRedundancyDisabled() + { + unset($this->gpu_zonal_redundancy_disabled); + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this instance. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setGpuZonalRedundancyDisabled($var) + { + GPBUtil::checkBool($var); + $this->gpu_zonal_redundancy_disabled = $var; + + return $this; + } + + /** + * Optional. Provides the ingress settings for this Instance. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * + * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIngress() + { + return $this->ingress; + } + + /** + * Optional. Provides the ingress settings for this Instance. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * + * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 28 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIngress($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\IngressTraffic::class); + $this->ingress = $var; + + return $this; + } + + /** + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this Instance. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * + * Generated from protobuf field bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getInvokerIamDisabled() + { + return $this->invoker_iam_disabled; + } + + /** + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this Instance. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * + * Generated from protobuf field bool invoker_iam_disabled = 29 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setInvokerIamDisabled($var) + { + GPBUtil::checkBool($var); + $this->invoker_iam_disabled = $var; + + return $this; + } + + /** + * Optional. IAP settings on the Instance. + * + * Generated from protobuf field bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIapEnabled() + { + return $this->iap_enabled; + } + + /** + * Optional. IAP settings on the Instance. + * + * Generated from protobuf field bool iap_enabled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIapEnabled($var) + { + GPBUtil::checkBool($var); + $this->iap_enabled = $var; + + return $this; + } + + /** + * Output only. The generation of this Instance currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getObservedGeneration() + { + return $this->observed_generation; + } + + /** + * Output only. The generation of this Instance currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setObservedGeneration($var) + { + GPBUtil::checkInt64($var); + $this->observed_generation = $var; + + return $this; + } + + /** + * Output only. The Google Console URI to obtain logs for the Instance. + * + * Generated from protobuf field string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLogUri() + { + return $this->log_uri; + } + + /** + * Output only. The Google Console URI to obtain logs for the Instance. + * + * Generated from protobuf field string log_uri = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLogUri($var) + { + GPBUtil::checkString($var, True); + $this->log_uri = $var; + + return $this; + } + + /** + * Output only. The Condition of this Instance, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\Condition|null + */ + public function getTerminalCondition() + { + return $this->terminal_condition; + } + + public function hasTerminalCondition() + { + return isset($this->terminal_condition); + } + + public function clearTerminalCondition() + { + unset($this->terminal_condition); + } + + /** + * Output only. The Condition of this Instance, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\Condition $var + * @return $this + */ + public function setTerminalCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Condition::class); + $this->terminal_condition = $var; + + return $this; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Instance does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Instance does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. Status information for each of the specified containers. The + * status includes the resolved digest for specified images. + * + * Generated from protobuf field repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainerStatuses() + { + return $this->container_statuses; + } + + /** + * Output only. Status information for each of the specified containers. The + * status includes the resolved digest for specified images. + * + * Generated from protobuf field repeated .google.cloud.run.v2.ContainerStatus container_statuses = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\ContainerStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainerStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\ContainerStatus::class); + $this->container_statuses = $arr; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. All URLs serving traffic for this Instance. + * + * Generated from protobuf field repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Output only. All URLs serving traffic for this Instance. + * + * Generated from protobuf field repeated string urls = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->urls = $arr; + + return $this; + } + + /** + * Output only. Returns true if the Instance is currently being acted upon by + * the system to bring it into the desired state. + * When a new Instance is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Instance to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation` will have a transient + * value that might mismatch the intended state. + * Once reconciliation is over (and this field is false), there are two + * possible outcomes: reconciliation succeeded and the serving state matches + * the Instance, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Returns true if the Instance is currently being acted upon by + * the system to bring it into the desired state. + * When a new Instance is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Instance to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation` will have a transient + * value that might mismatch the intended state. + * Once reconciliation is over (and this field is false), there are two + * possible outcomes: reconciliation succeeded and the serving state matches + * the Instance, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php new file mode 100644 index 000000000000..70a53b9e4157 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php @@ -0,0 +1,144 @@ +google.cloud.run.v2.InstanceSplit + */ +class InstanceSplit extends \Google\Protobuf\Internal\Message +{ + /** + * The allocation type for this instance split. + * + * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; + */ + protected $type = 0; + /** + * Revision to which to assign this portion of instances, if split allocation + * is by revision. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + */ + protected $revision = ''; + /** + * Specifies percent of the instance split to this Revision. + * This defaults to zero if unspecified. + * + * Generated from protobuf field int32 percent = 3; + */ + protected $percent = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The allocation type for this instance split. + * @type string $revision + * Revision to which to assign this portion of instances, if split allocation + * is by revision. + * @type int $percent + * Specifies percent of the instance split to this Revision. + * This defaults to zero if unspecified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\InstanceSplit::initOnce(); + parent::__construct($data); + } + + /** + * The allocation type for this instance split. + * + * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The allocation type for this instance split. + * + * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\InstanceSplitAllocationType::class); + $this->type = $var; + + return $this; + } + + /** + * Revision to which to assign this portion of instances, if split allocation + * is by revision. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Revision to which to assign this portion of instances, if split allocation + * is by revision. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Specifies percent of the instance split to this Revision. + * This defaults to zero if unspecified. + * + * Generated from protobuf field int32 percent = 3; + * @return int + */ + public function getPercent() + { + return $this->percent; + } + + /** + * Specifies percent of the instance split to this Revision. + * This defaults to zero if unspecified. + * + * Generated from protobuf field int32 percent = 3; + * @param int $var + * @return $this + */ + public function setPercent($var) + { + GPBUtil::checkInt32($var); + $this->percent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php new file mode 100644 index 000000000000..39b29c52f47f --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php @@ -0,0 +1,61 @@ +google.cloud.run.v2.InstanceSplitAllocationType + */ +class InstanceSplitAllocationType +{ + /** + * Unspecified instance allocation type. + * + * Generated from protobuf enum INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED = 0; + */ + const INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED = 0; + /** + * Allocates instances to the Service's latest ready Revision. + * + * Generated from protobuf enum INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST = 1; + */ + const INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST = 1; + /** + * Allocates instances to a Revision by name. + * + * Generated from protobuf enum INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION = 2; + */ + const INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION = 2; + + private static $valueToName = [ + self::INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED => 'INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED', + self::INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST => 'INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST', + self::INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION => 'INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php new file mode 100644 index 000000000000..e938cdff39b3 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php @@ -0,0 +1,135 @@ +google.cloud.run.v2.InstanceSplitStatus + */ +class InstanceSplitStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The allocation type for this instance split. + * + * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; + */ + protected $type = 0; + /** + * Revision to which this instance split is assigned. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + */ + protected $revision = ''; + /** + * Specifies percent of the instance split to this Revision. + * + * Generated from protobuf field int32 percent = 3; + */ + protected $percent = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The allocation type for this instance split. + * @type string $revision + * Revision to which this instance split is assigned. + * @type int $percent + * Specifies percent of the instance split to this Revision. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\InstanceSplit::initOnce(); + parent::__construct($data); + } + + /** + * The allocation type for this instance split. + * + * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The allocation type for this instance split. + * + * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\InstanceSplitAllocationType::class); + $this->type = $var; + + return $this; + } + + /** + * Revision to which this instance split is assigned. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Revision to which this instance split is assigned. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Specifies percent of the instance split to this Revision. + * + * Generated from protobuf field int32 percent = 3; + * @return int + */ + public function getPercent() + { + return $this->percent; + } + + /** + * Specifies percent of the instance split to this Revision. + * + * Generated from protobuf field int32 percent = 3; + * @param int $var + * @return $this + */ + public function setPercent($var) + { + GPBUtil::checkInt32($var); + $this->percent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php new file mode 100644 index 000000000000..3a7f4ea5d25c --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php @@ -0,0 +1,1245 @@ +google.cloud.run.v2.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * The fully qualified name of this Job. + * Format: + * projects/{project}/locations/{location}/jobs/{job} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation = 0; + /** + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Job. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected on new resources. All system + * annotations in v1 now have a corresponding field in v2 Job. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 5; + */ + private $annotations; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modifier = ''; + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 12; + */ + protected $client = ''; + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 13; + */ + protected $client_version = ''; + /** + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 14; + */ + protected $launch_stage = 0; + /** + * Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 15; + */ + protected $binary_authorization = null; + /** + * Required. The template used to create executions for this Job. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionTemplate template = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $template = null; + /** + * Output only. The generation of this Job. See comments in `reconciling` for + * additional information on reconciliation process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $observed_generation = 0; + /** + * Output only. The Condition of this Job, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $terminal_condition = null; + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Job does not reach + * its desired state. See comments in `reconciling` for additional information + * on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. Number of executions created for this job. + * + * Generated from protobuf field int32 execution_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $execution_count = 0; + /** + * Output only. Name of the last created execution. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionReference latest_created_execution = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_created_execution = null; + /** + * Output only. Returns true if the Job is currently being acted upon by the + * system to bring it into the desired state. + * When a new Job is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Job to the + * desired state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation` and + * `latest_succeeded_execution`, will have transient values that might + * mismatch the intended state: Once reconciliation is over (and this field is + * false), there are two possible outcomes: reconciliation succeeded and the + * state matches the Job, or there was an error, and reconciliation failed. + * This state can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `observed_generation` and `generation`, `latest_succeeded_execution` and + * `latest_created_execution`. + * If reconciliation failed, `observed_generation` and + * `latest_succeeded_execution` will have the state of the last succeeded + * execution or empty for newly created Job. Additional information on the + * failure can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + protected $create_execution; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The fully qualified name of this Job. + * Format: + * projects/{project}/locations/{location}/jobs/{job} + * @type string $uid + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type int|string $generation + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Job. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected on new resources. All system + * annotations in v1 now have a corresponding field in v2 Job. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * @type string $creator + * Output only. Email address of the authenticated creator. + * @type string $last_modifier + * Output only. Email address of the last authenticated modifier. + * @type string $client + * Arbitrary identifier for the API client. + * @type string $client_version + * Arbitrary version identifier for the API client. + * @type int $launch_stage + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * @type \Google\Cloud\Run\V2\BinaryAuthorization $binary_authorization + * Settings for the Binary Authorization feature. + * @type \Google\Cloud\Run\V2\ExecutionTemplate $template + * Required. The template used to create executions for this Job. + * @type int|string $observed_generation + * Output only. The generation of this Job. See comments in `reconciling` for + * additional information on reconciliation process in Cloud Run. + * @type \Google\Cloud\Run\V2\Condition $terminal_condition + * Output only. The Condition of this Job, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Job does not reach + * its desired state. See comments in `reconciling` for additional information + * on reconciliation process in Cloud Run. + * @type int $execution_count + * Output only. Number of executions created for this job. + * @type \Google\Cloud\Run\V2\ExecutionReference $latest_created_execution + * Output only. Name of the last created execution. + * @type bool $reconciling + * Output only. Returns true if the Job is currently being acted upon by the + * system to bring it into the desired state. + * When a new Job is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Job to the + * desired state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation` and + * `latest_succeeded_execution`, will have transient values that might + * mismatch the intended state: Once reconciliation is over (and this field is + * false), there are two possible outcomes: reconciliation succeeded and the + * state matches the Job, or there was an error, and reconciliation failed. + * This state can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `observed_generation` and `generation`, `latest_succeeded_execution` and + * `latest_created_execution`. + * If reconciliation failed, `observed_generation` and + * `latest_succeeded_execution` will have the state of the last succeeded + * execution or empty for newly created Job. Additional information on the + * failure can be found in `terminal_condition` and `conditions`. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type string $start_execution_token + * A unique string used as a suffix creating a new execution. The Job will + * become ready when the execution is successfully started. + * The sum of job name and token length must be fewer than 63 characters. + * @type string $run_execution_token + * A unique string used as a suffix for creating a new execution. The Job + * will become ready when the execution is successfully completed. + * The sum of job name and token length must be fewer than 63 characters. + * @type string $etag + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * The fully qualified name of this Job. + * Format: + * projects/{project}/locations/{location}/jobs/{job} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The fully qualified name of this Job. + * Format: + * projects/{project}/locations/{location}/jobs/{job} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the Execution. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + + /** + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Job. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Unstructured key value map that can be used to organize and categorize + * objects. + * User-provided labels are shared with Google's billing system, so they can + * be used to filter, or break down billing charges by team, component, + * environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Job. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected on new resources. All system + * annotations in v1 now have a corresponding field in v2 Job. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected on new resources. All system + * annotations in v1 now have a corresponding field in v2 Job. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastModifier() + { + return $this->last_modifier; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastModifier($var) + { + GPBUtil::checkString($var, True); + $this->last_modifier = $var; + + return $this; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 12; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 12; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 13; + * @return string + */ + public function getClientVersion() + { + return $this->client_version; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 13; + * @param string $var + * @return $this + */ + public function setClientVersion($var) + { + GPBUtil::checkString($var, True); + $this->client_version = $var; + + return $this; + } + + /** + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 14; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 14; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + + /** + * Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 15; + * @return \Google\Cloud\Run\V2\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 15; + * @param \Google\Cloud\Run\V2\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + + /** + * Required. The template used to create executions for this Job. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionTemplate template = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\ExecutionTemplate|null + */ + public function getTemplate() + { + return $this->template; + } + + public function hasTemplate() + { + return isset($this->template); + } + + public function clearTemplate() + { + unset($this->template); + } + + /** + * Required. The template used to create executions for this Job. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionTemplate template = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\ExecutionTemplate $var + * @return $this + */ + public function setTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ExecutionTemplate::class); + $this->template = $var; + + return $this; + } + + /** + * Output only. The generation of this Job. See comments in `reconciling` for + * additional information on reconciliation process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getObservedGeneration() + { + return $this->observed_generation; + } + + /** + * Output only. The generation of this Job. See comments in `reconciling` for + * additional information on reconciliation process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setObservedGeneration($var) + { + GPBUtil::checkInt64($var); + $this->observed_generation = $var; + + return $this; + } + + /** + * Output only. The Condition of this Job, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\Condition|null + */ + public function getTerminalCondition() + { + return $this->terminal_condition; + } + + public function hasTerminalCondition() + { + return isset($this->terminal_condition); + } + + public function clearTerminalCondition() + { + unset($this->terminal_condition); + } + + /** + * Output only. The Condition of this Job, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\Condition $var + * @return $this + */ + public function setTerminalCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Condition::class); + $this->terminal_condition = $var; + + return $this; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Job does not reach + * its desired state. See comments in `reconciling` for additional information + * on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Job does not reach + * its desired state. See comments in `reconciling` for additional information + * on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. Number of executions created for this job. + * + * Generated from protobuf field int32 execution_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getExecutionCount() + { + return $this->execution_count; + } + + /** + * Output only. Number of executions created for this job. + * + * Generated from protobuf field int32 execution_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setExecutionCount($var) + { + GPBUtil::checkInt32($var); + $this->execution_count = $var; + + return $this; + } + + /** + * Output only. Name of the last created execution. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionReference latest_created_execution = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\ExecutionReference|null + */ + public function getLatestCreatedExecution() + { + return $this->latest_created_execution; + } + + public function hasLatestCreatedExecution() + { + return isset($this->latest_created_execution); + } + + public function clearLatestCreatedExecution() + { + unset($this->latest_created_execution); + } + + /** + * Output only. Name of the last created execution. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionReference latest_created_execution = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\ExecutionReference $var + * @return $this + */ + public function setLatestCreatedExecution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ExecutionReference::class); + $this->latest_created_execution = $var; + + return $this; + } + + /** + * Output only. Returns true if the Job is currently being acted upon by the + * system to bring it into the desired state. + * When a new Job is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Job to the + * desired state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation` and + * `latest_succeeded_execution`, will have transient values that might + * mismatch the intended state: Once reconciliation is over (and this field is + * false), there are two possible outcomes: reconciliation succeeded and the + * state matches the Job, or there was an error, and reconciliation failed. + * This state can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `observed_generation` and `generation`, `latest_succeeded_execution` and + * `latest_created_execution`. + * If reconciliation failed, `observed_generation` and + * `latest_succeeded_execution` will have the state of the last succeeded + * execution or empty for newly created Job. Additional information on the + * failure can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Returns true if the Job is currently being acted upon by the + * system to bring it into the desired state. + * When a new Job is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Job to the + * desired state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation` and + * `latest_succeeded_execution`, will have transient values that might + * mismatch the intended state: Once reconciliation is over (and this field is + * false), there are two possible outcomes: reconciliation succeeded and the + * state matches the Job, or there was an error, and reconciliation failed. + * This state can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `observed_generation` and `generation`, `latest_succeeded_execution` and + * `latest_created_execution`. + * If reconciliation failed, `observed_generation` and + * `latest_succeeded_execution` will have the state of the last succeeded + * execution or empty for newly created Job. Additional information on the + * failure can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * A unique string used as a suffix creating a new execution. The Job will + * become ready when the execution is successfully started. + * The sum of job name and token length must be fewer than 63 characters. + * + * Generated from protobuf field string start_execution_token = 26; + * @return string + */ + public function getStartExecutionToken() + { + return $this->readOneof(26); + } + + public function hasStartExecutionToken() + { + return $this->hasOneof(26); + } + + /** + * A unique string used as a suffix creating a new execution. The Job will + * become ready when the execution is successfully started. + * The sum of job name and token length must be fewer than 63 characters. + * + * Generated from protobuf field string start_execution_token = 26; + * @param string $var + * @return $this + */ + public function setStartExecutionToken($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * A unique string used as a suffix for creating a new execution. The Job + * will become ready when the execution is successfully completed. + * The sum of job name and token length must be fewer than 63 characters. + * + * Generated from protobuf field string run_execution_token = 27; + * @return string + */ + public function getRunExecutionToken() + { + return $this->readOneof(27); + } + + public function hasRunExecutionToken() + { + return $this->hasOneof(27); + } + + /** + * A unique string used as a suffix for creating a new execution. The Job + * will become ready when the execution is successfully completed. + * The sum of job name and token length must be fewer than 63 characters. + * + * Generated from protobuf field string run_execution_token = 27; + * @param string $var + * @return $this + */ + public function setRunExecutionToken($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * @return string + */ + public function getCreateExecution() + { + return $this->whichOneof("create_execution"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php new file mode 100644 index 000000000000..909879ad84ea --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php @@ -0,0 +1,202 @@ +google.cloud.run.v2.ListExecutionsRequest + */ +class ListExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of Executions to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token received from a previous call to ListExecutions. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $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}`, where + * `{project}` can be project id or number. Please see + * {@see ExecutionsClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\ListExecutionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $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}`, where + * `{project}` can be project id or number. + * @type int $page_size + * Maximum number of Executions to return in this call. + * @type string $page_token + * A page token received from a previous call to ListExecutions. + * All other parameters must match. + * @type bool $show_deleted + * If true, returns deleted (but unexpired) resources along with active ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); + parent::__construct($data); + } + + /** + * 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}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->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}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of Executions to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Executions to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous call to ListExecutions. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous call to ListExecutions. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php new file mode 100644 index 000000000000..66ffa08a98f2 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.run.v2.ListExecutionsResponse + */ +class ListExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting list of Executions. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Execution executions = 1; + */ + private $executions; + /** + * A token indicating there are more items than page_size. Use it in the next + * ListExecutions request to continue. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\Execution>|\Google\Protobuf\Internal\RepeatedField $executions + * The resulting list of Executions. + * @type string $next_page_token + * A token indicating there are more items than page_size. Use it in the next + * ListExecutions request to continue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); + parent::__construct($data); + } + + /** + * The resulting list of Executions. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Execution executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * The resulting list of Executions. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Execution executions = 1; + * @param array<\Google\Cloud\Run\V2\Execution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Execution::class); + $this->executions = $arr; + + return $this; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListExecutions request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListExecutions request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesRequest.php new file mode 100644 index 000000000000..565a33cd9af0 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesRequest.php @@ -0,0 +1,201 @@ +google.cloud.run.v2.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of Instances to return in this call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token received from a previous call to ListInstances. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. If true, returns deleted (but unexpired) resources along with + * active ones. + * + * Generated from protobuf field bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Please see + * {@see InstancesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\ListInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * @type int $page_size + * Optional. Maximum number of Instances to return in this call. + * @type string $page_token + * Optional. A page token received from a previous call to ListInstances. + * All other parameters must match. + * @type bool $show_deleted + * Optional. If true, returns deleted (but unexpired) resources along with + * active ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of Instances to return in this call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of Instances to return in this call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token received from a previous call to ListInstances. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token received from a previous call to ListInstances. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. If true, returns deleted (but unexpired) resources along with + * active ones. + * + * Generated from protobuf field bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. If true, returns deleted (but unexpired) resources along with + * active ones. + * + * Generated from protobuf field bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesResponse.php new file mode 100644 index 000000000000..a532e1f63d8c --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesResponse.php @@ -0,0 +1,105 @@ +google.cloud.run.v2.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting list of Instances. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Instance instances = 1; + */ + private $instances; + /** + * A token indicating there are more items than page_size. Use it in the next + * ListInstances request to continue. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * The resulting list of Instances. + * @type string $next_page_token + * A token indicating there are more items than page_size. Use it in the next + * ListInstances request to continue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The resulting list of Instances. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The resulting list of Instances. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Instance instances = 1; + * @param array<\Google\Cloud\Run\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListInstances request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListInstances request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php new file mode 100644 index 000000000000..076ac55e2e82 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php @@ -0,0 +1,197 @@ +google.cloud.run.v2.ListJobsRequest + */ +class ListJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of Jobs to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token received from a previous call to ListJobs. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. Please see + * {@see JobsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\ListJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * @type int $page_size + * Maximum number of Jobs to return in this call. + * @type string $page_token + * A page token received from a previous call to ListJobs. + * All other parameters must match. + * @type bool $show_deleted + * If true, returns deleted (but unexpired) resources along with active ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location and project to list resources on. + * Format: projects/{project}/locations/{location}, where {project} can be + * project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of Jobs to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Jobs to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous call to ListJobs. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous call to ListJobs. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php new file mode 100644 index 000000000000..1d0b4c4b6c6c --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php @@ -0,0 +1,105 @@ +google.cloud.run.v2.ListJobsResponse + */ +class ListJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting list of Jobs. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Job jobs = 1; + */ + private $jobs; + /** + * A token indicating there are more items than page_size. Use it in the next + * ListJobs request to continue. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * The resulting list of Jobs. + * @type string $next_page_token + * A token indicating there are more items than page_size. Use it in the next + * ListJobs request to continue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * The resulting list of Jobs. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * The resulting list of Jobs. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Job jobs = 1; + * @param array<\Google\Cloud\Run\V2\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListJobs request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListJobs request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php new file mode 100644 index 000000000000..01cde2b85c98 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php @@ -0,0 +1,202 @@ +google.cloud.run.v2.ListRevisionsRequest + */ +class ListRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Service from which the Revisions should be listed. + * To list all Revisions across Services, use "-" instead of Service name. + * Format: + * projects/{project}/locations/{location}/services/{service} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of revisions to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token received from a previous call to ListRevisions. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The Service from which the Revisions should be listed. + * To list all Revisions across Services, use "-" instead of Service name. + * Format: + * projects/{project}/locations/{location}/services/{service} + * Please see {@see RevisionsClient::serviceName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\ListRevisionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Service from which the Revisions should be listed. + * To list all Revisions across Services, use "-" instead of Service name. + * Format: + * projects/{project}/locations/{location}/services/{service} + * @type int $page_size + * Maximum number of revisions to return in this call. + * @type string $page_token + * A page token received from a previous call to ListRevisions. + * All other parameters must match. + * @type bool $show_deleted + * If true, returns deleted (but unexpired) resources along with active ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Service from which the Revisions should be listed. + * To list all Revisions across Services, use "-" instead of Service name. + * Format: + * projects/{project}/locations/{location}/services/{service} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Service from which the Revisions should be listed. + * To list all Revisions across Services, use "-" instead of Service name. + * Format: + * projects/{project}/locations/{location}/services/{service} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of revisions to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of revisions to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous call to ListRevisions. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous call to ListRevisions. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php new file mode 100644 index 000000000000..e4a2db90f4f3 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.run.v2.ListRevisionsResponse + */ +class ListRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting list of Revisions. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Revision revisions = 1; + */ + private $revisions; + /** + * A token indicating there are more items than page_size. Use it in the next + * ListRevisions request to continue. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\Revision>|\Google\Protobuf\Internal\RepeatedField $revisions + * The resulting list of Revisions. + * @type string $next_page_token + * A token indicating there are more items than page_size. Use it in the next + * ListRevisions request to continue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); + parent::__construct($data); + } + + /** + * The resulting list of Revisions. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Revision revisions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRevisions() + { + return $this->revisions; + } + + /** + * The resulting list of Revisions. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Revision revisions = 1; + * @param array<\Google\Cloud\Run\V2\Revision>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRevisions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Revision::class); + $this->revisions = $arr; + + return $this; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListRevisions request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListRevisions request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php new file mode 100644 index 000000000000..1cd78b619338 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php @@ -0,0 +1,202 @@ +google.cloud.run.v2.ListServicesRequest + */ +class ListServicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of Services to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token received from a previous call to ListServices. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. Please see + * {@see ServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\ListServicesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. + * @type int $page_size + * Maximum number of Services to return in this call. + * @type string $page_token + * A page token received from a previous call to ListServices. + * All other parameters must match. + * @type bool $show_deleted + * If true, returns deleted (but unexpired) resources along with active ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of Services to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Services to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous call to ListServices. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous call to ListServices. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php new file mode 100644 index 000000000000..144d66072806 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php @@ -0,0 +1,143 @@ +google.cloud.run.v2.ListServicesResponse + */ +class ListServicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting list of Services. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Service services = 1; + */ + private $services; + /** + * A token indicating there are more items than page_size. Use it in the next + * ListServices request to continue. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Output only. For global requests, returns the list of regions that could + * not be reached within the deadline. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\Service>|\Google\Protobuf\Internal\RepeatedField $services + * The resulting list of Services. + * @type string $next_page_token + * A token indicating there are more items than page_size. Use it in the next + * ListServices request to continue. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. For global requests, returns the list of regions that could + * not be reached within the deadline. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resulting list of Services. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Service services = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServices() + { + return $this->services; + } + + /** + * The resulting list of Services. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Service services = 1; + * @param array<\Google\Cloud\Run\V2\Service>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Service::class); + $this->services = $arr; + + return $this; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListServices request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListServices request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. For global requests, returns the list of regions that could + * not be reached within the deadline. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. For global requests, returns the list of regions that could + * not be reached within the deadline. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php new file mode 100644 index 000000000000..421799f38195 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php @@ -0,0 +1,202 @@ +google.cloud.run.v2.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of Tasks to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token received from a previous call to ListTasks. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $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} + * Please see {@see TasksClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\ListTasksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $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} + * @type int $page_size + * Maximum number of Tasks to return in this call. + * @type string $page_token + * A page token received from a previous call to ListTasks. + * All other parameters must match. + * @type bool $show_deleted + * If true, returns deleted (but unexpired) resources along with active ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); + parent::__construct($data); + } + + /** + * 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} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->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} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of Tasks to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Tasks to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous call to ListTasks. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous call to ListTasks. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php new file mode 100644 index 000000000000..17804baa0f8d --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php @@ -0,0 +1,105 @@ +google.cloud.run.v2.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting list of Tasks. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Task tasks = 1; + */ + private $tasks; + /** + * A token indicating there are more items than page_size. Use it in the next + * ListTasks request to continue. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * The resulting list of Tasks. + * @type string $next_page_token + * A token indicating there are more items than page_size. Use it in the next + * ListTasks request to continue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); + parent::__construct($data); + } + + /** + * The resulting list of Tasks. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The resulting list of Tasks. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Task tasks = 1; + * @param array<\Google\Cloud\Run\V2\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListTasks request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListTasks request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php new file mode 100644 index 000000000000..d08c31767c3f --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php @@ -0,0 +1,202 @@ +google.cloud.run.v2.ListWorkerPoolsRequest + */ +class ListWorkerPoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of WorkerPools to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token received from a previous call to ListWorkerPools. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. Please see + * {@see WorkerPoolsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\ListWorkerPoolsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. + * @type int $page_size + * Maximum number of WorkerPools to return in this call. + * @type string $page_token + * A page token received from a previous call to ListWorkerPools. + * All other parameters must match. + * @type bool $show_deleted + * If true, returns deleted (but unexpired) resources along with active ones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location and project to list resources on. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: `projects/{project}/locations/{location}`, where + * `{project}` can be project id or number. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of WorkerPools to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of WorkerPools to return in this call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token received from a previous call to ListWorkerPools. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received from a previous call to ListWorkerPools. + * All other parameters must match. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, returns deleted (but unexpired) resources along with active ones. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php new file mode 100644 index 000000000000..7c7acb702afe --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php @@ -0,0 +1,105 @@ +google.cloud.run.v2.ListWorkerPoolsResponse + */ +class ListWorkerPoolsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resulting list of WorkerPools. + * + * Generated from protobuf field repeated .google.cloud.run.v2.WorkerPool worker_pools = 1; + */ + private $worker_pools; + /** + * A token indicating there are more items than page_size. Use it in the next + * ListWorkerPools request to continue. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\WorkerPool>|\Google\Protobuf\Internal\RepeatedField $worker_pools + * The resulting list of WorkerPools. + * @type string $next_page_token + * A token indicating there are more items than page_size. Use it in the next + * ListWorkerPools request to continue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); + parent::__construct($data); + } + + /** + * The resulting list of WorkerPools. + * + * Generated from protobuf field repeated .google.cloud.run.v2.WorkerPool worker_pools = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWorkerPools() + { + return $this->worker_pools; + } + + /** + * The resulting list of WorkerPools. + * + * Generated from protobuf field repeated .google.cloud.run.v2.WorkerPool worker_pools = 1; + * @param array<\Google\Cloud\Run\V2\WorkerPool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWorkerPools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\WorkerPool::class); + $this->worker_pools = $arr; + + return $this; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListWorkerPools request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token indicating there are more items than page_size. Use it in the next + * ListWorkerPools request to continue. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php new file mode 100644 index 000000000000..d77c34e73b2d --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php @@ -0,0 +1,135 @@ +google.cloud.run.v2.NFSVolumeSource + */ +class NFSVolumeSource extends \Google\Protobuf\Internal\Message +{ + /** + * Hostname or IP address of the NFS server + * + * Generated from protobuf field string server = 1; + */ + protected $server = ''; + /** + * Path that is exported by the NFS server. + * + * Generated from protobuf field string path = 2; + */ + protected $path = ''; + /** + * If true, the volume will be mounted as read only for all mounts. + * + * Generated from protobuf field bool read_only = 3; + */ + protected $read_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $server + * Hostname or IP address of the NFS server + * @type string $path + * Path that is exported by the NFS server. + * @type bool $read_only + * If true, the volume will be mounted as read only for all mounts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Hostname or IP address of the NFS server + * + * Generated from protobuf field string server = 1; + * @return string + */ + public function getServer() + { + return $this->server; + } + + /** + * Hostname or IP address of the NFS server + * + * Generated from protobuf field string server = 1; + * @param string $var + * @return $this + */ + public function setServer($var) + { + GPBUtil::checkString($var, True); + $this->server = $var; + + return $this; + } + + /** + * Path that is exported by the NFS server. + * + * Generated from protobuf field string path = 2; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Path that is exported by the NFS server. + * + * Generated from protobuf field string path = 2; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * If true, the volume will be mounted as read only for all mounts. + * + * Generated from protobuf field bool read_only = 3; + * @return bool + */ + public function getReadOnly() + { + return $this->read_only; + } + + /** + * If true, the volume will be mounted as read only for all mounts. + * + * Generated from protobuf field bool read_only = 3; + * @param bool $var + * @return $this + */ + public function setReadOnly($var) + { + GPBUtil::checkBool($var); + $this->read_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php new file mode 100644 index 000000000000..54fd94337d57 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php @@ -0,0 +1,67 @@ +google.cloud.run.v2.NodeSelector + */ +class NodeSelector extends \Google\Protobuf\Internal\Message +{ + /** + * Required. GPU accelerator type to attach to an instance. + * + * Generated from protobuf field string accelerator = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $accelerator = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $accelerator + * Required. GPU accelerator type to attach to an instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * Required. GPU accelerator type to attach to an instance. + * + * Generated from protobuf field string accelerator = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAccelerator() + { + return $this->accelerator; + } + + /** + * Required. GPU accelerator type to attach to an instance. + * + * Generated from protobuf field string accelerator = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAccelerator($var) + { + GPBUtil::checkString($var, True); + $this->accelerator = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php new file mode 100644 index 000000000000..07da4f964c37 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php @@ -0,0 +1,319 @@ +google.cloud.run.v2.Probe + */ +class Probe extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Number of seconds after the container has started before the + * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum + * value for liveness probe is 3600. Maximum value for startup probe is 240. + * + * Generated from protobuf field int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $initial_delay_seconds = 0; + /** + * Optional. Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. + * Must be smaller than period_seconds. + * + * Generated from protobuf field int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timeout_seconds = 0; + /** + * Optional. How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe + * is 3600. Maximum value for startup probe is 240. + * Must be greater or equal than timeout_seconds. + * + * Generated from protobuf field int32 period_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $period_seconds = 0; + /** + * Optional. Minimum consecutive failures for the probe to be considered + * failed after having succeeded. Defaults to 3. Minimum value is 1. + * + * Generated from protobuf field int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $failure_threshold = 0; + protected $probe_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $initial_delay_seconds + * Optional. Number of seconds after the container has started before the + * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum + * value for liveness probe is 3600. Maximum value for startup probe is 240. + * @type int $timeout_seconds + * Optional. Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. + * Must be smaller than period_seconds. + * @type int $period_seconds + * Optional. How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe + * is 3600. Maximum value for startup probe is 240. + * Must be greater or equal than timeout_seconds. + * @type int $failure_threshold + * Optional. Minimum consecutive failures for the probe to be considered + * failed after having succeeded. Defaults to 3. Minimum value is 1. + * @type \Google\Cloud\Run\V2\HTTPGetAction $http_get + * Optional. HTTPGet specifies the http request to perform. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * @type \Google\Cloud\Run\V2\TCPSocketAction $tcp_socket + * Optional. TCPSocket specifies an action involving a TCP port. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * @type \Google\Cloud\Run\V2\GRPCAction $grpc + * Optional. GRPC specifies an action involving a gRPC port. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Number of seconds after the container has started before the + * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum + * value for liveness probe is 3600. Maximum value for startup probe is 240. + * + * Generated from protobuf field int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getInitialDelaySeconds() + { + return $this->initial_delay_seconds; + } + + /** + * Optional. Number of seconds after the container has started before the + * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum + * value for liveness probe is 3600. Maximum value for startup probe is 240. + * + * Generated from protobuf field int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setInitialDelaySeconds($var) + { + GPBUtil::checkInt32($var); + $this->initial_delay_seconds = $var; + + return $this; + } + + /** + * Optional. Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. + * Must be smaller than period_seconds. + * + * Generated from protobuf field int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimeoutSeconds() + { + return $this->timeout_seconds; + } + + /** + * Optional. Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. + * Must be smaller than period_seconds. + * + * Generated from protobuf field int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimeoutSeconds($var) + { + GPBUtil::checkInt32($var); + $this->timeout_seconds = $var; + + return $this; + } + + /** + * Optional. How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe + * is 3600. Maximum value for startup probe is 240. + * Must be greater or equal than timeout_seconds. + * + * Generated from protobuf field int32 period_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPeriodSeconds() + { + return $this->period_seconds; + } + + /** + * Optional. How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe + * is 3600. Maximum value for startup probe is 240. + * Must be greater or equal than timeout_seconds. + * + * Generated from protobuf field int32 period_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPeriodSeconds($var) + { + GPBUtil::checkInt32($var); + $this->period_seconds = $var; + + return $this; + } + + /** + * Optional. Minimum consecutive failures for the probe to be considered + * failed after having succeeded. Defaults to 3. Minimum value is 1. + * + * Generated from protobuf field int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFailureThreshold() + { + return $this->failure_threshold; + } + + /** + * Optional. Minimum consecutive failures for the probe to be considered + * failed after having succeeded. Defaults to 3. Minimum value is 1. + * + * Generated from protobuf field int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFailureThreshold($var) + { + GPBUtil::checkInt32($var); + $this->failure_threshold = $var; + + return $this; + } + + /** + * Optional. HTTPGet specifies the http request to perform. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * + * Generated from protobuf field .google.cloud.run.v2.HTTPGetAction http_get = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\HTTPGetAction|null + */ + public function getHttpGet() + { + return $this->readOneof(5); + } + + public function hasHttpGet() + { + return $this->hasOneof(5); + } + + /** + * Optional. HTTPGet specifies the http request to perform. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * + * Generated from protobuf field .google.cloud.run.v2.HTTPGetAction http_get = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\HTTPGetAction $var + * @return $this + */ + public function setHttpGet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\HTTPGetAction::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. TCPSocket specifies an action involving a TCP port. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * + * Generated from protobuf field .google.cloud.run.v2.TCPSocketAction tcp_socket = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\TCPSocketAction|null + */ + public function getTcpSocket() + { + return $this->readOneof(6); + } + + public function hasTcpSocket() + { + return $this->hasOneof(6); + } + + /** + * Optional. TCPSocket specifies an action involving a TCP port. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * + * Generated from protobuf field .google.cloud.run.v2.TCPSocketAction tcp_socket = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\TCPSocketAction $var + * @return $this + */ + public function setTcpSocket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TCPSocketAction::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. GRPC specifies an action involving a gRPC port. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * + * Generated from protobuf field .google.cloud.run.v2.GRPCAction grpc = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\GRPCAction|null + */ + public function getGrpc() + { + return $this->readOneof(7); + } + + public function hasGrpc() + { + return $this->hasOneof(7); + } + + /** + * Optional. GRPC specifies an action involving a gRPC port. + * Exactly one of httpGet, tcpSocket, or grpc must be specified. + * + * Generated from protobuf field .google.cloud.run.v2.GRPCAction grpc = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\GRPCAction $var + * @return $this + */ + public function setGrpc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\GRPCAction::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getProbeType() + { + return $this->whichOneof("probe_type"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php new file mode 100644 index 000000000000..318b8ee06931 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php @@ -0,0 +1,179 @@ +google.cloud.run.v2.ResourceRequirements + */ +class ResourceRequirements extends \Google\Protobuf\Internal\Message +{ + /** + * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. + *

Notes: + * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 + * CPU requires at least 2Gi of memory. For more information, go to + * https://cloud.google.com/run/docs/configuring/cpu. + * * For supported 'memory' values and syntax, go to + * https://cloud.google.com/run/docs/configuring/memory-limits + * * The only supported 'nvidia.com/gpu' value is '1'. + * + * Generated from protobuf field map limits = 1; + */ + private $limits; + /** + * Determines whether CPU is only allocated during requests (true by default). + * However, if ResourceRequirements is set, the caller must explicitly + * set this field to true to preserve the default behavior. + * + * Generated from protobuf field bool cpu_idle = 2; + */ + protected $cpu_idle = false; + /** + * Determines whether CPU should be boosted on startup of a new container + * instance above the requested CPU threshold, this can help reduce cold-start + * latency. + * + * Generated from protobuf field bool startup_cpu_boost = 3; + */ + protected $startup_cpu_boost = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $limits + * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. + *

Notes: + * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 + * CPU requires at least 2Gi of memory. For more information, go to + * https://cloud.google.com/run/docs/configuring/cpu. + * * For supported 'memory' values and syntax, go to + * https://cloud.google.com/run/docs/configuring/memory-limits + * * The only supported 'nvidia.com/gpu' value is '1'. + * @type bool $cpu_idle + * Determines whether CPU is only allocated during requests (true by default). + * However, if ResourceRequirements is set, the caller must explicitly + * set this field to true to preserve the default behavior. + * @type bool $startup_cpu_boost + * Determines whether CPU should be boosted on startup of a new container + * instance above the requested CPU threshold, this can help reduce cold-start + * latency. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. + *

Notes: + * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 + * CPU requires at least 2Gi of memory. For more information, go to + * https://cloud.google.com/run/docs/configuring/cpu. + * * For supported 'memory' values and syntax, go to + * https://cloud.google.com/run/docs/configuring/memory-limits + * * The only supported 'nvidia.com/gpu' value is '1'. + * + * Generated from protobuf field map limits = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLimits() + { + return $this->limits; + } + + /** + * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. + *

Notes: + * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 + * CPU requires at least 2Gi of memory. For more information, go to + * https://cloud.google.com/run/docs/configuring/cpu. + * * For supported 'memory' values and syntax, go to + * https://cloud.google.com/run/docs/configuring/memory-limits + * * The only supported 'nvidia.com/gpu' value is '1'. + * + * Generated from protobuf field map limits = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLimits($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->limits = $arr; + + return $this; + } + + /** + * Determines whether CPU is only allocated during requests (true by default). + * However, if ResourceRequirements is set, the caller must explicitly + * set this field to true to preserve the default behavior. + * + * Generated from protobuf field bool cpu_idle = 2; + * @return bool + */ + public function getCpuIdle() + { + return $this->cpu_idle; + } + + /** + * Determines whether CPU is only allocated during requests (true by default). + * However, if ResourceRequirements is set, the caller must explicitly + * set this field to true to preserve the default behavior. + * + * Generated from protobuf field bool cpu_idle = 2; + * @param bool $var + * @return $this + */ + public function setCpuIdle($var) + { + GPBUtil::checkBool($var); + $this->cpu_idle = $var; + + return $this; + } + + /** + * Determines whether CPU should be boosted on startup of a new container + * instance above the requested CPU threshold, this can help reduce cold-start + * latency. + * + * Generated from protobuf field bool startup_cpu_boost = 3; + * @return bool + */ + public function getStartupCpuBoost() + { + return $this->startup_cpu_boost; + } + + /** + * Determines whether CPU should be boosted on startup of a new container + * instance above the requested CPU threshold, this can help reduce cold-start + * latency. + * + * Generated from protobuf field bool startup_cpu_boost = 3; + * @param bool $var + * @return $this + */ + public function setStartupCpuBoost($var) + { + GPBUtil::checkBool($var); + $this->startup_cpu_boost = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php new file mode 100644 index 000000000000..03a2fabd1cb7 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php @@ -0,0 +1,1455 @@ +google.cloud.run.v2.Revision + */ +class Revision extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique name of this Revision. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server assigned unique identifier for the Revision. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation = 0; + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $labels; + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $annotations; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 10; + */ + protected $launch_stage = 0; + /** + * Output only. The name of the parent service. + * + * Generated from protobuf field string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $service = ''; + /** + * Scaling settings for this revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 12; + */ + protected $scaling = null; + /** + * VPC Access configuration for this Revision. For more information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 13; + */ + protected $vpc_access = null; + /** + * Sets the maximum number of requests that each serving instance can receive. + * + * Generated from protobuf field int32 max_instance_request_concurrency = 34; + */ + protected $max_instance_request_concurrency = 0; + /** + * Max allowed time for an instance to respond to a request. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 15; + */ + protected $timeout = null; + /** + * Email address of the IAM service account associated with the revision of + * the service. The service account represents the identity of the running + * revision, and determines what permissions the revision has. + * + * Generated from protobuf field string service_account = 16; + */ + protected $service_account = ''; + /** + * Holds the single container that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 17; + */ + private $containers; + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 18; + */ + private $volumes; + /** + * The execution environment being used to host this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; + */ + protected $execution_environment = 0; + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 21 [(.google.api.resource_reference) = { + */ + protected $encryption_key = ''; + /** + * Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 22; + */ + protected $service_mesh = null; + /** + * The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23; + */ + protected $encryption_key_revocation_action = 0; + /** + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 24; + */ + protected $encryption_key_shutdown_duration = null; + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Service.reconciling` for additional information + * on reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The Condition of this Revision, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. The generation of this Revision currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $observed_generation = 0; + /** + * Output only. The Google Console URI to obtain logs for the Revision. + * + * Generated from protobuf field string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $log_uri = ''; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Enable session affinity. + * + * Generated from protobuf field bool session_affinity = 38; + */ + protected $session_affinity = false; + /** + * Output only. The current effective scaling settings for the revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scaling_status = null; + /** + * The node selector for the revision. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 40; + */ + protected $node_selector = null; + /** + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * revision. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 48 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gpu_zonal_redundancy_disabled = null; + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique name of this Revision. + * @type string $uid + * Output only. Server assigned unique identifier for the Revision. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type int|string $generation + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * @type int $launch_stage + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * @type string $service + * Output only. The name of the parent service. + * @type \Google\Cloud\Run\V2\RevisionScaling $scaling + * Scaling settings for this revision. + * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access + * VPC Access configuration for this Revision. For more information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * @type int $max_instance_request_concurrency + * Sets the maximum number of requests that each serving instance can receive. + * @type \Google\Protobuf\Duration $timeout + * Max allowed time for an instance to respond to a request. + * @type string $service_account + * Email address of the IAM service account associated with the revision of + * the service. The service account represents the identity of the running + * revision, and determines what permissions the revision has. + * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Holds the single container that defines the unit of execution for this + * Revision. + * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * A list of Volumes to make available to containers. + * @type int $execution_environment + * The execution environment being used to host this Revision. + * @type string $encryption_key + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * @type \Google\Cloud\Run\V2\ServiceMesh $service_mesh + * Enables service mesh connectivity. + * @type int $encryption_key_revocation_action + * The action to take if the encryption key is revoked. + * @type \Google\Protobuf\Duration $encryption_key_shutdown_duration + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * @type bool $reconciling + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Service.reconciling` for additional information + * on reconciliation process in Cloud Run. + * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * Output only. The Condition of this Revision, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. + * @type int|string $observed_generation + * Output only. The generation of this Revision currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * @type string $log_uri + * Output only. The Google Console URI to obtain logs for the Revision. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type bool $session_affinity + * Enable session affinity. + * @type \Google\Cloud\Run\V2\RevisionScalingStatus $scaling_status + * Output only. The current effective scaling settings for the revision. + * @type \Google\Cloud\Run\V2\NodeSelector $node_selector + * The node selector for the revision. + * @type bool $gpu_zonal_redundancy_disabled + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * revision. + * @type string $creator + * Output only. Email address of the authenticated creator. + * @type string $etag + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique name of this Revision. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique name of this Revision. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server assigned unique identifier for the Revision. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the Revision. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 10; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * The least stable launch stage needed to create this resource, as defined by + * [Google Cloud Platform Launch + * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + * `ALPHA`, `BETA`, and `GA`. + * Note that this value might not be what was used + * as input. For example, if ALPHA was provided as input in the parent + * resource, but only BETA and GA-level features are were, this field will be + * BETA. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 10; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + + /** + * Output only. The name of the parent service. + * + * Generated from protobuf field string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Output only. The name of the parent service. + * + * Generated from protobuf field string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Scaling settings for this revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 12; + * @return \Google\Cloud\Run\V2\RevisionScaling|null + */ + public function getScaling() + { + return $this->scaling; + } + + public function hasScaling() + { + return isset($this->scaling); + } + + public function clearScaling() + { + unset($this->scaling); + } + + /** + * Scaling settings for this revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 12; + * @param \Google\Cloud\Run\V2\RevisionScaling $var + * @return $this + */ + public function setScaling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScaling::class); + $this->scaling = $var; + + return $this; + } + + /** + * VPC Access configuration for this Revision. For more information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 13; + * @return \Google\Cloud\Run\V2\VpcAccess|null + */ + public function getVpcAccess() + { + return $this->vpc_access; + } + + public function hasVpcAccess() + { + return isset($this->vpc_access); + } + + public function clearVpcAccess() + { + unset($this->vpc_access); + } + + /** + * VPC Access configuration for this Revision. For more information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 13; + * @param \Google\Cloud\Run\V2\VpcAccess $var + * @return $this + */ + public function setVpcAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); + $this->vpc_access = $var; + + return $this; + } + + /** + * Sets the maximum number of requests that each serving instance can receive. + * + * Generated from protobuf field int32 max_instance_request_concurrency = 34; + * @return int + */ + public function getMaxInstanceRequestConcurrency() + { + return $this->max_instance_request_concurrency; + } + + /** + * Sets the maximum number of requests that each serving instance can receive. + * + * Generated from protobuf field int32 max_instance_request_concurrency = 34; + * @param int $var + * @return $this + */ + public function setMaxInstanceRequestConcurrency($var) + { + GPBUtil::checkInt32($var); + $this->max_instance_request_concurrency = $var; + + return $this; + } + + /** + * Max allowed time for an instance to respond to a request. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 15; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Max allowed time for an instance to respond to a request. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 15; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Email address of the IAM service account associated with the revision of + * the service. The service account represents the identity of the running + * revision, and determines what permissions the revision has. + * + * Generated from protobuf field string service_account = 16; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Email address of the IAM service account associated with the revision of + * the service. The service account represents the identity of the running + * revision, and determines what permissions the revision has. + * + * Generated from protobuf field string service_account = 16; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Holds the single container that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 17; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Holds the single container that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 17; + * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); + $this->containers = $arr; + + return $this; + } + + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 18; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 18; + * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * The execution environment being used to host this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; + * @return int + */ + public function getExecutionEnvironment() + { + return $this->execution_environment; + } + + /** + * The execution environment being used to host this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; + * @param int $var + * @return $this + */ + public function setExecutionEnvironment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); + $this->execution_environment = $var; + + return $this; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 21 [(.google.api.resource_reference) = { + * @return string + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 21 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->encryption_key = $var; + + return $this; + } + + /** + * Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 22; + * @return \Google\Cloud\Run\V2\ServiceMesh|null + */ + public function getServiceMesh() + { + return $this->service_mesh; + } + + public function hasServiceMesh() + { + return isset($this->service_mesh); + } + + public function clearServiceMesh() + { + unset($this->service_mesh); + } + + /** + * Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 22; + * @param \Google\Cloud\Run\V2\ServiceMesh $var + * @return $this + */ + public function setServiceMesh($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceMesh::class); + $this->service_mesh = $var; + + return $this; + } + + /** + * The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23; + * @return int + */ + public function getEncryptionKeyRevocationAction() + { + return $this->encryption_key_revocation_action; + } + + /** + * The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23; + * @param int $var + * @return $this + */ + public function setEncryptionKeyRevocationAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class); + $this->encryption_key_revocation_action = $var; + + return $this; + } + + /** + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 24; + * @return \Google\Protobuf\Duration|null + */ + public function getEncryptionKeyShutdownDuration() + { + return $this->encryption_key_shutdown_duration; + } + + public function hasEncryptionKeyShutdownDuration() + { + return isset($this->encryption_key_shutdown_duration); + } + + public function clearEncryptionKeyShutdownDuration() + { + unset($this->encryption_key_shutdown_duration); + } + + /** + * If encryption_key_revocation_action is SHUTDOWN, the duration before + * shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 24; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEncryptionKeyShutdownDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->encryption_key_shutdown_duration = $var; + + return $this; + } + + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Service.reconciling` for additional information + * on reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Service.reconciling` for additional information + * on reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The Condition of this Revision, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The Condition of this Revision, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. The generation of this Revision currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getObservedGeneration() + { + return $this->observed_generation; + } + + /** + * Output only. The generation of this Revision currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setObservedGeneration($var) + { + GPBUtil::checkInt64($var); + $this->observed_generation = $var; + + return $this; + } + + /** + * Output only. The Google Console URI to obtain logs for the Revision. + * + * Generated from protobuf field string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLogUri() + { + return $this->log_uri; + } + + /** + * Output only. The Google Console URI to obtain logs for the Revision. + * + * Generated from protobuf field string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLogUri($var) + { + GPBUtil::checkString($var, True); + $this->log_uri = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Enable session affinity. + * + * Generated from protobuf field bool session_affinity = 38; + * @return bool + */ + public function getSessionAffinity() + { + return $this->session_affinity; + } + + /** + * Enable session affinity. + * + * Generated from protobuf field bool session_affinity = 38; + * @param bool $var + * @return $this + */ + public function setSessionAffinity($var) + { + GPBUtil::checkBool($var); + $this->session_affinity = $var; + + return $this; + } + + /** + * Output only. The current effective scaling settings for the revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\RevisionScalingStatus|null + */ + public function getScalingStatus() + { + return $this->scaling_status; + } + + public function hasScalingStatus() + { + return isset($this->scaling_status); + } + + public function clearScalingStatus() + { + unset($this->scaling_status); + } + + /** + * Output only. The current effective scaling settings for the revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\RevisionScalingStatus $var + * @return $this + */ + public function setScalingStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScalingStatus::class); + $this->scaling_status = $var; + + return $this; + } + + /** + * The node selector for the revision. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 40; + * @return \Google\Cloud\Run\V2\NodeSelector|null + */ + public function getNodeSelector() + { + return $this->node_selector; + } + + public function hasNodeSelector() + { + return isset($this->node_selector); + } + + public function clearNodeSelector() + { + unset($this->node_selector); + } + + /** + * The node selector for the revision. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 40; + * @param \Google\Cloud\Run\V2\NodeSelector $var + * @return $this + */ + public function setNodeSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); + $this->node_selector = $var; + + return $this; + } + + /** + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * revision. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 48 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; + } + + public function hasGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled); + } + + public function clearGpuZonalRedundancyDisabled() + { + unset($this->gpu_zonal_redundancy_disabled); + } + + /** + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * revision. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 48 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGpuZonalRedundancyDisabled($var) + { + GPBUtil::checkBool($var); + $this->gpu_zonal_redundancy_disabled = $var; + + return $this; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php new file mode 100644 index 000000000000..5536c70fe0a4 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php @@ -0,0 +1,117 @@ +google.cloud.run.v2.RevisionScaling + */ +class RevisionScaling extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Minimum number of serving instances that this resource should + * have. + * + * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_instance_count = 0; + /** + * Optional. Maximum number of serving instances that this resource should + * have. When unspecified, the field is set to the server default value of + * 100. For more information see + * https://cloud.google.com/run/docs/configuring/max-instances + * + * Generated from protobuf field int32 max_instance_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_instance_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $min_instance_count + * Optional. Minimum number of serving instances that this resource should + * have. + * @type int $max_instance_count + * Optional. Maximum number of serving instances that this resource should + * have. When unspecified, the field is set to the server default value of + * 100. For more information see + * https://cloud.google.com/run/docs/configuring/max-instances + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Minimum number of serving instances that this resource should + * have. + * + * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinInstanceCount() + { + return $this->min_instance_count; + } + + /** + * Optional. Minimum number of serving instances that this resource should + * have. + * + * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->min_instance_count = $var; + + return $this; + } + + /** + * Optional. Maximum number of serving instances that this resource should + * have. When unspecified, the field is set to the server default value of + * 100. For more information see + * https://cloud.google.com/run/docs/configuring/max-instances + * + * Generated from protobuf field int32 max_instance_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxInstanceCount() + { + return $this->max_instance_count; + } + + /** + * Optional. Maximum number of serving instances that this resource should + * have. When unspecified, the field is set to the server default value of + * 100. For more information see + * https://cloud.google.com/run/docs/configuring/max-instances + * + * Generated from protobuf field int32 max_instance_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->max_instance_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php new file mode 100644 index 000000000000..fff365b91e71 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php @@ -0,0 +1,67 @@ +google.cloud.run.v2.RevisionScalingStatus + */ +class RevisionScalingStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The current number of min instances provisioned for this revision. + * + * Generated from protobuf field int32 desired_min_instance_count = 1; + */ + protected $desired_min_instance_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $desired_min_instance_count + * The current number of min instances provisioned for this revision. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Status::initOnce(); + parent::__construct($data); + } + + /** + * The current number of min instances provisioned for this revision. + * + * Generated from protobuf field int32 desired_min_instance_count = 1; + * @return int + */ + public function getDesiredMinInstanceCount() + { + return $this->desired_min_instance_count; + } + + /** + * The current number of min instances provisioned for this revision. + * + * Generated from protobuf field int32 desired_min_instance_count = 1; + * @param int $var + * @return $this + */ + public function setDesiredMinInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->desired_min_instance_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php new file mode 100644 index 000000000000..bf485c40eb51 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php @@ -0,0 +1,866 @@ +google.cloud.run.v2.RevisionTemplate + */ +class RevisionTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the Service name. + * + * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $revision = ''; + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 RevisionTemplate. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 RevisionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Optional. Scaling settings for this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scaling = null; + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vpc_access = null; + /** + * Optional. Max allowed time for an instance to respond to a request. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timeout = null; + /** + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = ''; + /** + * Holds the single container that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 10; + */ + private $containers; + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $volumes; + /** + * Optional. The sandbox environment to host this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $execution_environment = 0; + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 14 [(.google.api.resource_reference) = { + */ + protected $encryption_key = ''; + /** + * Optional. Sets the maximum number of requests that each serving instance + * can receive. If not specified or 0, concurrency defaults to 80 when + * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. + * + * Generated from protobuf field int32 max_instance_request_concurrency = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_instance_request_concurrency = 0; + /** + * Optional. Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_mesh = null; + /** + * Optional. The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_key_revocation_action = 0; + /** + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_key_shutdown_duration = null; + /** + * Optional. Enable session affinity. + * + * Generated from protobuf field bool session_affinity = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $session_affinity = false; + /** + * Optional. Disables health checking containers during deployment. + * + * Generated from protobuf field bool health_check_disabled = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $health_check_disabled = false; + /** + * Optional. The node selector for the revision template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_selector = null; + /** + * Optional. True if GPU zonal redundancy is disabled on this revision. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gpu_zonal_redundancy_disabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $revision + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the Service name. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 RevisionTemplate. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 RevisionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * @type \Google\Cloud\Run\V2\RevisionScaling $scaling + * Optional. Scaling settings for this Revision. + * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * @type \Google\Protobuf\Duration $timeout + * Optional. Max allowed time for an instance to respond to a request. + * @type string $service_account + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Holds the single container that defines the unit of execution for this + * Revision. + * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * Optional. A list of Volumes to make available to containers. + * @type int $execution_environment + * Optional. The sandbox environment to host this Revision. + * @type string $encryption_key + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * @type int $max_instance_request_concurrency + * Optional. Sets the maximum number of requests that each serving instance + * can receive. If not specified or 0, concurrency defaults to 80 when + * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. + * @type \Google\Cloud\Run\V2\ServiceMesh $service_mesh + * Optional. Enables service mesh connectivity. + * @type int $encryption_key_revocation_action + * Optional. The action to take if the encryption key is revoked. + * @type \Google\Protobuf\Duration $encryption_key_shutdown_duration + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * @type bool $session_affinity + * Optional. Enable session affinity. + * @type bool $health_check_disabled + * Optional. Disables health checking containers during deployment. + * @type \Google\Cloud\Run\V2\NodeSelector $node_selector + * Optional. The node selector for the revision template. + * @type bool $gpu_zonal_redundancy_disabled + * Optional. True if GPU zonal redundancy is disabled on this revision. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\RevisionTemplate::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the Service name. + * + * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the Service name. + * + * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 RevisionTemplate. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 RevisionTemplate. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 RevisionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 RevisionTemplate. + *

This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Optional. Scaling settings for this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\RevisionScaling|null + */ + public function getScaling() + { + return $this->scaling; + } + + public function hasScaling() + { + return isset($this->scaling); + } + + public function clearScaling() + { + unset($this->scaling); + } + + /** + * Optional. Scaling settings for this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\RevisionScaling $var + * @return $this + */ + public function setScaling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScaling::class); + $this->scaling = $var; + + return $this; + } + + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\VpcAccess|null + */ + public function getVpcAccess() + { + return $this->vpc_access; + } + + public function hasVpcAccess() + { + return isset($this->vpc_access); + } + + public function clearVpcAccess() + { + unset($this->vpc_access); + } + + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\VpcAccess $var + * @return $this + */ + public function setVpcAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); + $this->vpc_access = $var; + + return $this; + } + + /** + * Optional. Max allowed time for an instance to respond to a request. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Optional. Max allowed time for an instance to respond to a request. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Holds the single container that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Holds the single container that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 10; + * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); + $this->containers = $arr; + + return $this; + } + + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * Optional. The sandbox environment to host this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getExecutionEnvironment() + { + return $this->execution_environment; + } + + /** + * Optional. The sandbox environment to host this Revision. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setExecutionEnvironment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); + $this->execution_environment = $var; + + return $this; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 14 [(.google.api.resource_reference) = { + * @return string + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 14 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->encryption_key = $var; + + return $this; + } + + /** + * Optional. Sets the maximum number of requests that each serving instance + * can receive. If not specified or 0, concurrency defaults to 80 when + * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. + * + * Generated from protobuf field int32 max_instance_request_concurrency = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxInstanceRequestConcurrency() + { + return $this->max_instance_request_concurrency; + } + + /** + * Optional. Sets the maximum number of requests that each serving instance + * can receive. If not specified or 0, concurrency defaults to 80 when + * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. + * + * Generated from protobuf field int32 max_instance_request_concurrency = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxInstanceRequestConcurrency($var) + { + GPBUtil::checkInt32($var); + $this->max_instance_request_concurrency = $var; + + return $this; + } + + /** + * Optional. Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\ServiceMesh|null + */ + public function getServiceMesh() + { + return $this->service_mesh; + } + + public function hasServiceMesh() + { + return isset($this->service_mesh); + } + + public function clearServiceMesh() + { + unset($this->service_mesh); + } + + /** + * Optional. Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\ServiceMesh $var + * @return $this + */ + public function setServiceMesh($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceMesh::class); + $this->service_mesh = $var; + + return $this; + } + + /** + * Optional. The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEncryptionKeyRevocationAction() + { + return $this->encryption_key_revocation_action; + } + + /** + * Optional. The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEncryptionKeyRevocationAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class); + $this->encryption_key_revocation_action = $var; + + return $this; + } + + /** + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getEncryptionKeyShutdownDuration() + { + return $this->encryption_key_shutdown_duration; + } + + public function hasEncryptionKeyShutdownDuration() + { + return isset($this->encryption_key_shutdown_duration); + } + + public function clearEncryptionKeyShutdownDuration() + { + unset($this->encryption_key_shutdown_duration); + } + + /** + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEncryptionKeyShutdownDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->encryption_key_shutdown_duration = $var; + + return $this; + } + + /** + * Optional. Enable session affinity. + * + * Generated from protobuf field bool session_affinity = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSessionAffinity() + { + return $this->session_affinity; + } + + /** + * Optional. Enable session affinity. + * + * Generated from protobuf field bool session_affinity = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSessionAffinity($var) + { + GPBUtil::checkBool($var); + $this->session_affinity = $var; + + return $this; + } + + /** + * Optional. Disables health checking containers during deployment. + * + * Generated from protobuf field bool health_check_disabled = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getHealthCheckDisabled() + { + return $this->health_check_disabled; + } + + /** + * Optional. Disables health checking containers during deployment. + * + * Generated from protobuf field bool health_check_disabled = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setHealthCheckDisabled($var) + { + GPBUtil::checkBool($var); + $this->health_check_disabled = $var; + + return $this; + } + + /** + * Optional. The node selector for the revision template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\NodeSelector|null + */ + public function getNodeSelector() + { + return $this->node_selector; + } + + public function hasNodeSelector() + { + return isset($this->node_selector); + } + + public function clearNodeSelector() + { + unset($this->node_selector); + } + + /** + * Optional. The node selector for the revision template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\NodeSelector $var + * @return $this + */ + public function setNodeSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); + $this->node_selector = $var; + + return $this; + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this revision. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; + } + + public function hasGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled); + } + + public function clearGpuZonalRedundancyDisabled() + { + unset($this->gpu_zonal_redundancy_disabled); + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this revision. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setGpuZonalRedundancyDisabled($var) + { + GPBUtil::checkBool($var); + $this->gpu_zonal_redundancy_disabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php new file mode 100644 index 000000000000..bf51806e3bcb --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php @@ -0,0 +1,215 @@ +google.cloud.run.v2.RunJobRequest + */ +class RunJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * Overrides specification for a given execution of a job. If provided, + * overrides will be applied to update the execution or task spec. + * + * Generated from protobuf field .google.cloud.run.v2.RunJobRequest.Overrides overrides = 4; + */ + protected $overrides = null; + + /** + * @param string $name Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. Please see + * {@see JobsClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\RunJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * @type bool $validate_only + * Indicates that the request should be validated without actually + * deleting any resources. + * @type string $etag + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * @type \Google\Cloud\Run\V2\RunJobRequest\Overrides $overrides + * Overrides specification for a given execution of a job. If provided, + * overrides will be applied to update the execution or task spec. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full name of the Job. + * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} + * can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated without actually + * deleting any resources. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Overrides specification for a given execution of a job. If provided, + * overrides will be applied to update the execution or task spec. + * + * Generated from protobuf field .google.cloud.run.v2.RunJobRequest.Overrides overrides = 4; + * @return \Google\Cloud\Run\V2\RunJobRequest\Overrides|null + */ + public function getOverrides() + { + return $this->overrides; + } + + public function hasOverrides() + { + return isset($this->overrides); + } + + public function clearOverrides() + { + unset($this->overrides); + } + + /** + * Overrides specification for a given execution of a job. If provided, + * overrides will be applied to update the execution or task spec. + * + * Generated from protobuf field .google.cloud.run.v2.RunJobRequest.Overrides overrides = 4; + * @param \Google\Cloud\Run\V2\RunJobRequest\Overrides $var + * @return $this + */ + public function setOverrides($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RunJobRequest\Overrides::class); + $this->overrides = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php new file mode 100644 index 000000000000..60098e2ce07b --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php @@ -0,0 +1,160 @@ +google.cloud.run.v2.RunJobRequest.Overrides + */ +class Overrides extends \Google\Protobuf\Internal\Message +{ + /** + * Per container override specification. + * + * Generated from protobuf field repeated .google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride container_overrides = 1; + */ + private $container_overrides; + /** + * Optional. The desired number of tasks the execution should run. Will + * replace existing task_count value. + * + * Generated from protobuf field int32 task_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $task_count = 0; + /** + * Duration in seconds the task may be active before the system will + * actively try to mark it failed and kill associated containers. Will + * replace existing timeout_seconds value. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 4; + */ + protected $timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\RunJobRequest\Overrides\ContainerOverride>|\Google\Protobuf\Internal\RepeatedField $container_overrides + * Per container override specification. + * @type int $task_count + * Optional. The desired number of tasks the execution should run. Will + * replace existing task_count value. + * @type \Google\Protobuf\Duration $timeout + * Duration in seconds the task may be active before the system will + * actively try to mark it failed and kill associated containers. Will + * replace existing timeout_seconds value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Per container override specification. + * + * Generated from protobuf field repeated .google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride container_overrides = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainerOverrides() + { + return $this->container_overrides; + } + + /** + * Per container override specification. + * + * Generated from protobuf field repeated .google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride container_overrides = 1; + * @param array<\Google\Cloud\Run\V2\RunJobRequest\Overrides\ContainerOverride>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainerOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\RunJobRequest\Overrides\ContainerOverride::class); + $this->container_overrides = $arr; + + return $this; + } + + /** + * Optional. The desired number of tasks the execution should run. Will + * replace existing task_count value. + * + * Generated from protobuf field int32 task_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTaskCount() + { + return $this->task_count; + } + + /** + * Optional. The desired number of tasks the execution should run. Will + * replace existing task_count value. + * + * Generated from protobuf field int32 task_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTaskCount($var) + { + GPBUtil::checkInt32($var); + $this->task_count = $var; + + return $this; + } + + /** + * Duration in seconds the task may be active before the system will + * actively try to mark it failed and kill associated containers. Will + * replace existing timeout_seconds value. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Duration in seconds the task may be active before the system will + * actively try to mark it failed and kill associated containers. Will + * replace existing timeout_seconds value. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Overrides::class, \Google\Cloud\Run\V2\RunJobRequest_Overrides::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php new file mode 100644 index 000000000000..9d002dff8c09 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php @@ -0,0 +1,180 @@ +google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride + */ +class ContainerOverride extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the container specified as a DNS_LABEL. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. Arguments to the entrypoint. Will replace existing args for + * override. + * + * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $args; + /** + * List of environment variables to set in the container. Will be merged + * with existing env for override. + * + * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 3; + */ + private $env; + /** + * Optional. True if the intention is to clear out existing args list. + * + * Generated from protobuf field bool clear_args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $clear_args = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the container specified as a DNS_LABEL. + * @type array|\Google\Protobuf\Internal\RepeatedField $args + * Optional. Arguments to the entrypoint. Will replace existing args for + * override. + * @type array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $env + * List of environment variables to set in the container. Will be merged + * with existing env for override. + * @type bool $clear_args + * Optional. True if the intention is to clear out existing args list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * The name of the container specified as a DNS_LABEL. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the container specified as a DNS_LABEL. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Arguments to the entrypoint. Will replace existing args for + * override. + * + * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional. Arguments to the entrypoint. Will replace existing args for + * override. + * + * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->args = $arr; + + return $this; + } + + /** + * List of environment variables to set in the container. Will be merged + * with existing env for override. + * + * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnv() + { + return $this->env; + } + + /** + * List of environment variables to set in the container. Will be merged + * with existing env for override. + * + * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 3; + * @param array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnv($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\EnvVar::class); + $this->env = $arr; + + return $this; + } + + /** + * Optional. True if the intention is to clear out existing args list. + * + * Generated from protobuf field bool clear_args = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getClearArgs() + { + return $this->clear_args; + } + + /** + * Optional. True if the intention is to clear out existing args list. + * + * Generated from protobuf field bool clear_args = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setClearArgs($var) + { + GPBUtil::checkBool($var); + $this->clear_args = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContainerOverride::class, \Google\Cloud\Run\V2\RunJobRequest_Overrides_ContainerOverride::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php new file mode 100644 index 000000000000..060822bb2454 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php @@ -0,0 +1,121 @@ +google.cloud.run.v2.SecretKeySelector + */ +class SecretKeySelector extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret_name} if the secret is in the same project. + * projects/{project}/secrets/{secret_name} if the secret is + * in a different project. + * + * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $secret = ''; + /** + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest version, an integer for a specific version, + * or a version alias. + * + * Generated from protobuf field string version = 2 [(.google.api.resource_reference) = { + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret_name} if the secret is in the same project. + * projects/{project}/secrets/{secret_name} if the secret is + * in a different project. + * @type string $version + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest version, an integer for a specific version, + * or a version alias. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret_name} if the secret is in the same project. + * projects/{project}/secrets/{secret_name} if the secret is + * in a different project. + * + * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret_name} if the secret is in the same project. + * projects/{project}/secrets/{secret_name} if the secret is + * in a different project. + * + * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret = $var; + + return $this; + } + + /** + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest version, an integer for a specific version, + * or a version alias. + * + * Generated from protobuf field string version = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest version, an integer for a specific version, + * or a version alias. + * + * Generated from protobuf field string version = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php new file mode 100644 index 000000000000..a34c83cf18ec --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php @@ -0,0 +1,217 @@ +google.cloud.run.v2.SecretVolumeSource + */ +class SecretVolumeSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret} if the secret is in the same project. + * projects/{project}/secrets/{secret} if the secret is + * in a different project. + * + * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $secret = ''; + /** + * If unspecified, the volume will expose a file whose name is the + * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. + * If specified, the key will be used as the version to fetch from Cloud + * Secret Manager and the path will be the name of the file exposed in the + * volume. When items are defined, they must specify a path and a version. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VersionToPath items = 2; + */ + private $items; + /** + * Integer representation of mode bits to use on created files by default. + * Must be a value between 0000 and 0777 (octal), defaulting to 0444. + * Directories within the path are not affected by this setting. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * This might be in conflict with other options that affect the + * file mode, like fsGroup, and as a result, other mode bits could be set. + * + * Generated from protobuf field int32 default_mode = 3; + */ + protected $default_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret} if the secret is in the same project. + * projects/{project}/secrets/{secret} if the secret is + * in a different project. + * @type array<\Google\Cloud\Run\V2\VersionToPath>|\Google\Protobuf\Internal\RepeatedField $items + * If unspecified, the volume will expose a file whose name is the + * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. + * If specified, the key will be used as the version to fetch from Cloud + * Secret Manager and the path will be the name of the file exposed in the + * volume. When items are defined, they must specify a path and a version. + * @type int $default_mode + * Integer representation of mode bits to use on created files by default. + * Must be a value between 0000 and 0777 (octal), defaulting to 0444. + * Directories within the path are not affected by this setting. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * This might be in conflict with other options that affect the + * file mode, like fsGroup, and as a result, other mode bits could be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret} if the secret is in the same project. + * projects/{project}/secrets/{secret} if the secret is + * in a different project. + * + * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Required. The name of the secret in Cloud Secret Manager. + * Format: {secret} if the secret is in the same project. + * projects/{project}/secrets/{secret} if the secret is + * in a different project. + * + * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret = $var; + + return $this; + } + + /** + * If unspecified, the volume will expose a file whose name is the + * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. + * If specified, the key will be used as the version to fetch from Cloud + * Secret Manager and the path will be the name of the file exposed in the + * volume. When items are defined, they must specify a path and a version. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VersionToPath items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * If unspecified, the volume will expose a file whose name is the + * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. + * If specified, the key will be used as the version to fetch from Cloud + * Secret Manager and the path will be the name of the file exposed in the + * volume. When items are defined, they must specify a path and a version. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VersionToPath items = 2; + * @param array<\Google\Cloud\Run\V2\VersionToPath>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\VersionToPath::class); + $this->items = $arr; + + return $this; + } + + /** + * Integer representation of mode bits to use on created files by default. + * Must be a value between 0000 and 0777 (octal), defaulting to 0444. + * Directories within the path are not affected by this setting. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * This might be in conflict with other options that affect the + * file mode, like fsGroup, and as a result, other mode bits could be set. + * + * Generated from protobuf field int32 default_mode = 3; + * @return int + */ + public function getDefaultMode() + { + return $this->default_mode; + } + + /** + * Integer representation of mode bits to use on created files by default. + * Must be a value between 0000 and 0777 (octal), defaulting to 0444. + * Directories within the path are not affected by this setting. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * This might be in conflict with other options that affect the + * file mode, like fsGroup, and as a result, other mode bits could be set. + * + * Generated from protobuf field int32 default_mode = 3; + * @param int $var + * @return $this + */ + public function setDefaultMode($var) + { + GPBUtil::checkInt32($var); + $this->default_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php new file mode 100644 index 000000000000..20dac1100ee6 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php @@ -0,0 +1,1761 @@ +google.cloud.run.v2.Service + */ +class Service extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The fully qualified name of this Service. In + * CreateServiceRequest, this field is ignored, and instead composed from + * CreateServiceRequest.parent and CreateServiceRequest.service_id. + * Format: + * projects/{project}/locations/{location}/services/{service_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * User-provided description of the Service. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation = 0; + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Service. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 Service. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * + * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. For a deleted resource, the time after which it will be + * permanently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modifier = ''; + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 13; + */ + protected $client = ''; + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 14; + */ + protected $client_version = ''; + /** + * Optional. Provides the ingress settings for this Service. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * + * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ingress = 0; + /** + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $launch_stage = 0; + /** + * Optional. Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $binary_authorization = null; + /** + * Required. The template used to create revisions for this Service. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $template = null; + /** + * Optional. Specifies how to distribute traffic over a collection of + * Revisions belonging to the Service. If traffic is empty or not provided, + * defaults to 100% traffic to the latest `Ready` Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTarget traffic = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $traffic; + /** + * Optional. Specifies service-level scaling settings + * + * Generated from protobuf field .google.cloud.run.v2.ServiceScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scaling = null; + /** + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this service. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * + * Generated from protobuf field bool invoker_iam_disabled = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $invoker_iam_disabled = false; + /** + * Optional. Disables public resolution of the default URI of this service. + * + * Generated from protobuf field bool default_uri_disabled = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_uri_disabled = false; + /** + * Output only. All URLs serving traffic for this Service. + * + * Generated from protobuf field repeated string urls = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $urls; + /** + * Optional. IAP settings on the Service. + * + * Generated from protobuf field bool iap_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $iap_enabled = false; + /** + * Optional. Settings for multi-region deployment. + * + * Generated from protobuf field .google.cloud.run.v2.Service.MultiRegionSettings multi_region_settings = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multi_region_settings = null; + /** + * One or more custom audiences that you want this service to support. Specify + * each custom audience as the full URL in a string. The custom audiences are + * encoded in the token and used to authenticate requests. For more + * information, see + * https://cloud.google.com/run/docs/configuring/custom-audiences. + * + * Generated from protobuf field repeated string custom_audiences = 37; + */ + private $custom_audiences; + /** + * Output only. The generation of this Service currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $observed_generation = 0; + /** + * Output only. The Condition of this Service, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $terminal_condition = null; + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Service does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. Name of the latest revision that is serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $latest_ready_revision = ''; + /** + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $latest_created_revision = ''; + /** + * Output only. Detailed status information for corresponding traffic targets. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $traffic_statuses; + /** + * Output only. The main URI in which this Service is serving traffic. + * + * Generated from protobuf field string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. True if Cloud Run Threat Detection monitoring is enabled for + * the parent project of this Service. + * + * Generated from protobuf field bool threat_detection_enabled = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $threat_detection_enabled = false; + /** + * Optional. Configuration for building a Cloud Run function. + * + * Generated from protobuf field .google.cloud.run.v2.BuildConfig build_config = 41 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $build_config = null; + /** + * Output only. Returns true if the Service is currently being acted upon by + * the system to bring it into the desired state. + * When a new Service is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Service to the + * desired serving state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation`, + * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient + * values that might mismatch the intended state: Once reconciliation is over + * (and this field is false), there are two possible outcomes: reconciliation + * succeeded and the serving state matches the Service, or there was an error, + * and reconciliation failed. This state can be found in + * `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: `traffic` and + * `traffic_statuses`, `observed_generation` and `generation`, + * `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `traffic_statuses`, `observed_generation`, and + * `latest_ready_revision` will have the state of the last serving revision, + * or empty for newly created Services. Additional information on the failure + * can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The fully qualified name of this Service. In + * CreateServiceRequest, this field is ignored, and instead composed from + * CreateServiceRequest.parent and CreateServiceRequest.service_id. + * Format: + * projects/{project}/locations/{location}/services/{service_id} + * @type string $description + * User-provided description of the Service. This field currently has a + * 512-character limit. + * @type string $uid + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type int|string $generation + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Service. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 Service. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. For a deleted resource, the time after which it will be + * permanently deleted. + * @type string $creator + * Output only. Email address of the authenticated creator. + * @type string $last_modifier + * Output only. Email address of the last authenticated modifier. + * @type string $client + * Arbitrary identifier for the API client. + * @type string $client_version + * Arbitrary version identifier for the API client. + * @type int $ingress + * Optional. Provides the ingress settings for this Service. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * @type int $launch_stage + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * @type \Google\Cloud\Run\V2\BinaryAuthorization $binary_authorization + * Optional. Settings for the Binary Authorization feature. + * @type \Google\Cloud\Run\V2\RevisionTemplate $template + * Required. The template used to create revisions for this Service. + * @type array<\Google\Cloud\Run\V2\TrafficTarget>|\Google\Protobuf\Internal\RepeatedField $traffic + * Optional. Specifies how to distribute traffic over a collection of + * Revisions belonging to the Service. If traffic is empty or not provided, + * defaults to 100% traffic to the latest `Ready` Revision. + * @type \Google\Cloud\Run\V2\ServiceScaling $scaling + * Optional. Specifies service-level scaling settings + * @type bool $invoker_iam_disabled + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this service. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * @type bool $default_uri_disabled + * Optional. Disables public resolution of the default URI of this service. + * @type array|\Google\Protobuf\Internal\RepeatedField $urls + * Output only. All URLs serving traffic for this Service. + * @type bool $iap_enabled + * Optional. IAP settings on the Service. + * @type \Google\Cloud\Run\V2\Service\MultiRegionSettings $multi_region_settings + * Optional. Settings for multi-region deployment. + * @type array|\Google\Protobuf\Internal\RepeatedField $custom_audiences + * One or more custom audiences that you want this service to support. Specify + * each custom audience as the full URL in a string. The custom audiences are + * encoded in the token and used to authenticate requests. For more + * information, see + * https://cloud.google.com/run/docs/configuring/custom-audiences. + * @type int|string $observed_generation + * Output only. The generation of this Service currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * @type \Google\Cloud\Run\V2\Condition $terminal_condition + * Output only. The Condition of this Service, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Service does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * @type string $latest_ready_revision + * Output only. Name of the latest revision that is serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * @type string $latest_created_revision + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * @type array<\Google\Cloud\Run\V2\TrafficTargetStatus>|\Google\Protobuf\Internal\RepeatedField $traffic_statuses + * Output only. Detailed status information for corresponding traffic targets. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * @type string $uri + * Output only. The main URI in which this Service is serving traffic. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type bool $threat_detection_enabled + * Output only. True if Cloud Run Threat Detection monitoring is enabled for + * the parent project of this Service. + * @type \Google\Cloud\Run\V2\BuildConfig $build_config + * Optional. Configuration for building a Cloud Run function. + * @type bool $reconciling + * Output only. Returns true if the Service is currently being acted upon by + * the system to bring it into the desired state. + * When a new Service is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Service to the + * desired serving state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation`, + * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient + * values that might mismatch the intended state: Once reconciliation is over + * (and this field is false), there are two possible outcomes: reconciliation + * succeeded and the serving state matches the Service, or there was an error, + * and reconciliation failed. This state can be found in + * `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: `traffic` and + * `traffic_statuses`, `observed_generation` and `generation`, + * `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `traffic_statuses`, `observed_generation`, and + * `latest_ready_revision` will have the state of the last serving revision, + * or empty for newly created Services. Additional information on the failure + * can be found in `terminal_condition` and `conditions`. + * @type string $etag + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The fully qualified name of this Service. In + * CreateServiceRequest, this field is ignored, and instead composed from + * CreateServiceRequest.parent and CreateServiceRequest.service_id. + * Format: + * projects/{project}/locations/{location}/services/{service_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The fully qualified name of this Service. In + * CreateServiceRequest, this field is ignored, and instead composed from + * CreateServiceRequest.parent and CreateServiceRequest.service_id. + * Format: + * projects/{project}/locations/{location}/services/{service_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * User-provided description of the Service. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the Service. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Service. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + *

Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 Service. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 Service. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * + * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 Service. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * + * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permanently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permanently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastModifier() + { + return $this->last_modifier; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastModifier($var) + { + GPBUtil::checkString($var, True); + $this->last_modifier = $var; + + return $this; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 13; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 13; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 14; + * @return string + */ + public function getClientVersion() + { + return $this->client_version; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 14; + * @param string $var + * @return $this + */ + public function setClientVersion($var) + { + GPBUtil::checkString($var, True); + $this->client_version = $var; + + return $this; + } + + /** + * Optional. Provides the ingress settings for this Service. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * + * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getIngress() + { + return $this->ingress; + } + + /** + * Optional. Provides the ingress settings for this Service. On output, + * returns the currently observed ingress settings, or + * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. + * + * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setIngress($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\IngressTraffic::class); + $this->ingress = $var; + + return $this; + } + + /** + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the resource + * uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + + /** + * Optional. Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Optional. Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + + /** + * Required. The template used to create revisions for this Service. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\RevisionTemplate|null + */ + public function getTemplate() + { + return $this->template; + } + + public function hasTemplate() + { + return isset($this->template); + } + + public function clearTemplate() + { + unset($this->template); + } + + /** + * Required. The template used to create revisions for this Service. + * + * Generated from protobuf field .google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\RevisionTemplate $var + * @return $this + */ + public function setTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionTemplate::class); + $this->template = $var; + + return $this; + } + + /** + * Optional. Specifies how to distribute traffic over a collection of + * Revisions belonging to the Service. If traffic is empty or not provided, + * defaults to 100% traffic to the latest `Ready` Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTarget traffic = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTraffic() + { + return $this->traffic; + } + + /** + * Optional. Specifies how to distribute traffic over a collection of + * Revisions belonging to the Service. If traffic is empty or not provided, + * defaults to 100% traffic to the latest `Ready` Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTarget traffic = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Run\V2\TrafficTarget>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTraffic($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\TrafficTarget::class); + $this->traffic = $arr; + + return $this; + } + + /** + * Optional. Specifies service-level scaling settings + * + * Generated from protobuf field .google.cloud.run.v2.ServiceScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\ServiceScaling|null + */ + public function getScaling() + { + return $this->scaling; + } + + public function hasScaling() + { + return isset($this->scaling); + } + + public function clearScaling() + { + unset($this->scaling); + } + + /** + * Optional. Specifies service-level scaling settings + * + * Generated from protobuf field .google.cloud.run.v2.ServiceScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\ServiceScaling $var + * @return $this + */ + public function setScaling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceScaling::class); + $this->scaling = $var; + + return $this; + } + + /** + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this service. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * + * Generated from protobuf field bool invoker_iam_disabled = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getInvokerIamDisabled() + { + return $this->invoker_iam_disabled; + } + + /** + * Optional. Disables IAM permission check for run.routes.invoke for callers + * of this service. For more information, visit + * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. + * + * Generated from protobuf field bool invoker_iam_disabled = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setInvokerIamDisabled($var) + { + GPBUtil::checkBool($var); + $this->invoker_iam_disabled = $var; + + return $this; + } + + /** + * Optional. Disables public resolution of the default URI of this service. + * + * Generated from protobuf field bool default_uri_disabled = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDefaultUriDisabled() + { + return $this->default_uri_disabled; + } + + /** + * Optional. Disables public resolution of the default URI of this service. + * + * Generated from protobuf field bool default_uri_disabled = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDefaultUriDisabled($var) + { + GPBUtil::checkBool($var); + $this->default_uri_disabled = $var; + + return $this; + } + + /** + * Output only. All URLs serving traffic for this Service. + * + * Generated from protobuf field repeated string urls = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Output only. All URLs serving traffic for this Service. + * + * Generated from protobuf field repeated string urls = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->urls = $arr; + + return $this; + } + + /** + * Optional. IAP settings on the Service. + * + * Generated from protobuf field bool iap_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIapEnabled() + { + return $this->iap_enabled; + } + + /** + * Optional. IAP settings on the Service. + * + * Generated from protobuf field bool iap_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIapEnabled($var) + { + GPBUtil::checkBool($var); + $this->iap_enabled = $var; + + return $this; + } + + /** + * Optional. Settings for multi-region deployment. + * + * Generated from protobuf field .google.cloud.run.v2.Service.MultiRegionSettings multi_region_settings = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\Service\MultiRegionSettings|null + */ + public function getMultiRegionSettings() + { + return $this->multi_region_settings; + } + + public function hasMultiRegionSettings() + { + return isset($this->multi_region_settings); + } + + public function clearMultiRegionSettings() + { + unset($this->multi_region_settings); + } + + /** + * Optional. Settings for multi-region deployment. + * + * Generated from protobuf field .google.cloud.run.v2.Service.MultiRegionSettings multi_region_settings = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\Service\MultiRegionSettings $var + * @return $this + */ + public function setMultiRegionSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Service\MultiRegionSettings::class); + $this->multi_region_settings = $var; + + return $this; + } + + /** + * One or more custom audiences that you want this service to support. Specify + * each custom audience as the full URL in a string. The custom audiences are + * encoded in the token and used to authenticate requests. For more + * information, see + * https://cloud.google.com/run/docs/configuring/custom-audiences. + * + * Generated from protobuf field repeated string custom_audiences = 37; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomAudiences() + { + return $this->custom_audiences; + } + + /** + * One or more custom audiences that you want this service to support. Specify + * each custom audience as the full URL in a string. The custom audiences are + * encoded in the token and used to authenticate requests. For more + * information, see + * https://cloud.google.com/run/docs/configuring/custom-audiences. + * + * Generated from protobuf field repeated string custom_audiences = 37; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomAudiences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->custom_audiences = $arr; + + return $this; + } + + /** + * Output only. The generation of this Service currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getObservedGeneration() + { + return $this->observed_generation; + } + + /** + * Output only. The generation of this Service currently serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setObservedGeneration($var) + { + GPBUtil::checkInt64($var); + $this->observed_generation = $var; + + return $this; + } + + /** + * Output only. The Condition of this Service, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\Condition|null + */ + public function getTerminalCondition() + { + return $this->terminal_condition; + } + + public function hasTerminalCondition() + { + return isset($this->terminal_condition); + } + + public function clearTerminalCondition() + { + unset($this->terminal_condition); + } + + /** + * Output only. The Condition of this Service, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\Condition $var + * @return $this + */ + public function setTerminalCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Condition::class); + $this->terminal_condition = $var; + + return $this; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Service does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the Service does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. Name of the latest revision that is serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getLatestReadyRevision() + { + return $this->latest_ready_revision; + } + + /** + * Output only. Name of the latest revision that is serving traffic. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestReadyRevision($var) + { + GPBUtil::checkString($var, True); + $this->latest_ready_revision = $var; + + return $this; + } + + /** + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getLatestCreatedRevision() + { + return $this->latest_created_revision; + } + + /** + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestCreatedRevision($var) + { + GPBUtil::checkString($var, True); + $this->latest_created_revision = $var; + + return $this; + } + + /** + * Output only. Detailed status information for corresponding traffic targets. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrafficStatuses() + { + return $this->traffic_statuses; + } + + /** + * Output only. Detailed status information for corresponding traffic targets. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\TrafficTargetStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrafficStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\TrafficTargetStatus::class); + $this->traffic_statuses = $arr; + + return $this; + } + + /** + * Output only. The main URI in which this Service is serving traffic. + * + * Generated from protobuf field string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. The main URI in which this Service is serving traffic. + * + * Generated from protobuf field string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. True if Cloud Run Threat Detection monitoring is enabled for + * the parent project of this Service. + * + * Generated from protobuf field bool threat_detection_enabled = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getThreatDetectionEnabled() + { + return $this->threat_detection_enabled; + } + + /** + * Output only. True if Cloud Run Threat Detection monitoring is enabled for + * the parent project of this Service. + * + * Generated from protobuf field bool threat_detection_enabled = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setThreatDetectionEnabled($var) + { + GPBUtil::checkBool($var); + $this->threat_detection_enabled = $var; + + return $this; + } + + /** + * Optional. Configuration for building a Cloud Run function. + * + * Generated from protobuf field .google.cloud.run.v2.BuildConfig build_config = 41 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\BuildConfig|null + */ + public function getBuildConfig() + { + return $this->build_config; + } + + public function hasBuildConfig() + { + return isset($this->build_config); + } + + public function clearBuildConfig() + { + unset($this->build_config); + } + + /** + * Optional. Configuration for building a Cloud Run function. + * + * Generated from protobuf field .google.cloud.run.v2.BuildConfig build_config = 41 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\BuildConfig $var + * @return $this + */ + public function setBuildConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BuildConfig::class); + $this->build_config = $var; + + return $this; + } + + /** + * Output only. Returns true if the Service is currently being acted upon by + * the system to bring it into the desired state. + * When a new Service is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Service to the + * desired serving state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation`, + * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient + * values that might mismatch the intended state: Once reconciliation is over + * (and this field is false), there are two possible outcomes: reconciliation + * succeeded and the serving state matches the Service, or there was an error, + * and reconciliation failed. This state can be found in + * `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: `traffic` and + * `traffic_statuses`, `observed_generation` and `generation`, + * `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `traffic_statuses`, `observed_generation`, and + * `latest_ready_revision` will have the state of the last serving revision, + * or empty for newly created Services. Additional information on the failure + * can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Returns true if the Service is currently being acted upon by + * the system to bring it into the desired state. + * When a new Service is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the Service to the + * desired serving state. This process is called reconciliation. + * While reconciliation is in process, `observed_generation`, + * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient + * values that might mismatch the intended state: Once reconciliation is over + * (and this field is false), there are two possible outcomes: reconciliation + * succeeded and the serving state matches the Service, or there was an error, + * and reconciliation failed. This state can be found in + * `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: `traffic` and + * `traffic_statuses`, `observed_generation` and `generation`, + * `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `traffic_statuses`, `observed_generation`, and + * `latest_ready_revision` will have the state of the last serving revision, + * or empty for newly created Services. Additional information on the failure + * can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php new file mode 100644 index 000000000000..de8e29d1209a --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php @@ -0,0 +1,104 @@ +google.cloud.run.v2.Service.MultiRegionSettings + */ +class MultiRegionSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List of regions to deploy to, including primary region. + * + * Generated from protobuf field repeated string regions = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $regions; + /** + * Optional. System-generated unique id for the multi-region Service. + * + * Generated from protobuf field string multi_region_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multi_region_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $regions + * Required. List of regions to deploy to, including primary region. + * @type string $multi_region_id + * Optional. System-generated unique id for the multi-region Service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. List of regions to deploy to, including primary region. + * + * Generated from protobuf field repeated string regions = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegions() + { + return $this->regions; + } + + /** + * Required. List of regions to deploy to, including primary region. + * + * Generated from protobuf field repeated string regions = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->regions = $arr; + + return $this; + } + + /** + * Optional. System-generated unique id for the multi-region Service. + * + * Generated from protobuf field string multi_region_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMultiRegionId() + { + return $this->multi_region_id; + } + + /** + * Optional. System-generated unique id for the multi-region Service. + * + * Generated from protobuf field string multi_region_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMultiRegionId($var) + { + GPBUtil::checkString($var, True); + $this->multi_region_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MultiRegionSettings::class, \Google\Cloud\Run\V2\Service_MultiRegionSettings::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php new file mode 100644 index 000000000000..19cd1b0263c1 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php @@ -0,0 +1,76 @@ +google.cloud.run.v2.ServiceMesh + */ +class ServiceMesh extends \Google\Protobuf\Internal\Message +{ + /** + * The Mesh resource name. Format: + * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can + * be project id or number. + * + * Generated from protobuf field string mesh = 1 [(.google.api.resource_reference) = { + */ + protected $mesh = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mesh + * The Mesh resource name. Format: + * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can + * be project id or number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * The Mesh resource name. Format: + * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can + * be project id or number. + * + * Generated from protobuf field string mesh = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getMesh() + { + return $this->mesh; + } + + /** + * The Mesh resource name. Format: + * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can + * be project id or number. + * + * Generated from protobuf field string mesh = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMesh($var) + { + GPBUtil::checkString($var, True); + $this->mesh = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php new file mode 100644 index 000000000000..2d0ada7f2f49 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php @@ -0,0 +1,204 @@ +google.cloud.run.v2.ServiceScaling + */ +class ServiceScaling extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. total min instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * + * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_instance_count = 0; + /** + * Optional. The scaling mode for the service. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scaling_mode = 0; + /** + * Optional. total max instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * + * Generated from protobuf field int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_instance_count = 0; + /** + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $manual_instance_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $min_instance_count + * Optional. total min instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * @type int $scaling_mode + * Optional. The scaling mode for the service. + * @type int $max_instance_count + * Optional. total max instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * @type int $manual_instance_count + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. total min instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * + * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinInstanceCount() + { + return $this->min_instance_count; + } + + /** + * Optional. total min instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * + * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->min_instance_count = $var; + + return $this; + } + + /** + * Optional. The scaling mode for the service. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getScalingMode() + { + return $this->scaling_mode; + } + + /** + * Optional. The scaling mode for the service. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setScalingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ServiceScaling\ScalingMode::class); + $this->scaling_mode = $var; + + return $this; + } + + /** + * Optional. total max instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * + * Generated from protobuf field int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxInstanceCount() + { + return $this->max_instance_count; + } + + /** + * Optional. total max instances for the service. This number of instances is + * divided among all revisions with specified traffic based on the percent + * of traffic they are receiving. + * + * Generated from protobuf field int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->max_instance_count = $var; + + return $this; + } + + /** + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getManualInstanceCount() + { + return isset($this->manual_instance_count) ? $this->manual_instance_count : 0; + } + + public function hasManualInstanceCount() + { + return isset($this->manual_instance_count); + } + + public function clearManualInstanceCount() + { + unset($this->manual_instance_count); + } + + /** + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setManualInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->manual_instance_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php new file mode 100644 index 000000000000..58d181ecc828 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php @@ -0,0 +1,65 @@ +google.cloud.run.v2.ServiceScaling.ScalingMode + */ +class ScalingMode +{ + /** + * Unspecified. + * + * Generated from protobuf enum SCALING_MODE_UNSPECIFIED = 0; + */ + const SCALING_MODE_UNSPECIFIED = 0; + /** + * Scale based on traffic between min and max instances. + * + * Generated from protobuf enum AUTOMATIC = 1; + */ + const AUTOMATIC = 1; + /** + * Scale to exactly min instances and ignore max instances. + * + * Generated from protobuf enum MANUAL = 2; + */ + const MANUAL = 2; + + private static $valueToName = [ + self::SCALING_MODE_UNSPECIFIED => 'SCALING_MODE_UNSPECIFIED', + self::AUTOMATIC => 'AUTOMATIC', + self::MANUAL => 'MANUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ScalingMode::class, \Google\Cloud\Run\V2\ServiceScaling_ScalingMode::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php new file mode 100644 index 000000000000..a2e37ac307b6 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php @@ -0,0 +1,75 @@ +google.cloud.run.v2.SourceCode + */ +class SourceCode extends \Google\Protobuf\Internal\Message +{ + protected $source_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Run\V2\SourceCode\CloudStorageSource $cloud_storage_source + * The source is a Cloud Storage bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * The source is a Cloud Storage bucket. + * + * Generated from protobuf field .google.cloud.run.v2.SourceCode.CloudStorageSource cloud_storage_source = 1; + * @return \Google\Cloud\Run\V2\SourceCode\CloudStorageSource|null + */ + public function getCloudStorageSource() + { + return $this->readOneof(1); + } + + public function hasCloudStorageSource() + { + return $this->hasOneof(1); + } + + /** + * The source is a Cloud Storage bucket. + * + * Generated from protobuf field .google.cloud.run.v2.SourceCode.CloudStorageSource cloud_storage_source = 1; + * @param \Google\Cloud\Run\V2\SourceCode\CloudStorageSource $var + * @return $this + */ + public function setCloudStorageSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SourceCode\CloudStorageSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceType() + { + return $this->whichOneof("source_type"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php new file mode 100644 index 000000000000..a5a8cfce3e31 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php @@ -0,0 +1,138 @@ +google.cloud.run.v2.SourceCode.CloudStorageSource + */ +class CloudStorageSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud Storage bucket name. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket = ''; + /** + * Required. The Cloud Storage object name. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $object = ''; + /** + * Optional. The Cloud Storage object generation. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $generation = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Required. The Cloud Storage bucket name. + * @type string $object + * Required. The Cloud Storage object name. + * @type int|string $generation + * Optional. The Cloud Storage object generation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud Storage bucket name. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Required. The Cloud Storage bucket name. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * Required. The Cloud Storage object name. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getObject() + { + return $this->object; + } + + /** + * Required. The Cloud Storage object name. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkString($var, True); + $this->object = $var; + + return $this; + } + + /** + * Optional. The Cloud Storage object generation. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Optional. The Cloud Storage object generation. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudStorageSource::class, \Google\Cloud\Run\V2\SourceCode_CloudStorageSource::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StartInstanceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StartInstanceRequest.php new file mode 100644 index 000000000000..3d6b7a687ee5 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StartInstanceRequest.php @@ -0,0 +1,172 @@ +google.cloud.run.v2.StartInstanceRequest + */ +class StartInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. Please see + * {@see InstancesClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\StartInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * @type bool $validate_only + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * @type string $etag + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StopInstanceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StopInstanceRequest.php new file mode 100644 index 000000000000..ae8eab3cb318 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StopInstanceRequest.php @@ -0,0 +1,172 @@ +google.cloud.run.v2.StopInstanceRequest + */ +class StopInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. Please see + * {@see InstancesClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Run\V2\StopInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * @type bool $validate_only + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * @type string $etag + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Instance to stop. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}`, + * where `{project}` can be project id or number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Indicates that the request should be validated without actually + * stopping any resources. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. A system-generated fingerprint for this version of the resource. + * This may be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php new file mode 100644 index 000000000000..a577d719f1a5 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php @@ -0,0 +1,155 @@ +google.cloud.run.v2.StorageSource + */ +class StorageSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket = ''; + /** + * Required. Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $object = ''; + /** + * Optional. Google Cloud Storage generation for the object. If the generation + * is omitted, the latest generation will be used. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $generation = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Required. Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * @type string $object + * Required. Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * @type int|string $generation + * Optional. Google Cloud Storage generation for the object. If the generation + * is omitted, the latest generation will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Required. Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * Required. Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getObject() + { + return $this->object; + } + + /** + * Required. Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkString($var, True); + $this->object = $var; + + return $this; + } + + /** + * Optional. Google Cloud Storage generation for the object. If the generation + * is omitted, the latest generation will be used. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Optional. Google Cloud Storage generation for the object. If the generation + * is omitted, the latest generation will be used. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php new file mode 100644 index 000000000000..2190590b2a85 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php @@ -0,0 +1,466 @@ +google.cloud.run.v2.SubmitBuildRequest + */ +class SubmitBuildRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location to build in. Location must be a region, + * e.g., 'us-central1' or 'global' if the global builder is to be used. + * Format: + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. Artifact Registry URI to store the built image. + * + * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $image_uri = ''; + /** + * Optional. The service account to use for the build. If not set, the default + * Cloud Build service account for the project will be used. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = ''; + /** + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * + * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $worker_pool = ''; + /** + * Optional. Additional tags to annotate the build. + * + * Generated from protobuf field repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Optional. The machine type from default pool to use for the build. If left + * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 + * is supported. If worker_pool is set, this field will be ignored. + * + * Generated from protobuf field string machine_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $machine_type = ''; + /** + * Optional. The release track of the client that initiated the build request. + * + * Generated from protobuf field .google.api.LaunchStage release_track = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $release_track = 0; + /** + * Optional. The client that initiated the build request. + * + * Generated from protobuf field string client = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client = ''; + protected $source; + protected $build_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location to build in. Location must be a region, + * e.g., 'us-central1' or 'global' if the global builder is to be used. + * Format: + * `projects/{project}/locations/{location}` + * @type \Google\Cloud\Run\V2\StorageSource $storage_source + * Required. Source for the build. + * @type string $image_uri + * Required. Artifact Registry URI to store the built image. + * @type \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild $buildpack_build + * Build the source using Buildpacks. + * @type \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild $docker_build + * Build the source using Docker. This means the source has a Dockerfile. + * @type string $service_account + * Optional. The service account to use for the build. If not set, the default + * Cloud Build service account for the project will be used. + * @type string $worker_pool + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. Additional tags to annotate the build. + * @type string $machine_type + * Optional. The machine type from default pool to use for the build. If left + * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 + * is supported. If worker_pool is set, this field will be ignored. + * @type int $release_track + * Optional. The release track of the client that initiated the build request. + * @type string $client + * Optional. The client that initiated the build request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location to build in. Location must be a region, + * e.g., 'us-central1' or 'global' if the global builder is to be used. + * Format: + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location to build in. Location must be a region, + * e.g., 'us-central1' or 'global' if the global builder is to be used. + * Format: + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Source for the build. + * + * Generated from protobuf field .google.cloud.run.v2.StorageSource storage_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\StorageSource|null + */ + public function getStorageSource() + { + return $this->readOneof(2); + } + + public function hasStorageSource() + { + return $this->hasOneof(2); + } + + /** + * Required. Source for the build. + * + * Generated from protobuf field .google.cloud.run.v2.StorageSource storage_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\StorageSource $var + * @return $this + */ + public function setStorageSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\StorageSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Artifact Registry URI to store the built image. + * + * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * Required. Artifact Registry URI to store the built image. + * + * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * Build the source using Buildpacks. + * + * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild buildpack_build = 4; + * @return \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild|null + */ + public function getBuildpackBuild() + { + return $this->readOneof(4); + } + + public function hasBuildpackBuild() + { + return $this->hasOneof(4); + } + + /** + * Build the source using Buildpacks. + * + * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild buildpack_build = 4; + * @param \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild $var + * @return $this + */ + public function setBuildpackBuild($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Build the source using Docker. This means the source has a Dockerfile. + * + * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.DockerBuild docker_build = 5; + * @return \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild|null + */ + public function getDockerBuild() + { + return $this->readOneof(5); + } + + public function hasDockerBuild() + { + return $this->hasOneof(5); + } + + /** + * Build the source using Docker. This means the source has a Dockerfile. + * + * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.DockerBuild docker_build = 5; + * @param \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild $var + * @return $this + */ + public function setDockerBuild($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. The service account to use for the build. If not set, the default + * Cloud Build service account for the project will be used. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. The service account to use for the build. If not set, the default + * Cloud Build service account for the project will be used. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * + * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getWorkerPool() + { + return $this->worker_pool; + } + + /** + * Optional. Name of the Cloud Build Custom Worker Pool that should be used to + * build the function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * + * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWorkerPool($var) + { + GPBUtil::checkString($var, True); + $this->worker_pool = $var; + + return $this; + } + + /** + * Optional. Additional tags to annotate the build. + * + * Generated from protobuf field repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Additional tags to annotate the build. + * + * Generated from protobuf field repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Optional. The machine type from default pool to use for the build. If left + * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 + * is supported. If worker_pool is set, this field will be ignored. + * + * Generated from protobuf field string machine_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Optional. The machine type from default pool to use for the build. If left + * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 + * is supported. If worker_pool is set, this field will be ignored. + * + * Generated from protobuf field string machine_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Optional. The release track of the client that initiated the build request. + * + * Generated from protobuf field .google.api.LaunchStage release_track = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getReleaseTrack() + { + return $this->release_track; + } + + /** + * Optional. The release track of the client that initiated the build request. + * + * Generated from protobuf field .google.api.LaunchStage release_track = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setReleaseTrack($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->release_track = $var; + + return $this; + } + + /** + * Optional. The client that initiated the build request. + * + * Generated from protobuf field string client = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Optional. The client that initiated the build request. + * + * Generated from protobuf field string client = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getBuildType() + { + return $this->whichOneof("build_type"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php new file mode 100644 index 000000000000..464ca48abd5d --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php @@ -0,0 +1,317 @@ +google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild + */ +class BuildpacksBuild extends \Google\Protobuf\Internal\Message +{ + /** + * The runtime name, e.g. 'go113'. Leave blank for generic builds. + * + * Generated from protobuf field string runtime = 1 [deprecated = true]; + * @deprecated + */ + protected $runtime = ''; + /** + * Optional. Name of the function target if the source is a function source. + * Required for function builds. + * + * Generated from protobuf field string function_target = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $function_target = ''; + /** + * Optional. cache_image_uri is the GCR/AR URL where the cache image will be + * stored. cache_image_uri is optional and omitting it will disable caching. + * This URL must be stable across builds. It is used to derive a + * build-specific temporary URL by substituting the tag with the build ID. + * The build will clean up the temporary image on a best-effort basis. + * + * Generated from protobuf field string cache_image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cache_image_uri = ''; + /** + * Optional. The base image to use for the build. + * + * Generated from protobuf field string base_image = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $base_image = ''; + /** + * Optional. User-provided build-time environment variables. + * + * Generated from protobuf field map environment_variables = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $environment_variables; + /** + * Optional. Whether or not the application container will be enrolled in + * automatic base image updates. When true, the application will be built on + * a scratch base image, so the base layers can be appended at run time. + * + * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_automatic_updates = false; + /** + * Optional. project_descriptor stores the path to the project descriptor + * file. When empty, it means that there is no project descriptor file in + * the source. + * + * Generated from protobuf field string project_descriptor = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $project_descriptor = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $runtime + * The runtime name, e.g. 'go113'. Leave blank for generic builds. + * @type string $function_target + * Optional. Name of the function target if the source is a function source. + * Required for function builds. + * @type string $cache_image_uri + * Optional. cache_image_uri is the GCR/AR URL where the cache image will be + * stored. cache_image_uri is optional and omitting it will disable caching. + * This URL must be stable across builds. It is used to derive a + * build-specific temporary URL by substituting the tag with the build ID. + * The build will clean up the temporary image on a best-effort basis. + * @type string $base_image + * Optional. The base image to use for the build. + * @type array|\Google\Protobuf\Internal\MapField $environment_variables + * Optional. User-provided build-time environment variables. + * @type bool $enable_automatic_updates + * Optional. Whether or not the application container will be enrolled in + * automatic base image updates. When true, the application will be built on + * a scratch base image, so the base layers can be appended at run time. + * @type string $project_descriptor + * Optional. project_descriptor stores the path to the project descriptor + * file. When empty, it means that there is no project descriptor file in + * the source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); + parent::__construct($data); + } + + /** + * The runtime name, e.g. 'go113'. Leave blank for generic builds. + * + * Generated from protobuf field string runtime = 1 [deprecated = true]; + * @return string + * @deprecated + */ + public function getRuntime() + { + if ($this->runtime !== '') { + @trigger_error('runtime is deprecated.', E_USER_DEPRECATED); + } + return $this->runtime; + } + + /** + * The runtime name, e.g. 'go113'. Leave blank for generic builds. + * + * Generated from protobuf field string runtime = 1 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setRuntime($var) + { + @trigger_error('runtime is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->runtime = $var; + + return $this; + } + + /** + * Optional. Name of the function target if the source is a function source. + * Required for function builds. + * + * Generated from protobuf field string function_target = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFunctionTarget() + { + return $this->function_target; + } + + /** + * Optional. Name of the function target if the source is a function source. + * Required for function builds. + * + * Generated from protobuf field string function_target = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFunctionTarget($var) + { + GPBUtil::checkString($var, True); + $this->function_target = $var; + + return $this; + } + + /** + * Optional. cache_image_uri is the GCR/AR URL where the cache image will be + * stored. cache_image_uri is optional and omitting it will disable caching. + * This URL must be stable across builds. It is used to derive a + * build-specific temporary URL by substituting the tag with the build ID. + * The build will clean up the temporary image on a best-effort basis. + * + * Generated from protobuf field string cache_image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCacheImageUri() + { + return $this->cache_image_uri; + } + + /** + * Optional. cache_image_uri is the GCR/AR URL where the cache image will be + * stored. cache_image_uri is optional and omitting it will disable caching. + * This URL must be stable across builds. It is used to derive a + * build-specific temporary URL by substituting the tag with the build ID. + * The build will clean up the temporary image on a best-effort basis. + * + * Generated from protobuf field string cache_image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCacheImageUri($var) + { + GPBUtil::checkString($var, True); + $this->cache_image_uri = $var; + + return $this; + } + + /** + * Optional. The base image to use for the build. + * + * Generated from protobuf field string base_image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBaseImage() + { + return $this->base_image; + } + + /** + * Optional. The base image to use for the build. + * + * Generated from protobuf field string base_image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBaseImage($var) + { + GPBUtil::checkString($var, True); + $this->base_image = $var; + + return $this; + } + + /** + * Optional. User-provided build-time environment variables. + * + * Generated from protobuf field map environment_variables = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnvironmentVariables() + { + return $this->environment_variables; + } + + /** + * Optional. User-provided build-time environment variables. + * + * Generated from protobuf field map environment_variables = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnvironmentVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environment_variables = $arr; + + return $this; + } + + /** + * Optional. Whether or not the application container will be enrolled in + * automatic base image updates. When true, the application will be built on + * a scratch base image, so the base layers can be appended at run time. + * + * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableAutomaticUpdates() + { + return $this->enable_automatic_updates; + } + + /** + * Optional. Whether or not the application container will be enrolled in + * automatic base image updates. When true, the application will be built on + * a scratch base image, so the base layers can be appended at run time. + * + * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableAutomaticUpdates($var) + { + GPBUtil::checkBool($var); + $this->enable_automatic_updates = $var; + + return $this; + } + + /** + * Optional. project_descriptor stores the path to the project descriptor + * file. When empty, it means that there is no project descriptor file in + * the source. + * + * Generated from protobuf field string project_descriptor = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getProjectDescriptor() + { + return $this->project_descriptor; + } + + /** + * Optional. project_descriptor stores the path to the project descriptor + * file. When empty, it means that there is no project descriptor file in + * the source. + * + * Generated from protobuf field string project_descriptor = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setProjectDescriptor($var) + { + GPBUtil::checkString($var, True); + $this->project_descriptor = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BuildpacksBuild::class, \Google\Cloud\Run\V2\SubmitBuildRequest_BuildpacksBuild::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php new file mode 100644 index 000000000000..9089c3fd5f03 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php @@ -0,0 +1,36 @@ +google.cloud.run.v2.SubmitBuildRequest.DockerBuild + */ +class DockerBuild extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DockerBuild::class, \Google\Cloud\Run\V2\SubmitBuildRequest_DockerBuild::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php new file mode 100644 index 000000000000..42440dbfebd4 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php @@ -0,0 +1,149 @@ +google.cloud.run.v2.SubmitBuildResponse + */ +class SubmitBuildResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Build operation to be polled via CloudBuild API. + * + * Generated from protobuf field .google.longrunning.Operation build_operation = 1; + */ + protected $build_operation = null; + /** + * URI of the base builder image in Artifact Registry being used in the build. + * Used to opt into automatic base image updates. + * + * Generated from protobuf field string base_image_uri = 2; + */ + protected $base_image_uri = ''; + /** + * Warning message for the base image. + * + * Generated from protobuf field string base_image_warning = 3; + */ + protected $base_image_warning = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\LongRunning\Operation $build_operation + * Cloud Build operation to be polled via CloudBuild API. + * @type string $base_image_uri + * URI of the base builder image in Artifact Registry being used in the build. + * Used to opt into automatic base image updates. + * @type string $base_image_warning + * Warning message for the base image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Build operation to be polled via CloudBuild API. + * + * Generated from protobuf field .google.longrunning.Operation build_operation = 1; + * @return \Google\LongRunning\Operation|null + */ + public function getBuildOperation() + { + return $this->build_operation; + } + + public function hasBuildOperation() + { + return isset($this->build_operation); + } + + public function clearBuildOperation() + { + unset($this->build_operation); + } + + /** + * Cloud Build operation to be polled via CloudBuild API. + * + * Generated from protobuf field .google.longrunning.Operation build_operation = 1; + * @param \Google\LongRunning\Operation $var + * @return $this + */ + public function setBuildOperation($var) + { + GPBUtil::checkMessage($var, \Google\LongRunning\Operation::class); + $this->build_operation = $var; + + return $this; + } + + /** + * URI of the base builder image in Artifact Registry being used in the build. + * Used to opt into automatic base image updates. + * + * Generated from protobuf field string base_image_uri = 2; + * @return string + */ + public function getBaseImageUri() + { + return $this->base_image_uri; + } + + /** + * URI of the base builder image in Artifact Registry being used in the build. + * Used to opt into automatic base image updates. + * + * Generated from protobuf field string base_image_uri = 2; + * @param string $var + * @return $this + */ + public function setBaseImageUri($var) + { + GPBUtil::checkString($var, True); + $this->base_image_uri = $var; + + return $this; + } + + /** + * Warning message for the base image. + * + * Generated from protobuf field string base_image_warning = 3; + * @return string + */ + public function getBaseImageWarning() + { + return $this->base_image_warning; + } + + /** + * Warning message for the base image. + * + * Generated from protobuf field string base_image_warning = 3; + * @param string $var + * @return $this + */ + public function setBaseImageWarning($var) + { + GPBUtil::checkString($var, True); + $this->base_image_warning = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php new file mode 100644 index 000000000000..52828310dc64 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php @@ -0,0 +1,75 @@ +google.cloud.run.v2.TCPSocketAction + */ +class TCPSocketAction extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $port + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Optional. Port number to access on the container. Must be in the range 1 to + * 65535. If not specified, defaults to the exposed port of the container, + * which is the value of container.ports[0].containerPort. + * + * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php new file mode 100644 index 000000000000..eb006f18ad6d --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php @@ -0,0 +1,1431 @@ +google.cloud.run.v2.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique name of this Task. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server assigned unique identifier for the Task. The value is a + * UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation = 0; + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $labels; + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $annotations; + /** + * Output only. Represents time when the task was created by the system. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Represents time when the task was scheduled to run by the + * system. It is not guaranteed to be set in happens-before order across + * separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scheduled_time = null; + /** + * Output only. Represents time when the task started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Represents time when the Task was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $completion_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. The name of the parent Job. + * + * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $job = ''; + /** + * Output only. The name of the parent Execution. + * + * Generated from protobuf field string execution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $execution = ''; + /** + * Holds the single container that defines the unit of execution for this + * task. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 14; + */ + private $containers; + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 15; + */ + private $volumes; + /** + * Number of retries allowed per Task, before marking this Task failed. + * + * Generated from protobuf field int32 max_retries = 16; + */ + protected $max_retries = 0; + /** + * Max allowed time duration the Task may be active before the system will + * actively try to mark it failed and kill associated containers. This applies + * per attempt of a task, meaning each retry can run for the full timeout. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 17; + */ + protected $timeout = null; + /** + * Email address of the IAM service account associated with the Task of a + * Job. The service account represents the identity of the + * running task, and determines what permissions the task has. If + * not provided, the task will use the project's default service account. + * + * Generated from protobuf field string service_account = 18; + */ + protected $service_account = ''; + /** + * The execution environment being used to host this Task. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; + */ + protected $execution_environment = 0; + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. The Condition of this Task, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. The generation of this Task. See comments in `Job.reconciling` + * for additional information on reconciliation process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $observed_generation = 0; + /** + * Output only. Index of the Task, unique per execution, and beginning at 0. + * + * Generated from protobuf field int32 index = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index = 0; + /** + * Output only. The number of times this Task was retried. + * Tasks are retried when they fail up to the maxRetries limit. + * + * Generated from protobuf field int32 retried = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $retried = 0; + /** + * Output only. Result of the last attempt of this Task. + * + * Generated from protobuf field .google.cloud.run.v2.TaskAttemptResult last_attempt_result = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_attempt_result = null; + /** + * Output only. A reference to a customer managed encryption key (CMEK) to use + * to encrypt this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $encryption_key = ''; + /** + * Output only. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vpc_access = null; + /** + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * + * Generated from protobuf field string log_uri = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $log_uri = ''; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. The node selector for the task. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_selector = null; + /** + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * task. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 37 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gpu_zonal_redundancy_disabled = null; + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique name of this Task. + * @type string $uid + * Output only. Server assigned unique identifier for the Task. The value is a + * UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type int|string $generation + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Represents time when the task was created by the system. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * @type \Google\Protobuf\Timestamp $scheduled_time + * Output only. Represents time when the task was scheduled to run by the + * system. It is not guaranteed to be set in happens-before order across + * separate operations. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Represents time when the task started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * @type \Google\Protobuf\Timestamp $completion_time + * Output only. Represents time when the Task was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * @type string $job + * Output only. The name of the parent Job. + * @type string $execution + * Output only. The name of the parent Execution. + * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Holds the single container that defines the unit of execution for this + * task. + * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * A list of Volumes to make available to containers. + * @type int $max_retries + * Number of retries allowed per Task, before marking this Task failed. + * @type \Google\Protobuf\Duration $timeout + * Max allowed time duration the Task may be active before the system will + * actively try to mark it failed and kill associated containers. This applies + * per attempt of a task, meaning each retry can run for the full timeout. + * @type string $service_account + * Email address of the IAM service account associated with the Task of a + * Job. The service account represents the identity of the + * running task, and determines what permissions the task has. If + * not provided, the task will use the project's default service account. + * @type int $execution_environment + * The execution environment being used to host this Task. + * @type bool $reconciling + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * Output only. The Condition of this Task, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * @type int|string $observed_generation + * Output only. The generation of this Task. See comments in `Job.reconciling` + * for additional information on reconciliation process in Cloud Run. + * @type int $index + * Output only. Index of the Task, unique per execution, and beginning at 0. + * @type int $retried + * Output only. The number of times this Task was retried. + * Tasks are retried when they fail up to the maxRetries limit. + * @type \Google\Cloud\Run\V2\TaskAttemptResult $last_attempt_result + * Output only. Result of the last attempt of this Task. + * @type string $encryption_key + * Output only. A reference to a customer managed encryption key (CMEK) to use + * to encrypt this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access + * Output only. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * @type string $log_uri + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type \Google\Cloud\Run\V2\NodeSelector $node_selector + * Output only. The node selector for the task. + * @type bool $gpu_zonal_redundancy_disabled + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * task. + * @type string $etag + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique name of this Task. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique name of this Task. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server assigned unique identifier for the Task. The value is a + * UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the Task. The value is a + * UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * + * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Output only. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Output only. Unstructured key value map that may + * be set by external tools to store and arbitrary metadata. + * They are not queryable and should be preserved + * when modifying objects. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. Represents time when the task was created by the system. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Represents time when the task was created by the system. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Represents time when the task was scheduled to run by the + * system. It is not guaranteed to be set in happens-before order across + * separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledTime() + { + return $this->scheduled_time; + } + + public function hasScheduledTime() + { + return isset($this->scheduled_time); + } + + public function clearScheduledTime() + { + unset($this->scheduled_time); + } + + /** + * Output only. Represents time when the task was scheduled to run by the + * system. It is not guaranteed to be set in happens-before order across + * separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_time = $var; + + return $this; + } + + /** + * Output only. Represents time when the task started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Represents time when the task started to run. + * It is not guaranteed to be set in happens-before order across separate + * operations. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Represents time when the Task was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCompletionTime() + { + return $this->completion_time; + } + + public function hasCompletionTime() + { + return isset($this->completion_time); + } + + public function clearCompletionTime() + { + unset($this->completion_time); + } + + /** + * Output only. Represents time when the Task was completed. It is not + * guaranteed to be set in happens-before order across separate operations. + * + * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCompletionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->completion_time = $var; + + return $this; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. For a deleted resource, the deletion time. It is only + * populated as a response to a Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. It is only populated as a response to a Delete + * request. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. The name of the parent Job. + * + * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getJob() + { + return $this->job; + } + + /** + * Output only. The name of the parent Job. + * + * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkString($var, True); + $this->job = $var; + + return $this; + } + + /** + * Output only. The name of the parent Execution. + * + * Generated from protobuf field string execution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getExecution() + { + return $this->execution; + } + + /** + * Output only. The name of the parent Execution. + * + * Generated from protobuf field string execution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkString($var, True); + $this->execution = $var; + + return $this; + } + + /** + * Holds the single container that defines the unit of execution for this + * task. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Holds the single container that defines the unit of execution for this + * task. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 14; + * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); + $this->containers = $arr; + + return $this; + } + + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 15; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 15; + * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * Number of retries allowed per Task, before marking this Task failed. + * + * Generated from protobuf field int32 max_retries = 16; + * @return int + */ + public function getMaxRetries() + { + return $this->max_retries; + } + + /** + * Number of retries allowed per Task, before marking this Task failed. + * + * Generated from protobuf field int32 max_retries = 16; + * @param int $var + * @return $this + */ + public function setMaxRetries($var) + { + GPBUtil::checkInt32($var); + $this->max_retries = $var; + + return $this; + } + + /** + * Max allowed time duration the Task may be active before the system will + * actively try to mark it failed and kill associated containers. This applies + * per attempt of a task, meaning each retry can run for the full timeout. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 17; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Max allowed time duration the Task may be active before the system will + * actively try to mark it failed and kill associated containers. This applies + * per attempt of a task, meaning each retry can run for the full timeout. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 17; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Email address of the IAM service account associated with the Task of a + * Job. The service account represents the identity of the + * running task, and determines what permissions the task has. If + * not provided, the task will use the project's default service account. + * + * Generated from protobuf field string service_account = 18; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Email address of the IAM service account associated with the Task of a + * Job. The service account represents the identity of the + * running task, and determines what permissions the task has. If + * not provided, the task will use the project's default service account. + * + * Generated from protobuf field string service_account = 18; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The execution environment being used to host this Task. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; + * @return int + */ + public function getExecutionEnvironment() + { + return $this->execution_environment; + } + + /** + * The execution environment being used to host this Task. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; + * @param int $var + * @return $this + */ + public function setExecutionEnvironment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); + $this->execution_environment = $var; + + return $this; + } + + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Indicates whether the resource's reconciliation is still in + * progress. See comments in `Job.reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field bool reconciling = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. The Condition of this Task, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The Condition of this Task, containing its readiness status, + * and detailed error information in case it did not reach the desired state. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. The generation of this Task. See comments in `Job.reconciling` + * for additional information on reconciliation process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getObservedGeneration() + { + return $this->observed_generation; + } + + /** + * Output only. The generation of this Task. See comments in `Job.reconciling` + * for additional information on reconciliation process in Cloud Run. + * + * Generated from protobuf field int64 observed_generation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setObservedGeneration($var) + { + GPBUtil::checkInt64($var); + $this->observed_generation = $var; + + return $this; + } + + /** + * Output only. Index of the Task, unique per execution, and beginning at 0. + * + * Generated from protobuf field int32 index = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Output only. Index of the Task, unique per execution, and beginning at 0. + * + * Generated from protobuf field int32 index = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Output only. The number of times this Task was retried. + * Tasks are retried when they fail up to the maxRetries limit. + * + * Generated from protobuf field int32 retried = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRetried() + { + return $this->retried; + } + + /** + * Output only. The number of times this Task was retried. + * Tasks are retried when they fail up to the maxRetries limit. + * + * Generated from protobuf field int32 retried = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRetried($var) + { + GPBUtil::checkInt32($var); + $this->retried = $var; + + return $this; + } + + /** + * Output only. Result of the last attempt of this Task. + * + * Generated from protobuf field .google.cloud.run.v2.TaskAttemptResult last_attempt_result = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\TaskAttemptResult|null + */ + public function getLastAttemptResult() + { + return $this->last_attempt_result; + } + + public function hasLastAttemptResult() + { + return isset($this->last_attempt_result); + } + + public function clearLastAttemptResult() + { + unset($this->last_attempt_result); + } + + /** + * Output only. Result of the last attempt of this Task. + * + * Generated from protobuf field .google.cloud.run.v2.TaskAttemptResult last_attempt_result = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\TaskAttemptResult $var + * @return $this + */ + public function setLastAttemptResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TaskAttemptResult::class); + $this->last_attempt_result = $var; + + return $this; + } + + /** + * Output only. A reference to a customer managed encryption key (CMEK) to use + * to encrypt this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + /** + * Output only. A reference to a customer managed encryption key (CMEK) to use + * to encrypt this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->encryption_key = $var; + + return $this; + } + + /** + * Output only. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\VpcAccess|null + */ + public function getVpcAccess() + { + return $this->vpc_access; + } + + public function hasVpcAccess() + { + return isset($this->vpc_access); + } + + public function clearVpcAccess() + { + unset($this->vpc_access); + } + + /** + * Output only. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\VpcAccess $var + * @return $this + */ + public function setVpcAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); + $this->vpc_access = $var; + + return $this; + } + + /** + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * + * Generated from protobuf field string log_uri = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLogUri() + { + return $this->log_uri; + } + + /** + * Output only. URI where logs for this execution can be found in Cloud + * Console. + * + * Generated from protobuf field string log_uri = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLogUri($var) + { + GPBUtil::checkString($var, True); + $this->log_uri = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. The node selector for the task. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\NodeSelector|null + */ + public function getNodeSelector() + { + return $this->node_selector; + } + + public function hasNodeSelector() + { + return isset($this->node_selector); + } + + public function clearNodeSelector() + { + unset($this->node_selector); + } + + /** + * Output only. The node selector for the task. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\NodeSelector $var + * @return $this + */ + public function setNodeSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); + $this->node_selector = $var; + + return $this; + } + + /** + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * task. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 37 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; + } + + public function hasGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled); + } + + public function clearGpuZonalRedundancyDisabled() + { + unset($this->gpu_zonal_redundancy_disabled); + } + + /** + * Optional. Output only. True if GPU zonal redundancy is disabled on this + * task. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 37 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGpuZonalRedundancyDisabled($var) + { + GPBUtil::checkBool($var); + $this->gpu_zonal_redundancy_disabled = $var; + + return $this; + } + + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php new file mode 100644 index 000000000000..a4bb1b09e428 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php @@ -0,0 +1,173 @@ +google.cloud.run.v2.TaskAttemptResult + */ +class TaskAttemptResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The status of this attempt. + * If the status code is OK, then the attempt succeeded. + * + * Generated from protobuf field .google.rpc.Status status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Output only. The exit code of this attempt. + * This may be unset if the container was unable to exit cleanly with a code + * due to some other failure. + * See status field for possible failure details. + * At most one of exit_code or term_signal will be set. + * + * Generated from protobuf field int32 exit_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $exit_code = 0; + /** + * Output only. Termination signal of the container. This is set to non-zero + * if the container is terminated by the system. + * At most one of exit_code or term_signal will be set. + * + * Generated from protobuf field int32 term_signal = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $term_signal = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $status + * Output only. The status of this attempt. + * If the status code is OK, then the attempt succeeded. + * @type int $exit_code + * Output only. The exit code of this attempt. + * This may be unset if the container was unable to exit cleanly with a code + * due to some other failure. + * See status field for possible failure details. + * At most one of exit_code or term_signal will be set. + * @type int $term_signal + * Output only. Termination signal of the container. This is set to non-zero + * if the container is terminated by the system. + * At most one of exit_code or term_signal will be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The status of this attempt. + * If the status code is OK, then the attempt succeeded. + * + * Generated from protobuf field .google.rpc.Status status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. The status of this attempt. + * If the status code is OK, then the attempt succeeded. + * + * Generated from protobuf field .google.rpc.Status status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. The exit code of this attempt. + * This may be unset if the container was unable to exit cleanly with a code + * due to some other failure. + * See status field for possible failure details. + * At most one of exit_code or term_signal will be set. + * + * Generated from protobuf field int32 exit_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getExitCode() + { + return $this->exit_code; + } + + /** + * Output only. The exit code of this attempt. + * This may be unset if the container was unable to exit cleanly with a code + * due to some other failure. + * See status field for possible failure details. + * At most one of exit_code or term_signal will be set. + * + * Generated from protobuf field int32 exit_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setExitCode($var) + { + GPBUtil::checkInt32($var); + $this->exit_code = $var; + + return $this; + } + + /** + * Output only. Termination signal of the container. This is set to non-zero + * if the container is terminated by the system. + * At most one of exit_code or term_signal will be set. + * + * Generated from protobuf field int32 term_signal = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTermSignal() + { + return $this->term_signal; + } + + /** + * Output only. Termination signal of the container. This is set to non-zero + * if the container is terminated by the system. + * At most one of exit_code or term_signal will be set. + * + * Generated from protobuf field int32 term_signal = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTermSignal($var) + { + GPBUtil::checkInt32($var); + $this->term_signal = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php new file mode 100644 index 000000000000..a6d1b8dcd4a4 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php @@ -0,0 +1,469 @@ +google.cloud.run.v2.TaskTemplate + */ +class TaskTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Holds the single container that defines the unit of execution for this + * task. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 1; + */ + private $containers; + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $volumes; + /** + * Optional. Max allowed time duration the Task may be active before the + * system will actively try to mark it failed and kill associated containers. + * This applies per attempt of a task, meaning each retry can run for the full + * timeout. Defaults to 600 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timeout = null; + /** + * Optional. Email address of the IAM service account associated with the Task + * of a Job. The service account represents the identity of the running task, + * and determines what permissions the task has. If not provided, the task + * will use the project's default service account. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = ''; + /** + * Optional. The execution environment being used to host this Task. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $execution_environment = 0; + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 7 [(.google.api.resource_reference) = { + */ + protected $encryption_key = ''; + /** + * Optional. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vpc_access = null; + /** + * Optional. The node selector for the task template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_selector = null; + /** + * Optional. True if GPU zonal redundancy is disabled on this task template. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gpu_zonal_redundancy_disabled = null; + protected $retries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Holds the single container that defines the unit of execution for this + * task. + * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * Optional. A list of Volumes to make available to containers. + * @type int $max_retries + * Number of retries allowed per Task, before marking this Task failed. + * Defaults to 3. + * @type \Google\Protobuf\Duration $timeout + * Optional. Max allowed time duration the Task may be active before the + * system will actively try to mark it failed and kill associated containers. + * This applies per attempt of a task, meaning each retry can run for the full + * timeout. Defaults to 600 seconds. + * @type string $service_account + * Optional. Email address of the IAM service account associated with the Task + * of a Job. The service account represents the identity of the running task, + * and determines what permissions the task has. If not provided, the task + * will use the project's default service account. + * @type int $execution_environment + * Optional. The execution environment being used to host this Task. + * @type string $encryption_key + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access + * Optional. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * @type \Google\Cloud\Run\V2\NodeSelector $node_selector + * Optional. The node selector for the task template. + * @type bool $gpu_zonal_redundancy_disabled + * Optional. True if GPU zonal redundancy is disabled on this task template. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\TaskTemplate::initOnce(); + parent::__construct($data); + } + + /** + * Holds the single container that defines the unit of execution for this + * task. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Holds the single container that defines the unit of execution for this + * task. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 1; + * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); + $this->containers = $arr; + + return $this; + } + + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * Number of retries allowed per Task, before marking this Task failed. + * Defaults to 3. + * + * Generated from protobuf field int32 max_retries = 3; + * @return int + */ + public function getMaxRetries() + { + return $this->readOneof(3); + } + + public function hasMaxRetries() + { + return $this->hasOneof(3); + } + + /** + * Number of retries allowed per Task, before marking this Task failed. + * Defaults to 3. + * + * Generated from protobuf field int32 max_retries = 3; + * @param int $var + * @return $this + */ + public function setMaxRetries($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Max allowed time duration the Task may be active before the + * system will actively try to mark it failed and kill associated containers. + * This applies per attempt of a task, meaning each retry can run for the full + * timeout. Defaults to 600 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Optional. Max allowed time duration the Task may be active before the + * system will actively try to mark it failed and kill associated containers. + * This applies per attempt of a task, meaning each retry can run for the full + * timeout. Defaults to 600 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Optional. Email address of the IAM service account associated with the Task + * of a Job. The service account represents the identity of the running task, + * and determines what permissions the task has. If not provided, the task + * will use the project's default service account. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. Email address of the IAM service account associated with the Task + * of a Job. The service account represents the identity of the running task, + * and determines what permissions the task has. If not provided, the task + * will use the project's default service account. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. The execution environment being used to host this Task. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getExecutionEnvironment() + { + return $this->execution_environment; + } + + /** + * Optional. The execution environment being used to host this Task. + * + * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setExecutionEnvironment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); + $this->execution_environment = $var; + + return $this; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 7 [(.google.api.resource_reference) = { + * @return string + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 7 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->encryption_key = $var; + + return $this; + } + + /** + * Optional. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\VpcAccess|null + */ + public function getVpcAccess() + { + return $this->vpc_access; + } + + public function hasVpcAccess() + { + return isset($this->vpc_access); + } + + public function clearVpcAccess() + { + unset($this->vpc_access); + } + + /** + * Optional. VPC Access configuration to use for this Task. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\VpcAccess $var + * @return $this + */ + public function setVpcAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); + $this->vpc_access = $var; + + return $this; + } + + /** + * Optional. The node selector for the task template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\NodeSelector|null + */ + public function getNodeSelector() + { + return $this->node_selector; + } + + public function hasNodeSelector() + { + return isset($this->node_selector); + } + + public function clearNodeSelector() + { + unset($this->node_selector); + } + + /** + * Optional. The node selector for the task template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\NodeSelector $var + * @return $this + */ + public function setNodeSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); + $this->node_selector = $var; + + return $this; + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this task template. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; + } + + public function hasGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled); + } + + public function clearGpuZonalRedundancyDisabled() + { + unset($this->gpu_zonal_redundancy_disabled); + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this task template. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setGpuZonalRedundancyDisabled($var) + { + GPBUtil::checkBool($var); + $this->gpu_zonal_redundancy_disabled = $var; + + return $this; + } + + /** + * @return string + */ + public function getRetries() + { + return $this->whichOneof("retries"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php new file mode 100644 index 000000000000..b4264dd3a661 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php @@ -0,0 +1,182 @@ +google.cloud.run.v2.TrafficTarget + */ +class TrafficTarget extends \Google\Protobuf\Internal\Message +{ + /** + * The allocation type for this traffic target. + * + * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; + */ + protected $type = 0; + /** + * Revision to which to send this portion of traffic, if traffic allocation is + * by revision. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + */ + protected $revision = ''; + /** + * Specifies percent of the traffic to this Revision. + * This defaults to zero if unspecified. + * + * Generated from protobuf field int32 percent = 3; + */ + protected $percent = 0; + /** + * Indicates a string to be part of the URI to exclusively reference this + * target. + * + * Generated from protobuf field string tag = 4; + */ + protected $tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The allocation type for this traffic target. + * @type string $revision + * Revision to which to send this portion of traffic, if traffic allocation is + * by revision. + * @type int $percent + * Specifies percent of the traffic to this Revision. + * This defaults to zero if unspecified. + * @type string $tag + * Indicates a string to be part of the URI to exclusively reference this + * target. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\TrafficTarget::initOnce(); + parent::__construct($data); + } + + /** + * The allocation type for this traffic target. + * + * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The allocation type for this traffic target. + * + * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\TrafficTargetAllocationType::class); + $this->type = $var; + + return $this; + } + + /** + * Revision to which to send this portion of traffic, if traffic allocation is + * by revision. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Revision to which to send this portion of traffic, if traffic allocation is + * by revision. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Specifies percent of the traffic to this Revision. + * This defaults to zero if unspecified. + * + * Generated from protobuf field int32 percent = 3; + * @return int + */ + public function getPercent() + { + return $this->percent; + } + + /** + * Specifies percent of the traffic to this Revision. + * This defaults to zero if unspecified. + * + * Generated from protobuf field int32 percent = 3; + * @param int $var + * @return $this + */ + public function setPercent($var) + { + GPBUtil::checkInt32($var); + $this->percent = $var; + + return $this; + } + + /** + * Indicates a string to be part of the URI to exclusively reference this + * target. + * + * Generated from protobuf field string tag = 4; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * Indicates a string to be part of the URI to exclusively reference this + * target. + * + * Generated from protobuf field string tag = 4; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php new file mode 100644 index 000000000000..f8b35045a421 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php @@ -0,0 +1,61 @@ +google.cloud.run.v2.TrafficTargetAllocationType + */ +class TrafficTargetAllocationType +{ + /** + * Unspecified instance allocation type. + * + * Generated from protobuf enum TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED = 0; + */ + const TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED = 0; + /** + * Allocates instances to the Service's latest ready Revision. + * + * Generated from protobuf enum TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST = 1; + */ + const TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST = 1; + /** + * Allocates instances to a Revision by name. + * + * Generated from protobuf enum TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION = 2; + */ + const TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION = 2; + + private static $valueToName = [ + self::TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED => 'TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED', + self::TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST => 'TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST', + self::TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION => 'TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php new file mode 100644 index 000000000000..b03251c15e89 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php @@ -0,0 +1,203 @@ +google.cloud.run.v2.TrafficTargetStatus + */ +class TrafficTargetStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The allocation type for this traffic target. + * + * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; + */ + protected $type = 0; + /** + * Revision to which this traffic is sent. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + */ + protected $revision = ''; + /** + * Specifies percent of the traffic to this Revision. + * + * Generated from protobuf field int32 percent = 3; + */ + protected $percent = 0; + /** + * Indicates the string used in the URI to exclusively reference this target. + * + * Generated from protobuf field string tag = 4; + */ + protected $tag = ''; + /** + * Displays the target URI. + * + * Generated from protobuf field string uri = 5; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The allocation type for this traffic target. + * @type string $revision + * Revision to which this traffic is sent. + * @type int $percent + * Specifies percent of the traffic to this Revision. + * @type string $tag + * Indicates the string used in the URI to exclusively reference this target. + * @type string $uri + * Displays the target URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\TrafficTarget::initOnce(); + parent::__construct($data); + } + + /** + * The allocation type for this traffic target. + * + * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The allocation type for this traffic target. + * + * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\TrafficTargetAllocationType::class); + $this->type = $var; + + return $this; + } + + /** + * Revision to which this traffic is sent. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Revision to which this traffic is sent. + * + * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Specifies percent of the traffic to this Revision. + * + * Generated from protobuf field int32 percent = 3; + * @return int + */ + public function getPercent() + { + return $this->percent; + } + + /** + * Specifies percent of the traffic to this Revision. + * + * Generated from protobuf field int32 percent = 3; + * @param int $var + * @return $this + */ + public function setPercent($var) + { + GPBUtil::checkInt32($var); + $this->percent = $var; + + return $this; + } + + /** + * Indicates the string used in the URI to exclusively reference this target. + * + * Generated from protobuf field string tag = 4; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * Indicates the string used in the URI to exclusively reference this target. + * + * Generated from protobuf field string tag = 4; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + + /** + * Displays the target URI. + * + * Generated from protobuf field string uri = 5; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Displays the target URI. + * + * Generated from protobuf field string uri = 5; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php new file mode 100644 index 000000000000..69d8b8afba13 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php @@ -0,0 +1,170 @@ +google.cloud.run.v2.UpdateJobRequest + */ +class UpdateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Job to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + /** + * Optional. If set to true, and if the Job does not exist, it will create a + * new one. Caller must have both create and update permissions for this call + * if this is set to true. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param \Google\Cloud\Run\V2\Job $job Required. The Job to be updated. + * + * @return \Google\Cloud\Run\V2\UpdateJobRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Run\V2\Job $job): self + { + return (new self()) + ->setJob($job); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Run\V2\Job $job + * Required. The Job to be updated. + * @type bool $validate_only + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * @type bool $allow_missing + * Optional. If set to true, and if the Job does not exist, it will create a + * new one. Caller must have both create and update permissions for this call + * if this is set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Job to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Required. The Job to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Job::class); + $this->job = $var; + + return $this; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. If set to true, and if the Job does not exist, it will create a + * new one. Caller must have both create and update permissions for this call + * if this is set to true. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If set to true, and if the Job does not exist, it will create a + * new one. Caller must have both create and update permissions for this call + * if this is set to true. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php new file mode 100644 index 000000000000..0aa1548695fa --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php @@ -0,0 +1,229 @@ +google.cloud.run.v2.UpdateServiceRequest + */ +class UpdateServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The Service to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service = null; + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + /** + * Optional. If set to true, and if the Service does not exist, it will create + * a new one. The caller must have 'run.services.create' permissions if this + * is set to true and the Service does not exist. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param \Google\Cloud\Run\V2\Service $service Required. The Service to be updated. + * + * @return \Google\Cloud\Run\V2\UpdateServiceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Run\V2\Service $service): self + { + return (new self()) + ->setService($service); + } + + /** + * @param \Google\Cloud\Run\V2\Service $service Required. The Service to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated. + * + * @return \Google\Cloud\Run\V2\UpdateServiceRequest + * + * @experimental + */ + public static function buildFromServiceUpdateMask(\Google\Cloud\Run\V2\Service $service, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setService($service) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to be updated. + * @type \Google\Cloud\Run\V2\Service $service + * Required. The Service to be updated. + * @type bool $validate_only + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * @type bool $allow_missing + * Optional. If set to true, and if the Service does not exist, it will create + * a new one. The caller must have 'run.services.create' permissions if this + * is set to true and the Service does not exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The Service to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\Service|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Required. The Service to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\Service $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Service::class); + $this->service = $var; + + return $this; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. If set to true, and if the Service does not exist, it will create + * a new one. The caller must have 'run.services.create' permissions if this + * is set to true and the Service does not exist. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If set to true, and if the Service does not exist, it will create + * a new one. The caller must have 'run.services.create' permissions if this + * is set to true and the Service does not exist. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php new file mode 100644 index 000000000000..e617968ab3cd --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php @@ -0,0 +1,287 @@ +google.cloud.run.v2.UpdateWorkerPoolRequest + */ +class UpdateWorkerPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The WorkerPool to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $worker_pool = null; + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. If set to true, and if the WorkerPool does not exist, it will + * create a new one. The caller must have 'run.workerpools.create' permissions + * if this is set to true and the WorkerPool does not exist. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + /** + * Optional. If set to true, a new revision will be created from the template + * even if the system doesn't detect any changes from the previously deployed + * revision. + * This may be useful for cases where the underlying resources need to be + * recreated or reinitialized. For example if the image is specified by label, + * but the underlying image digest has changed) or if the container performs + * deployment initialization work that needs to be performed again. + * + * Generated from protobuf field bool force_new_revision = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force_new_revision = false; + + /** + * @param \Google\Cloud\Run\V2\WorkerPool $workerPool Required. The WorkerPool to be updated. + * + * @return \Google\Cloud\Run\V2\UpdateWorkerPoolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Run\V2\WorkerPool $workerPool): self + { + return (new self()) + ->setWorkerPool($workerPool); + } + + /** + * @param \Google\Cloud\Run\V2\WorkerPool $workerPool Required. The WorkerPool to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated. + * + * @return \Google\Cloud\Run\V2\UpdateWorkerPoolRequest + * + * @experimental + */ + public static function buildFromWorkerPoolUpdateMask(\Google\Cloud\Run\V2\WorkerPool $workerPool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setWorkerPool($workerPool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to be updated. + * @type \Google\Cloud\Run\V2\WorkerPool $worker_pool + * Required. The WorkerPool to be updated. + * @type bool $validate_only + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * @type bool $allow_missing + * Optional. If set to true, and if the WorkerPool does not exist, it will + * create a new one. The caller must have 'run.workerpools.create' permissions + * if this is set to true and the WorkerPool does not exist. + * @type bool $force_new_revision + * Optional. If set to true, a new revision will be created from the template + * even if the system doesn't detect any changes from the previously deployed + * revision. + * This may be useful for cases where the underlying resources need to be + * recreated or reinitialized. For example if the image is specified by label, + * but the underlying image digest has changed) or if the container performs + * deployment initialization work that needs to be performed again. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The WorkerPool to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\WorkerPool|null + */ + public function getWorkerPool() + { + return $this->worker_pool; + } + + public function hasWorkerPool() + { + return isset($this->worker_pool); + } + + public function clearWorkerPool() + { + unset($this->worker_pool); + } + + /** + * Required. The WorkerPool to be updated. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\WorkerPool $var + * @return $this + */ + public function setWorkerPool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPool::class); + $this->worker_pool = $var; + + return $this; + } + + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Indicates that the request should be validated and default values + * populated, without persisting the request or updating any resources. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. If set to true, and if the WorkerPool does not exist, it will + * create a new one. The caller must have 'run.workerpools.create' permissions + * if this is set to true and the WorkerPool does not exist. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If set to true, and if the WorkerPool does not exist, it will + * create a new one. The caller must have 'run.workerpools.create' permissions + * if this is set to true and the WorkerPool does not exist. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * Optional. If set to true, a new revision will be created from the template + * even if the system doesn't detect any changes from the previously deployed + * revision. + * This may be useful for cases where the underlying resources need to be + * recreated or reinitialized. For example if the image is specified by label, + * but the underlying image digest has changed) or if the container performs + * deployment initialization work that needs to be performed again. + * + * Generated from protobuf field bool force_new_revision = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForceNewRevision() + { + return $this->force_new_revision; + } + + /** + * Optional. If set to true, a new revision will be created from the template + * even if the system doesn't detect any changes from the previously deployed + * revision. + * This may be useful for cases where the underlying resources need to be + * recreated or reinitialized. For example if the image is specified by label, + * but the underlying image digest has changed) or if the container performs + * deployment initialization work that needs to be performed again. + * + * Generated from protobuf field bool force_new_revision = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForceNewRevision($var) + { + GPBUtil::checkBool($var); + $this->force_new_revision = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php new file mode 100644 index 000000000000..0bb46774d607 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php @@ -0,0 +1,188 @@ +google.cloud.run.v2.VersionToPath + */ +class VersionToPath extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The relative path of the secret in the container. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $path = ''; + /** + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest value, or an integer or a secret alias for a + * specific version. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * Integer octal mode bits to use on this file, must be a value between + * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be + * used. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * + * Generated from protobuf field int32 mode = 3; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Required. The relative path of the secret in the container. + * @type string $version + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest value, or an integer or a secret alias for a + * specific version. + * @type int $mode + * Integer octal mode bits to use on this file, must be a value between + * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be + * used. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The relative path of the secret in the container. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Required. The relative path of the secret in the container. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest value, or an integer or a secret alias for a + * specific version. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The Cloud Secret Manager secret version. + * Can be 'latest' for the latest value, or an integer or a secret alias for a + * specific version. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Integer octal mode bits to use on this file, must be a value between + * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be + * used. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * + * Generated from protobuf field int32 mode = 3; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Integer octal mode bits to use on this file, must be a value between + * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be + * used. + * Notes + * * Internally, a umask of 0222 will be applied to any non-zero value. + * * This is an integer representation of the mode bits. So, the octal + * integer value should look exactly as the chmod numeric notation with a + * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) + * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or + * 493 (base-10). + * * This might be in conflict with other options that affect the + * file mode, like fsGroup, and the result can be other mode bits set. + * + * Generated from protobuf field int32 mode = 3; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkInt32($var); + $this->mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php new file mode 100644 index 000000000000..0614cda4f015 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php @@ -0,0 +1,247 @@ +google.cloud.run.v2.Volume + */ +class Volume extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Volume's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + protected $volume_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Volume's name. + * @type \Google\Cloud\Run\V2\SecretVolumeSource $secret + * Secret represents a secret that should populate this volume. + * @type \Google\Cloud\Run\V2\CloudSqlInstance $cloud_sql_instance + * For Cloud SQL volumes, contains the specific instances that should be + * mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for + * more information on how to connect Cloud SQL and Cloud Run. + * @type \Google\Cloud\Run\V2\EmptyDirVolumeSource $empty_dir + * Ephemeral storage used as a shared volume. + * @type \Google\Cloud\Run\V2\NFSVolumeSource $nfs + * For NFS Voumes, contains the path to the nfs Volume + * @type \Google\Cloud\Run\V2\GCSVolumeSource $gcs + * Persistent storage backed by a Google Cloud Storage bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Volume's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Volume's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Secret represents a secret that should populate this volume. + * + * Generated from protobuf field .google.cloud.run.v2.SecretVolumeSource secret = 2; + * @return \Google\Cloud\Run\V2\SecretVolumeSource|null + */ + public function getSecret() + { + return $this->readOneof(2); + } + + public function hasSecret() + { + return $this->hasOneof(2); + } + + /** + * Secret represents a secret that should populate this volume. + * + * Generated from protobuf field .google.cloud.run.v2.SecretVolumeSource secret = 2; + * @param \Google\Cloud\Run\V2\SecretVolumeSource $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SecretVolumeSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * For Cloud SQL volumes, contains the specific instances that should be + * mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for + * more information on how to connect Cloud SQL and Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.CloudSqlInstance cloud_sql_instance = 3; + * @return \Google\Cloud\Run\V2\CloudSqlInstance|null + */ + public function getCloudSqlInstance() + { + return $this->readOneof(3); + } + + public function hasCloudSqlInstance() + { + return $this->hasOneof(3); + } + + /** + * For Cloud SQL volumes, contains the specific instances that should be + * mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for + * more information on how to connect Cloud SQL and Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.CloudSqlInstance cloud_sql_instance = 3; + * @param \Google\Cloud\Run\V2\CloudSqlInstance $var + * @return $this + */ + public function setCloudSqlInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\CloudSqlInstance::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Ephemeral storage used as a shared volume. + * + * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource empty_dir = 4; + * @return \Google\Cloud\Run\V2\EmptyDirVolumeSource|null + */ + public function getEmptyDir() + { + return $this->readOneof(4); + } + + public function hasEmptyDir() + { + return $this->hasOneof(4); + } + + /** + * Ephemeral storage used as a shared volume. + * + * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource empty_dir = 4; + * @param \Google\Cloud\Run\V2\EmptyDirVolumeSource $var + * @return $this + */ + public function setEmptyDir($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\EmptyDirVolumeSource::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * For NFS Voumes, contains the path to the nfs Volume + * + * Generated from protobuf field .google.cloud.run.v2.NFSVolumeSource nfs = 5; + * @return \Google\Cloud\Run\V2\NFSVolumeSource|null + */ + public function getNfs() + { + return $this->readOneof(5); + } + + public function hasNfs() + { + return $this->hasOneof(5); + } + + /** + * For NFS Voumes, contains the path to the nfs Volume + * + * Generated from protobuf field .google.cloud.run.v2.NFSVolumeSource nfs = 5; + * @param \Google\Cloud\Run\V2\NFSVolumeSource $var + * @return $this + */ + public function setNfs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NFSVolumeSource::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Persistent storage backed by a Google Cloud Storage bucket. + * + * Generated from protobuf field .google.cloud.run.v2.GCSVolumeSource gcs = 6; + * @return \Google\Cloud\Run\V2\GCSVolumeSource|null + */ + public function getGcs() + { + return $this->readOneof(6); + } + + public function hasGcs() + { + return $this->hasOneof(6); + } + + /** + * Persistent storage backed by a Google Cloud Storage bucket. + * + * Generated from protobuf field .google.cloud.run.v2.GCSVolumeSource gcs = 6; + * @param \Google\Cloud\Run\V2\GCSVolumeSource $var + * @return $this + */ + public function setGcs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\GCSVolumeSource::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getVolumeType() + { + return $this->whichOneof("volume_type"); + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php new file mode 100644 index 000000000000..20caf8cdfe86 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php @@ -0,0 +1,155 @@ +google.cloud.run.v2.VolumeMount + */ +class VolumeMount extends \Google\Protobuf\Internal\Message +{ + /** + * Required. This must match the Name of a Volume. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. Path within the container at which the volume should be mounted. + * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must + * otherwise be `/cloudsql`. All instances defined in the Volume will be + * available as `/cloudsql/[instance]`. For more information on Cloud SQL + * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run + * + * Generated from protobuf field string mount_path = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mount_path = ''; + /** + * Optional. Path within the volume from which the container's volume should + * be mounted. Defaults to "" (volume's root). + * + * Generated from protobuf field string sub_path = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sub_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. This must match the Name of a Volume. + * @type string $mount_path + * Required. Path within the container at which the volume should be mounted. + * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must + * otherwise be `/cloudsql`. All instances defined in the Volume will be + * available as `/cloudsql/[instance]`. For more information on Cloud SQL + * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run + * @type string $sub_path + * Optional. Path within the volume from which the container's volume should + * be mounted. Defaults to "" (volume's root). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); + parent::__construct($data); + } + + /** + * Required. This must match the Name of a Volume. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. This must match the Name of a Volume. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Path within the container at which the volume should be mounted. + * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must + * otherwise be `/cloudsql`. All instances defined in the Volume will be + * available as `/cloudsql/[instance]`. For more information on Cloud SQL + * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run + * + * Generated from protobuf field string mount_path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMountPath() + { + return $this->mount_path; + } + + /** + * Required. Path within the container at which the volume should be mounted. + * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must + * otherwise be `/cloudsql`. All instances defined in the Volume will be + * available as `/cloudsql/[instance]`. For more information on Cloud SQL + * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run + * + * Generated from protobuf field string mount_path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMountPath($var) + { + GPBUtil::checkString($var, True); + $this->mount_path = $var; + + return $this; + } + + /** + * Optional. Path within the volume from which the container's volume should + * be mounted. Defaults to "" (volume's root). + * + * Generated from protobuf field string sub_path = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubPath() + { + return $this->sub_path; + } + + /** + * Optional. Path within the volume from which the container's volume should + * be mounted. Defaults to "" (volume's root). + * + * Generated from protobuf field string sub_path = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubPath($var) + { + GPBUtil::checkString($var, True); + $this->sub_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php new file mode 100644 index 000000000000..2edc5d9e89bc --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php @@ -0,0 +1,160 @@ +google.cloud.run.v2.VpcAccess + */ +class VpcAccess extends \Google\Protobuf\Internal\Message +{ + /** + * VPC Access connector name. + * Format: `projects/{project}/locations/{location}/connectors/{connector}`, + * where `{project}` can be project id or number. + * For more information on sending traffic to a VPC network via a connector, + * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. + * + * Generated from protobuf field string connector = 1 [(.google.api.resource_reference) = { + */ + protected $connector = ''; + /** + * Optional. Traffic VPC egress settings. If not provided, it defaults to + * PRIVATE_RANGES_ONLY. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess.VpcEgress egress = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $egress = 0; + /** + * Optional. Direct VPC egress settings. Currently only single network + * interface is supported. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VpcAccess.NetworkInterface network_interfaces = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_interfaces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $connector + * VPC Access connector name. + * Format: `projects/{project}/locations/{location}/connectors/{connector}`, + * where `{project}` can be project id or number. + * For more information on sending traffic to a VPC network via a connector, + * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. + * @type int $egress + * Optional. Traffic VPC egress settings. If not provided, it defaults to + * PRIVATE_RANGES_ONLY. + * @type array<\Google\Cloud\Run\V2\VpcAccess\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * Optional. Direct VPC egress settings. Currently only single network + * interface is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * VPC Access connector name. + * Format: `projects/{project}/locations/{location}/connectors/{connector}`, + * where `{project}` can be project id or number. + * For more information on sending traffic to a VPC network via a connector, + * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. + * + * Generated from protobuf field string connector = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getConnector() + { + return $this->connector; + } + + /** + * VPC Access connector name. + * Format: `projects/{project}/locations/{location}/connectors/{connector}`, + * where `{project}` can be project id or number. + * For more information on sending traffic to a VPC network via a connector, + * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. + * + * Generated from protobuf field string connector = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConnector($var) + { + GPBUtil::checkString($var, True); + $this->connector = $var; + + return $this; + } + + /** + * Optional. Traffic VPC egress settings. If not provided, it defaults to + * PRIVATE_RANGES_ONLY. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess.VpcEgress egress = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEgress() + { + return $this->egress; + } + + /** + * Optional. Traffic VPC egress settings. If not provided, it defaults to + * PRIVATE_RANGES_ONLY. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess.VpcEgress egress = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEgress($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\VpcAccess\VpcEgress::class); + $this->egress = $var; + + return $this; + } + + /** + * Optional. Direct VPC egress settings. Currently only single network + * interface is supported. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VpcAccess.NetworkInterface network_interfaces = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * Optional. Direct VPC egress settings. Currently only single network + * interface is supported. + * + * Generated from protobuf field repeated .google.cloud.run.v2.VpcAccess.NetworkInterface network_interfaces = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Run\V2\VpcAccess\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\VpcAccess\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php new file mode 100644 index 000000000000..41428271a60d --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php @@ -0,0 +1,170 @@ +google.cloud.run.v2.VpcAccess.NetworkInterface + */ +class NetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The VPC network that the Cloud Run resource will be able to + * send traffic to. At least one of network or subnetwork must be specified. + * If both network and subnetwork are specified, the given VPC subnetwork + * must belong to the given VPC network. If network is not specified, it + * will be looked up from the subnetwork. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. The VPC subnetwork that the Cloud Run resource will get IPs + * from. At least one of network or subnetwork must be specified. If both + * network and subnetwork are specified, the given VPC subnetwork must + * belong to the given VPC network. If subnetwork is not specified, the + * subnetwork with the same name with the network will be used. + * + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnetwork = ''; + /** + * Optional. Network tags applied to this Cloud Run resource. + * + * Generated from protobuf field repeated string tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. The VPC network that the Cloud Run resource will be able to + * send traffic to. At least one of network or subnetwork must be specified. + * If both network and subnetwork are specified, the given VPC subnetwork + * must belong to the given VPC network. If network is not specified, it + * will be looked up from the subnetwork. + * @type string $subnetwork + * Optional. The VPC subnetwork that the Cloud Run resource will get IPs + * from. At least one of network or subnetwork must be specified. If both + * network and subnetwork are specified, the given VPC subnetwork must + * belong to the given VPC network. If subnetwork is not specified, the + * subnetwork with the same name with the network will be used. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. Network tags applied to this Cloud Run resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The VPC network that the Cloud Run resource will be able to + * send traffic to. At least one of network or subnetwork must be specified. + * If both network and subnetwork are specified, the given VPC subnetwork + * must belong to the given VPC network. If network is not specified, it + * will be looked up from the subnetwork. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. The VPC network that the Cloud Run resource will be able to + * send traffic to. At least one of network or subnetwork must be specified. + * If both network and subnetwork are specified, the given VPC subnetwork + * must belong to the given VPC network. If network is not specified, it + * will be looked up from the subnetwork. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. The VPC subnetwork that the Cloud Run resource will get IPs + * from. At least one of network or subnetwork must be specified. If both + * network and subnetwork are specified, the given VPC subnetwork must + * belong to the given VPC network. If subnetwork is not specified, the + * subnetwork with the same name with the network will be used. + * + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * Optional. The VPC subnetwork that the Cloud Run resource will get IPs + * from. At least one of network or subnetwork must be specified. If both + * network and subnetwork are specified, the given VPC subnetwork must + * belong to the given VPC network. If subnetwork is not specified, the + * subnetwork with the same name with the network will be used. + * + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * Optional. Network tags applied to this Cloud Run resource. + * + * Generated from protobuf field repeated string tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Network tags applied to this Cloud Run resource. + * + * Generated from protobuf field repeated string tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkInterface::class, \Google\Cloud\Run\V2\VpcAccess_NetworkInterface::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php new file mode 100644 index 000000000000..b6178c267b92 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php @@ -0,0 +1,64 @@ +google.cloud.run.v2.VpcAccess.VpcEgress + */ +class VpcEgress +{ + /** + * Unspecified + * + * Generated from protobuf enum VPC_EGRESS_UNSPECIFIED = 0; + */ + const VPC_EGRESS_UNSPECIFIED = 0; + /** + * All outbound traffic is routed through the VPC connector. + * + * Generated from protobuf enum ALL_TRAFFIC = 1; + */ + const ALL_TRAFFIC = 1; + /** + * Only private IP ranges are routed through the VPC connector. + * + * Generated from protobuf enum PRIVATE_RANGES_ONLY = 2; + */ + const PRIVATE_RANGES_ONLY = 2; + + private static $valueToName = [ + self::VPC_EGRESS_UNSPECIFIED => 'VPC_EGRESS_UNSPECIFIED', + self::ALL_TRAFFIC => 'ALL_TRAFFIC', + self::PRIVATE_RANGES_ONLY => 'PRIVATE_RANGES_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VpcEgress::class, \Google\Cloud\Run\V2\VpcAccess_VpcEgress::class); + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php new file mode 100644 index 000000000000..f76dea2197e1 --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php @@ -0,0 +1,1441 @@ +google.cloud.run.v2.WorkerPool + */ +class WorkerPool extends \Google\Protobuf\Internal\Message +{ + /** + * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, + * this field is ignored, and instead composed from + * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_id}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * User-provided description of the WorkerPool. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generation = 0; + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPool. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 WorkerPool. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * + * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modifier = ''; + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 13; + */ + protected $client = ''; + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 14; + */ + protected $client_version = ''; + /** + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $launch_stage = 0; + /** + * Optional. Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $binary_authorization = null; + /** + * Required. The template used to create revisions for this WorkerPool. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPoolRevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $template = null; + /** + * Optional. Specifies how to distribute instances over a collection of + * Revisions belonging to the WorkerPool. If instance split is empty or not + * provided, defaults to 100% instances assigned to the latest `Ready` + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplit instance_splits = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $instance_splits; + /** + * Optional. Specifies worker-pool-level scaling settings + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPoolScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scaling = null; + /** + * Output only. The generation of this WorkerPool currently serving workloads. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $observed_generation = 0; + /** + * Output only. The Condition of this WorkerPool, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $terminal_condition = null; + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the WorkerPool does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. Name of the latest revision that is serving workloads. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $latest_ready_revision = ''; + /** + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $latest_created_revision = ''; + /** + * Output only. Detailed status information for corresponding instance splits. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplitStatus instance_split_statuses = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $instance_split_statuses; + /** + * Output only. Indicates whether Cloud Run Threat Detection monitoring is + * enabled for the parent project of this worker pool. + * + * Generated from protobuf field bool threat_detection_enabled = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $threat_detection_enabled = false; + /** + * Not supported, and ignored by Cloud Run. + * + * Generated from protobuf field repeated string custom_audiences = 37; + */ + private $custom_audiences; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. Returns true if the WorkerPool is currently being acted upon + * by the system to bring it into the desired state. + * When a new WorkerPool is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the WorkerPool to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation`, + * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have + * transient values that might mismatch the intended state: Once + * reconciliation is over (and this field is false), there are two possible + * outcomes: reconciliation succeeded and the serving state matches the + * WorkerPool, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `instance_splits` and `instance_split_statuses`, `observed_generation` and + * `generation`, `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `instance_split_statuses`, `observed_generation`, + * and `latest_ready_revision` will have the state of the last serving + * revision, or empty for newly created WorkerPools. Additional information on + * the failure can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, + * this field is ignored, and instead composed from + * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_id}` + * @type string $description + * User-provided description of the WorkerPool. This field currently has a + * 512-character limit. + * @type string $uid + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type int|string $generation + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPool. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 WorkerPool. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * @type string $creator + * Output only. Email address of the authenticated creator. + * @type string $last_modifier + * Output only. Email address of the last authenticated modifier. + * @type string $client + * Arbitrary identifier for the API client. + * @type string $client_version + * Arbitrary version identifier for the API client. + * @type int $launch_stage + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * @type \Google\Cloud\Run\V2\BinaryAuthorization $binary_authorization + * Optional. Settings for the Binary Authorization feature. + * @type \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate $template + * Required. The template used to create revisions for this WorkerPool. + * @type array<\Google\Cloud\Run\V2\InstanceSplit>|\Google\Protobuf\Internal\RepeatedField $instance_splits + * Optional. Specifies how to distribute instances over a collection of + * Revisions belonging to the WorkerPool. If instance split is empty or not + * provided, defaults to 100% instances assigned to the latest `Ready` + * Revision. + * @type \Google\Cloud\Run\V2\WorkerPoolScaling $scaling + * Optional. Specifies worker-pool-level scaling settings + * @type int|string $observed_generation + * Output only. The generation of this WorkerPool currently serving workloads. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * @type \Google\Cloud\Run\V2\Condition $terminal_condition + * Output only. The Condition of this WorkerPool, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the WorkerPool does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * @type string $latest_ready_revision + * Output only. Name of the latest revision that is serving workloads. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * @type string $latest_created_revision + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * @type array<\Google\Cloud\Run\V2\InstanceSplitStatus>|\Google\Protobuf\Internal\RepeatedField $instance_split_statuses + * Output only. Detailed status information for corresponding instance splits. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * @type bool $threat_detection_enabled + * Output only. Indicates whether Cloud Run Threat Detection monitoring is + * enabled for the parent project of this worker pool. + * @type array|\Google\Protobuf\Internal\RepeatedField $custom_audiences + * Not supported, and ignored by Cloud Run. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type bool $reconciling + * Output only. Returns true if the WorkerPool is currently being acted upon + * by the system to bring it into the desired state. + * When a new WorkerPool is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the WorkerPool to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation`, + * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have + * transient values that might mismatch the intended state: Once + * reconciliation is over (and this field is false), there are two possible + * outcomes: reconciliation succeeded and the serving state matches the + * WorkerPool, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `instance_splits` and `instance_split_statuses`, `observed_generation` and + * `generation`, `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `instance_split_statuses`, `observed_generation`, + * and `latest_ready_revision` will have the state of the last serving + * revision, or empty for newly created WorkerPools. Additional information on + * the failure can be found in `terminal_condition` and `conditions`. + * @type string $etag + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); + parent::__construct($data); + } + + /** + * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, + * this field is ignored, and instead composed from + * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_id}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, + * this field is ignored, and instead composed from + * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. + * Format: + * `projects/{project}/locations/{location}/workerPools/{worker_id}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * User-provided description of the WorkerPool. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the WorkerPool. This field currently has a + * 512-character limit. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the trigger. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Output only. A number that monotonically increases every time the user + * modifies the desired state. + * Please note that unlike v1, this is an int64 value. As with most Google + * APIs, its JSON representation will be a `string` instead of an `integer`. + * + * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPool. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPool. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 WorkerPool. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * + * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected in new resources. All system + * annotations in v1 now have a corresponding field in v2 WorkerPool. + *

This field follows Kubernetes + * annotations' namespacing, limits, and rules. + * + * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The deletion time. It is only populated as a response to a + * Delete request. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. For a deleted resource, the time after which it will be + * permamently deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of the authenticated creator. + * + * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastModifier() + { + return $this->last_modifier; + } + + /** + * Output only. Email address of the last authenticated modifier. + * + * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastModifier($var) + { + GPBUtil::checkString($var, True); + $this->last_modifier = $var; + + return $this; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 13; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Arbitrary identifier for the API client. + * + * Generated from protobuf field string client = 13; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 14; + * @return string + */ + public function getClientVersion() + { + return $this->client_version; + } + + /** + * Arbitrary version identifier for the API client. + * + * Generated from protobuf field string client_version = 14; + * @param string $var + * @return $this + */ + public function setClientVersion($var) + { + GPBUtil::checkString($var, True); + $this->client_version = $var; + + return $this; + } + + /** + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * Optional. The launch stage as defined by [Google Cloud Platform + * Launch Stages](https://cloud.google.com/terms/launch-stages). + * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA + * is assumed. + * Set the launch stage to a preview stage on input to allow use of preview + * features in that stage. On read (or output), describes whether the + * resource uses preview features. + * For example, if ALPHA is provided as input, but only BETA and GA-level + * features are used, this field will be BETA on output. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + + /** + * Optional. Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\BinaryAuthorization|null + */ + public function getBinaryAuthorization() + { + return $this->binary_authorization; + } + + public function hasBinaryAuthorization() + { + return isset($this->binary_authorization); + } + + public function clearBinaryAuthorization() + { + unset($this->binary_authorization); + } + + /** + * Optional. Settings for the Binary Authorization feature. + * + * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\BinaryAuthorization $var + * @return $this + */ + public function setBinaryAuthorization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BinaryAuthorization::class); + $this->binary_authorization = $var; + + return $this; + } + + /** + * Required. The template used to create revisions for this WorkerPool. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPoolRevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate|null + */ + public function getTemplate() + { + return $this->template; + } + + public function hasTemplate() + { + return isset($this->template); + } + + public function clearTemplate() + { + unset($this->template); + } + + /** + * Required. The template used to create revisions for this WorkerPool. + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPoolRevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate $var + * @return $this + */ + public function setTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate::class); + $this->template = $var; + + return $this; + } + + /** + * Optional. Specifies how to distribute instances over a collection of + * Revisions belonging to the WorkerPool. If instance split is empty or not + * provided, defaults to 100% instances assigned to the latest `Ready` + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplit instance_splits = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceSplits() + { + return $this->instance_splits; + } + + /** + * Optional. Specifies how to distribute instances over a collection of + * Revisions belonging to the WorkerPool. If instance split is empty or not + * provided, defaults to 100% instances assigned to the latest `Ready` + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplit instance_splits = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Run\V2\InstanceSplit>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceSplits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\InstanceSplit::class); + $this->instance_splits = $arr; + + return $this; + } + + /** + * Optional. Specifies worker-pool-level scaling settings + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPoolScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\WorkerPoolScaling|null + */ + public function getScaling() + { + return $this->scaling; + } + + public function hasScaling() + { + return isset($this->scaling); + } + + public function clearScaling() + { + unset($this->scaling); + } + + /** + * Optional. Specifies worker-pool-level scaling settings + * + * Generated from protobuf field .google.cloud.run.v2.WorkerPoolScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\WorkerPoolScaling $var + * @return $this + */ + public function setScaling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPoolScaling::class); + $this->scaling = $var; + + return $this; + } + + /** + * Output only. The generation of this WorkerPool currently serving workloads. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getObservedGeneration() + { + return $this->observed_generation; + } + + /** + * Output only. The generation of this WorkerPool currently serving workloads. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. Please note that unlike v1, this is an int64 value. + * As with most Google APIs, its JSON representation will be a `string` + * instead of an `integer`. + * + * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setObservedGeneration($var) + { + GPBUtil::checkInt64($var); + $this->observed_generation = $var; + + return $this; + } + + /** + * Output only. The Condition of this WorkerPool, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Run\V2\Condition|null + */ + public function getTerminalCondition() + { + return $this->terminal_condition; + } + + public function hasTerminalCondition() + { + return isset($this->terminal_condition); + } + + public function clearTerminalCondition() + { + unset($this->terminal_condition); + } + + /** + * Output only. The Condition of this WorkerPool, containing its readiness + * status, and detailed error information in case it did not reach a serving + * state. See comments in `reconciling` for additional information on + * reconciliation process in Cloud Run. + * + * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Run\V2\Condition $var + * @return $this + */ + public function setTerminalCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Condition::class); + $this->terminal_condition = $var; + + return $this; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the WorkerPool does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The Conditions of all other associated sub-resources. They + * contain additional diagnostics information in case the WorkerPool does not + * reach its Serving state. See comments in `reconciling` for additional + * information on reconciliation process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. Name of the latest revision that is serving workloads. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getLatestReadyRevision() + { + return $this->latest_ready_revision; + } + + /** + * Output only. Name of the latest revision that is serving workloads. See + * comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestReadyRevision($var) + { + GPBUtil::checkString($var, True); + $this->latest_ready_revision = $var; + + return $this; + } + + /** + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getLatestCreatedRevision() + { + return $this->latest_created_revision; + } + + /** + * Output only. Name of the last created revision. See comments in + * `reconciling` for additional information on reconciliation process in Cloud + * Run. + * + * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLatestCreatedRevision($var) + { + GPBUtil::checkString($var, True); + $this->latest_created_revision = $var; + + return $this; + } + + /** + * Output only. Detailed status information for corresponding instance splits. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplitStatus instance_split_statuses = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceSplitStatuses() + { + return $this->instance_split_statuses; + } + + /** + * Output only. Detailed status information for corresponding instance splits. + * See comments in `reconciling` for additional information on reconciliation + * process in Cloud Run. + * + * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplitStatus instance_split_statuses = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Run\V2\InstanceSplitStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceSplitStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\InstanceSplitStatus::class); + $this->instance_split_statuses = $arr; + + return $this; + } + + /** + * Output only. Indicates whether Cloud Run Threat Detection monitoring is + * enabled for the parent project of this worker pool. + * + * Generated from protobuf field bool threat_detection_enabled = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getThreatDetectionEnabled() + { + return $this->threat_detection_enabled; + } + + /** + * Output only. Indicates whether Cloud Run Threat Detection monitoring is + * enabled for the parent project of this worker pool. + * + * Generated from protobuf field bool threat_detection_enabled = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setThreatDetectionEnabled($var) + { + GPBUtil::checkBool($var); + $this->threat_detection_enabled = $var; + + return $this; + } + + /** + * Not supported, and ignored by Cloud Run. + * + * Generated from protobuf field repeated string custom_audiences = 37; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomAudiences() + { + return $this->custom_audiences; + } + + /** + * Not supported, and ignored by Cloud Run. + * + * Generated from protobuf field repeated string custom_audiences = 37; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomAudiences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->custom_audiences = $arr; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. Returns true if the WorkerPool is currently being acted upon + * by the system to bring it into the desired state. + * When a new WorkerPool is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the WorkerPool to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation`, + * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have + * transient values that might mismatch the intended state: Once + * reconciliation is over (and this field is false), there are two possible + * outcomes: reconciliation succeeded and the serving state matches the + * WorkerPool, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `instance_splits` and `instance_split_statuses`, `observed_generation` and + * `generation`, `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `instance_split_statuses`, `observed_generation`, + * and `latest_ready_revision` will have the state of the last serving + * revision, or empty for newly created WorkerPools. Additional information on + * the failure can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Returns true if the WorkerPool is currently being acted upon + * by the system to bring it into the desired state. + * When a new WorkerPool is created, or an existing one is updated, Cloud Run + * will asynchronously perform all necessary steps to bring the WorkerPool to + * the desired serving state. This process is called reconciliation. While + * reconciliation is in process, `observed_generation`, + * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have + * transient values that might mismatch the intended state: Once + * reconciliation is over (and this field is false), there are two possible + * outcomes: reconciliation succeeded and the serving state matches the + * WorkerPool, or there was an error, and reconciliation failed. This state + * can be found in `terminal_condition.state`. + * If reconciliation succeeded, the following fields will match: + * `instance_splits` and `instance_split_statuses`, `observed_generation` and + * `generation`, `latest_ready_revision` and `latest_created_revision`. + * If reconciliation failed, `instance_split_statuses`, `observed_generation`, + * and `latest_ready_revision` will have the state of the last serving + * revision, or empty for newly created WorkerPools. Additional information on + * the failure can be found in `terminal_condition` and `conditions`. + * + * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. A system-generated fingerprint for this version of the + * resource. May be used to detect modification conflict during updates. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php new file mode 100644 index 000000000000..e53a2a28f7ed --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php @@ -0,0 +1,634 @@ +google.cloud.run.v2.WorkerPoolRevisionTemplate + */ +class WorkerPoolRevisionTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the WorkerPool name. + * + * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $revision = ''; + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPoolRevisionTemplate. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 WorkerPoolRevisionTemplate. + * This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vpc_access = null; + /** + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = ''; + /** + * Holds list of the containers that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 6; + */ + private $containers; + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $volumes; + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 8 [(.google.api.resource_reference) = { + */ + protected $encryption_key = ''; + /** + * Optional. Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_mesh = null; + /** + * Optional. The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_key_revocation_action = 0; + /** + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_key_shutdown_duration = null; + /** + * Optional. The node selector for the revision template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_selector = null; + /** + * Optional. True if GPU zonal redundancy is disabled on this worker pool. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gpu_zonal_redundancy_disabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $revision + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the WorkerPool name. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPoolRevisionTemplate. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 WorkerPoolRevisionTemplate. + * This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * @type string $service_account + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Holds list of the containers that defines the unit of execution for this + * Revision. + * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * Optional. A list of Volumes to make available to containers. + * @type string $encryption_key + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * @type \Google\Cloud\Run\V2\ServiceMesh $service_mesh + * Optional. Enables service mesh connectivity. + * @type int $encryption_key_revocation_action + * Optional. The action to take if the encryption key is revoked. + * @type \Google\Protobuf\Duration $encryption_key_shutdown_duration + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * @type \Google\Cloud\Run\V2\NodeSelector $node_selector + * Optional. The node selector for the revision template. + * @type bool $gpu_zonal_redundancy_disabled + * Optional. True if GPU zonal redundancy is disabled on this worker pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\WorkerPoolRevisionTemplate::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the WorkerPool name. + * + * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Optional. The unique name for the revision. If this field is omitted, it + * will be automatically generated based on the WorkerPool name. + * + * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPoolRevisionTemplate. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Unstructured key value map that can be used to organize and + * categorize objects. User-provided labels are shared with Google's billing + * system, so they can be used to filter, or break down billing charges by + * team, component, environment, state, etc. For more information, visit + * https://cloud.google.com/resource-manager/docs/creating-managing-labels or + * https://cloud.google.com/run/docs/configuring/labels. + * Cloud Run API v2 does not support labels with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system labels in v1 now have a + * corresponding field in v2 WorkerPoolRevisionTemplate. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 WorkerPoolRevisionTemplate. + * This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Unstructured key value map that may be set by external tools to + * store and arbitrary metadata. They are not queryable and should be + * preserved when modifying objects. + * Cloud Run API v2 does not support annotations with `run.googleapis.com`, + * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + * namespaces, and they will be rejected. All system annotations in v1 now + * have a corresponding field in v2 WorkerPoolRevisionTemplate. + * This field follows Kubernetes annotations' namespacing, limits, and + * rules. + * + * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\VpcAccess|null + */ + public function getVpcAccess() + { + return $this->vpc_access; + } + + public function hasVpcAccess() + { + return isset($this->vpc_access); + } + + public function clearVpcAccess() + { + unset($this->vpc_access); + } + + /** + * Optional. VPC Access configuration to use for this Revision. For more + * information, visit + * https://cloud.google.com/run/docs/configuring/connecting-vpc. + * + * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\VpcAccess $var + * @return $this + */ + public function setVpcAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); + $this->vpc_access = $var; + + return $this; + } + + /** + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. Email address of the IAM service account associated with the + * revision of the service. The service account represents the identity of the + * running revision, and determines what permissions the revision has. If not + * provided, the revision will use the project's default service account. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Holds list of the containers that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Holds list of the containers that defines the unit of execution for this + * Revision. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 6; + * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); + $this->containers = $arr; + + return $this; + } + + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Optional. A list of Volumes to make available to containers. + * + * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 8 [(.google.api.resource_reference) = { + * @return string + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + /** + * A reference to a customer managed encryption key (CMEK) to use to encrypt + * this container image. For more information, go to + * https://cloud.google.com/run/docs/securing/using-cmek + * + * Generated from protobuf field string encryption_key = 8 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->encryption_key = $var; + + return $this; + } + + /** + * Optional. Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\ServiceMesh|null + */ + public function getServiceMesh() + { + return $this->service_mesh; + } + + public function hasServiceMesh() + { + return isset($this->service_mesh); + } + + public function clearServiceMesh() + { + unset($this->service_mesh); + } + + /** + * Optional. Enables service mesh connectivity. + * + * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\ServiceMesh $var + * @return $this + */ + public function setServiceMesh($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceMesh::class); + $this->service_mesh = $var; + + return $this; + } + + /** + * Optional. The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEncryptionKeyRevocationAction() + { + return $this->encryption_key_revocation_action; + } + + /** + * Optional. The action to take if the encryption key is revoked. + * + * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEncryptionKeyRevocationAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class); + $this->encryption_key_revocation_action = $var; + + return $this; + } + + /** + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getEncryptionKeyShutdownDuration() + { + return $this->encryption_key_shutdown_duration; + } + + public function hasEncryptionKeyShutdownDuration() + { + return isset($this->encryption_key_shutdown_duration); + } + + public function clearEncryptionKeyShutdownDuration() + { + unset($this->encryption_key_shutdown_duration); + } + + /** + * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration + * before shutting down all instances. The minimum increment is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEncryptionKeyShutdownDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->encryption_key_shutdown_duration = $var; + + return $this; + } + + /** + * Optional. The node selector for the revision template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Run\V2\NodeSelector|null + */ + public function getNodeSelector() + { + return $this->node_selector; + } + + public function hasNodeSelector() + { + return isset($this->node_selector); + } + + public function clearNodeSelector() + { + unset($this->node_selector); + } + + /** + * Optional. The node selector for the revision template. + * + * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Run\V2\NodeSelector $var + * @return $this + */ + public function setNodeSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); + $this->node_selector = $var; + + return $this; + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this worker pool. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; + } + + public function hasGpuZonalRedundancyDisabled() + { + return isset($this->gpu_zonal_redundancy_disabled); + } + + public function clearGpuZonalRedundancyDisabled() + { + unset($this->gpu_zonal_redundancy_disabled); + } + + /** + * Optional. True if GPU zonal redundancy is disabled on this worker pool. + * + * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setGpuZonalRedundancyDisabled($var) + { + GPBUtil::checkBool($var); + $this->gpu_zonal_redundancy_disabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php new file mode 100644 index 000000000000..ad43f4c7e6ff --- /dev/null +++ b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php @@ -0,0 +1,77 @@ +google.cloud.run.v2.WorkerPoolScaling + */ +class WorkerPoolScaling extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The total number of instances in manual scaling mode. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $manual_instance_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $manual_instance_count + * Optional. The total number of instances in manual scaling mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The total number of instances in manual scaling mode. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getManualInstanceCount() + { + return isset($this->manual_instance_count) ? $this->manual_instance_count : 0; + } + + public function hasManualInstanceCount() + { + return isset($this->manual_instance_count); + } + + public function clearManualInstanceCount() + { + unset($this->manual_instance_count); + } + + /** + * Optional. The total number of instances in manual scaling mode. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setManualInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->manual_instance_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php b/owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php new file mode 100644 index 000000000000..3a56a96a8749 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php @@ -0,0 +1,94 @@ +setBucket($storageSourceBucket) + ->setObject($storageSourceObject); + $request = (new SubmitBuildRequest()) + ->setParent($parent) + ->setStorageSource($storageSource) + ->setImageUri($imageUri); + + // Call the API and handle any network failures. + try { + /** @var SubmitBuildResponse $response */ + $response = $buildsClient->submitBuild($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $storageSourceBucket = '[BUCKET]'; + $storageSourceObject = '[OBJECT]'; + $imageUri = '[IMAGE_URI]'; + + submit_build_sample($parent, $storageSourceBucket, $storageSourceObject, $imageUri); +} +// [END run_v2_generated_Builds_SubmitBuild_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php new file mode 100644 index 000000000000..67971a2d2ecd --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $executionsClient->cancelExecution($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Execution $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExecutionsClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + + cancel_execution_sample($formattedName); +} +// [END run_v2_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php new file mode 100644 index 000000000000..a6a40e306333 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $executionsClient->deleteExecution($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Execution $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExecutionsClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + + delete_execution_sample($formattedName); +} +// [END run_v2_generated_Executions_DeleteExecution_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php new file mode 100644 index 000000000000..943e831f9a6d --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Execution $response */ + $response = $executionsClient->getExecution($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExecutionsClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + + get_execution_sample($formattedName); +} +// [END run_v2_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php new file mode 100644 index 000000000000..3bdab87e34f6 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $executionsClient->listExecutions($request); + + /** @var Execution $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ExecutionsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + list_executions_sample($formattedParent); +} +// [END run_v2_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/create_instance.php b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/create_instance.php new file mode 100644 index 000000000000..9188fc3bd08f --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/create_instance.php @@ -0,0 +1,101 @@ +setImage($instanceContainersImage); + $instanceContainers = [$container,]; + $instance = (new Instance()) + ->setContainers($instanceContainers); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstance($instance) + ->setInstanceId($instanceId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $instancesClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = InstancesClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceContainersImage = '[IMAGE]'; + $instanceId = '[INSTANCE_ID]'; + + create_instance_sample($formattedParent, $instanceContainersImage, $instanceId); +} +// [END run_v2_generated_Instances_CreateInstance_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/delete_instance.php b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/delete_instance.php new file mode 100644 index 000000000000..376ce1a65561 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/delete_instance.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $instancesClient->deleteInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InstancesClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END run_v2_generated_Instances_DeleteInstance_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/get_instance.php b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/get_instance.php new file mode 100644 index 000000000000..569d14efcebb --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/get_instance.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $instancesClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InstancesClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END run_v2_generated_Instances_GetInstance_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/list_instances.php b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/list_instances.php new file mode 100644 index 000000000000..3d2036221e27 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/list_instances.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $instancesClient->listInstances($request); + + /** @var Instance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = InstancesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END run_v2_generated_Instances_ListInstances_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/start_instance.php b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/start_instance.php new file mode 100644 index 000000000000..f154fc7940ac --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/start_instance.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $instancesClient->startInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InstancesClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + start_instance_sample($formattedName); +} +// [END run_v2_generated_Instances_StartInstance_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/stop_instance.php b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/stop_instance.php new file mode 100644 index 000000000000..93081da7711c --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/InstancesClient/stop_instance.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $instancesClient->stopInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = InstancesClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + stop_instance_sample($formattedName); +} +// [END run_v2_generated_Instances_StopInstance_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php new file mode 100644 index 000000000000..d9bd6fd17c06 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php @@ -0,0 +1,97 @@ +setTemplate($jobTemplateTemplate); + $job = (new Job()) + ->setTemplate($jobTemplate); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job) + ->setJobId($jobId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobsClient->createJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Job $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = JobsClient::locationName('[PROJECT]', '[LOCATION]'); + $jobId = '[JOB_ID]'; + + create_job_sample($formattedParent, $jobId); +} +// [END run_v2_generated_Jobs_CreateJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php new file mode 100644 index 000000000000..49cbe7164bd6 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobsClient->deleteJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Job $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = JobsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + delete_job_sample($formattedName); +} +// [END run_v2_generated_Jobs_DeleteJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php new file mode 100644 index 000000000000..caad9297c9d3 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $jobsClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END run_v2_generated_Jobs_GetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php new file mode 100644 index 000000000000..5e6f2004c3f7 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobsClient->getJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = JobsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + get_job_sample($formattedName); +} +// [END run_v2_generated_Jobs_GetJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php new file mode 100644 index 000000000000..dc0cf25efa98 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $jobsClient->listJobs($request); + + /** @var Job $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = JobsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_jobs_sample($formattedParent); +} +// [END run_v2_generated_Jobs_ListJobs_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php new file mode 100644 index 000000000000..52785b7b44aa --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobsClient->runJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Execution $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = JobsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + run_job_sample($formattedName); +} +// [END run_v2_generated_Jobs_RunJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php new file mode 100644 index 000000000000..55f6036ee6fd --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php @@ -0,0 +1,74 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $jobsClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END run_v2_generated_Jobs_SetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php new file mode 100644 index 000000000000..ce4e7bcb22ca --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $jobsClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END run_v2_generated_Jobs_TestIamPermissions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php new file mode 100644 index 000000000000..3f2a8978c693 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php @@ -0,0 +1,77 @@ +setTemplate($jobTemplateTemplate); + $job = (new Job()) + ->setTemplate($jobTemplate); + $request = (new UpdateJobRequest()) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobsClient->updateJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Job $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END run_v2_generated_Jobs_UpdateJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php new file mode 100644 index 000000000000..0eb4555285f5 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $revisionsClient->deleteRevision($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Revision $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RevisionsClient::revisionName( + '[PROJECT]', + '[LOCATION]', + '[SERVICE]', + '[REVISION]' + ); + + delete_revision_sample($formattedName); +} +// [END run_v2_generated_Revisions_DeleteRevision_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php new file mode 100644 index 000000000000..a3878b574ca5 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Revision $response */ + $response = $revisionsClient->getRevision($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RevisionsClient::revisionName( + '[PROJECT]', + '[LOCATION]', + '[SERVICE]', + '[REVISION]' + ); + + get_revision_sample($formattedName); +} +// [END run_v2_generated_Revisions_GetRevision_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php new file mode 100644 index 000000000000..8f0d90935284 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $revisionsClient->listRevisions($request); + + /** @var Revision $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = RevisionsClient::serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + + list_revisions_sample($formattedParent); +} +// [END run_v2_generated_Revisions_ListRevisions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php new file mode 100644 index 000000000000..d0cfec9e4270 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php @@ -0,0 +1,95 @@ +setTemplate($serviceTemplate); + $request = (new CreateServiceRequest()) + ->setParent($formattedParent) + ->setService($service) + ->setServiceId($serviceId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $servicesClient->createService($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Service $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $serviceId = '[SERVICE_ID]'; + + create_service_sample($formattedParent, $serviceId); +} +// [END run_v2_generated_Services_CreateService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php new file mode 100644 index 000000000000..7fc76f1f1ea4 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $servicesClient->deleteService($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Service $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServicesClient::serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + + delete_service_sample($formattedName); +} +// [END run_v2_generated_Services_DeleteService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php new file mode 100644 index 000000000000..7acf62b73868 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $servicesClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END run_v2_generated_Services_GetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php new file mode 100644 index 000000000000..c5144ab68613 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Service $response */ + $response = $servicesClient->getService($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServicesClient::serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + + get_service_sample($formattedName); +} +// [END run_v2_generated_Services_GetService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php new file mode 100644 index 000000000000..91b20ade2c81 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $servicesClient->listServices($request); + + /** @var Service $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_services_sample($formattedParent); +} +// [END run_v2_generated_Services_ListServices_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php new file mode 100644 index 000000000000..87240f31d7e0 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php @@ -0,0 +1,74 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $servicesClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END run_v2_generated_Services_SetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php new file mode 100644 index 000000000000..a175ff6c7354 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $servicesClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END run_v2_generated_Services_TestIamPermissions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php new file mode 100644 index 000000000000..159dc763a8e5 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php @@ -0,0 +1,74 @@ +setTemplate($serviceTemplate); + $request = (new UpdateServiceRequest()) + ->setService($service); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $servicesClient->updateService($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Service $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END run_v2_generated_Services_UpdateService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php b/owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php new file mode 100644 index 000000000000..069ab2fa985a --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $tasksClient->getTask($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TasksClient::taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); + + get_task_sample($formattedName); +} +// [END run_v2_generated_Tasks_GetTask_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php b/owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php new file mode 100644 index 000000000000..14ed847b2661 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $tasksClient->listTasks($request); + + /** @var Task $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TasksClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + + list_tasks_sample($formattedParent); +} +// [END run_v2_generated_Tasks_ListTasks_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php new file mode 100644 index 000000000000..d2f23abbd34e --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php @@ -0,0 +1,97 @@ +setTemplate($workerPoolTemplate); + $request = (new CreateWorkerPoolRequest()) + ->setParent($formattedParent) + ->setWorkerPool($workerPool) + ->setWorkerPoolId($workerPoolId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workerPoolsClient->createWorkerPool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var WorkerPool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WorkerPoolsClient::locationName('[PROJECT]', '[LOCATION]'); + $workerPoolId = '[WORKER_POOL_ID]'; + + create_worker_pool_sample($formattedParent, $workerPoolId); +} +// [END run_v2_generated_WorkerPools_CreateWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php new file mode 100644 index 000000000000..72ee8914ca5e --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workerPoolsClient->deleteWorkerPool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var WorkerPool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WorkerPoolsClient::workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); + + delete_worker_pool_sample($formattedName); +} +// [END run_v2_generated_WorkerPools_DeleteWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php new file mode 100644 index 000000000000..9651fb15b340 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $workerPoolsClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END run_v2_generated_WorkerPools_GetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php new file mode 100644 index 000000000000..f2656ef4af55 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var WorkerPool $response */ + $response = $workerPoolsClient->getWorkerPool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WorkerPoolsClient::workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); + + get_worker_pool_sample($formattedName); +} +// [END run_v2_generated_WorkerPools_GetWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php new file mode 100644 index 000000000000..d5c7f141cca0 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $workerPoolsClient->listWorkerPools($request); + + /** @var WorkerPool $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WorkerPoolsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_worker_pools_sample($formattedParent); +} +// [END run_v2_generated_WorkerPools_ListWorkerPools_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php new file mode 100644 index 000000000000..2f6daa1ad122 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php @@ -0,0 +1,74 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $workerPoolsClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END run_v2_generated_WorkerPools_SetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php new file mode 100644 index 000000000000..209ea6f45ac6 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $workerPoolsClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END run_v2_generated_WorkerPools_TestIamPermissions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php new file mode 100644 index 000000000000..9b56fe6c0ad2 --- /dev/null +++ b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php @@ -0,0 +1,74 @@ +setTemplate($workerPoolTemplate); + $request = (new UpdateWorkerPoolRequest()) + ->setWorkerPool($workerPool); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workerPoolsClient->updateWorkerPool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var WorkerPool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END run_v2_generated_WorkerPools_UpdateWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php new file mode 100644 index 000000000000..e32b64c37ee5 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php @@ -0,0 +1,255 @@ + submitBuildAsync(SubmitBuildRequest $request, array $optionalArgs = []) + */ +final class BuildsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.Builds'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/builds_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/builds_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/builds_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/builds_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * build_worker_pool resource. + * + * @param string $project + * @param string $location + * @param string $workerPool + * + * @return string The formatted build_worker_pool resource. + */ + public static function buildWorkerPoolName(string $project, string $location, string $workerPool): string + { + return self::getPathTemplate('buildWorkerPool')->render([ + 'project' => $project, + 'location' => $location, + 'worker_pool' => $workerPool, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - buildWorkerPool: projects/{project}/locations/{location}/workerPools/{worker_pool} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\BuildsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new BuildsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Submits a build in a given project. + * + * The async variant is {@see BuildsClient::submitBuildAsync()} . + * + * @example samples/V2/BuildsClient/submit_build.php + * + * @param SubmitBuildRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SubmitBuildResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function submitBuild(SubmitBuildRequest $request, array $callOptions = []): SubmitBuildResponse + { + return $this->startApiCall('SubmitBuild', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php new file mode 100644 index 000000000000..ce2e385d7ae1 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php @@ -0,0 +1,417 @@ + cancelExecutionAsync(CancelExecutionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExecutionAsync(DeleteExecutionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExecutionAsync(GetExecutionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExecutionsAsync(ListExecutionsRequest $request, array $optionalArgs = []) + */ +final class ExecutionsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.Executions'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/executions_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/executions_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/executions_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/executions_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a execution + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $execution + * + * @return string The formatted execution resource. + */ + public static function executionName(string $project, string $location, string $job, string $execution): string + { + return self::getPathTemplate('execution')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'execution' => $execution, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName(string $project, string $location, string $job): string + { + return self::getPathTemplate('job')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - execution: projects/{project}/locations/{location}/jobs/{job}/executions/{execution} + * - job: projects/{project}/locations/{location}/jobs/{job} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\ExecutionsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ExecutionsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Cancels an Execution. + * + * The async variant is {@see ExecutionsClient::cancelExecutionAsync()} . + * + * @example samples/V2/ExecutionsClient/cancel_execution.php + * + * @param CancelExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelExecution(CancelExecutionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CancelExecution', $request, $callOptions)->wait(); + } + + /** + * Deletes an Execution. + * + * The async variant is {@see ExecutionsClient::deleteExecutionAsync()} . + * + * @example samples/V2/ExecutionsClient/delete_execution.php + * + * @param DeleteExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteExecution(DeleteExecutionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteExecution', $request, $callOptions)->wait(); + } + + /** + * Gets information about an Execution. + * + * The async variant is {@see ExecutionsClient::getExecutionAsync()} . + * + * @example samples/V2/ExecutionsClient/get_execution.php + * + * @param GetExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Execution + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExecution(GetExecutionRequest $request, array $callOptions = []): Execution + { + return $this->startApiCall('GetExecution', $request, $callOptions)->wait(); + } + + /** + * Lists Executions from a Job. Results are sorted by creation time, + * descending. + * + * The async variant is {@see ExecutionsClient::listExecutionsAsync()} . + * + * @example samples/V2/ExecutionsClient/list_executions.php + * + * @param ListExecutionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listExecutions(ListExecutionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExecutions', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/InstancesClient.php b/owl-bot-staging/Run/v2/src/V2/Client/InstancesClient.php new file mode 100644 index 000000000000..e40256ad3c21 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/InstancesClient.php @@ -0,0 +1,596 @@ + createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) + */ +final class InstancesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.Instances'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/instances_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/instances_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/instances_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/instances_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a connector + * resource. + * + * @param string $project + * @param string $location + * @param string $connector + * + * @return string The formatted connector resource. + */ + public static function connectorName(string $project, string $location, string $connector): string + { + return self::getPathTemplate('connector')->render([ + 'project' => $project, + 'location' => $location, + 'connector' => $connector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * location_policy resource. + * + * @param string $location + * + * @return string The formatted location_policy resource. + */ + public static function locationPolicyName(string $location): string + { + return self::getPathTemplate('locationPolicy')->render([ + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy + * resource. + * + * @param string $project + * + * @return string The formatted policy resource. + */ + public static function policyName(string $project): string + { + return self::getPathTemplate('policy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_policy resource. + * + * @param string $project + * + * @return string The formatted project_policy resource. + */ + public static function projectPolicyName(string $project): string + { + return self::getPathTemplate('projectPolicy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a secret + * resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted secret resource. + */ + public static function secretName(string $project, string $secret): string + { + return self::getPathTemplate('secret')->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connector: projects/{project}/locations/{location}/connectors/{connector} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - location: projects/{project}/locations/{location} + * - locationPolicy: locations/{location}/policy + * - policy: projects/{project}/policy + * - projectPolicy: projects/{project}/policy + * - secret: projects/{project}/secrets/{secret} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\InstancesClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new InstancesClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an Instance. + * + * The async variant is {@see InstancesClient::createInstanceAsync()} . + * + * @example samples/V2/InstancesClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes a Instance + * + * The async variant is {@see InstancesClient::deleteInstanceAsync()} . + * + * @example samples/V2/InstancesClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Gets a Instance + * + * The async variant is {@see InstancesClient::getInstanceAsync()} . + * + * @example samples/V2/InstancesClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Lists Instances. Results are sorted by creation time, descending. + * + * The async variant is {@see InstancesClient::listInstancesAsync()} . + * + * @example samples/V2/InstancesClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Starts an Instance. + * + * The async variant is {@see InstancesClient::startInstanceAsync()} . + * + * @example samples/V2/InstancesClient/start_instance.php + * + * @param StartInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startInstance(StartInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartInstance', $request, $callOptions)->wait(); + } + + /** + * Stops an Instance. + * + * The async variant is {@see InstancesClient::stopInstanceAsync()} . + * + * @example samples/V2/InstancesClient/stop_instance.php + * + * @param StopInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopInstance(StopInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopInstance', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php new file mode 100644 index 000000000000..c5b18a3a074e --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php @@ -0,0 +1,709 @@ + createJobAsync(CreateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface runJobAsync(RunJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateJobAsync(UpdateJobRequest $request, array $optionalArgs = []) + */ +final class JobsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.Jobs'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/jobs_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/jobs_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/jobs_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/jobs_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a connector + * resource. + * + * @param string $project + * @param string $location + * @param string $connector + * + * @return string The formatted connector resource. + */ + public static function connectorName(string $project, string $location, string $connector): string + { + return self::getPathTemplate('connector')->render([ + 'project' => $project, + 'location' => $location, + 'connector' => $connector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a execution + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $execution + * + * @return string The formatted execution resource. + */ + public static function executionName(string $project, string $location, string $job, string $execution): string + { + return self::getPathTemplate('execution')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'execution' => $execution, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName(string $project, string $location, string $job): string + { + return self::getPathTemplate('job')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * location_policy resource. + * + * @param string $location + * + * @return string The formatted location_policy resource. + */ + public static function locationPolicyName(string $location): string + { + return self::getPathTemplate('locationPolicy')->render([ + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy + * resource. + * + * @param string $project + * + * @return string The formatted policy resource. + */ + public static function policyName(string $project): string + { + return self::getPathTemplate('policy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_policy resource. + * + * @param string $project + * + * @return string The formatted project_policy resource. + */ + public static function projectPolicyName(string $project): string + { + return self::getPathTemplate('projectPolicy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a secret + * resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted secret resource. + */ + public static function secretName(string $project, string $secret): string + { + return self::getPathTemplate('secret')->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connector: projects/{project}/locations/{location}/connectors/{connector} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - execution: projects/{project}/locations/{location}/jobs/{job}/executions/{execution} + * - job: projects/{project}/locations/{location}/jobs/{job} + * - location: projects/{project}/locations/{location} + * - locationPolicy: locations/{location}/policy + * - policy: projects/{project}/policy + * - projectPolicy: projects/{project}/policy + * - secret: projects/{project}/secrets/{secret} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\JobsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new JobsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a Job. + * + * The async variant is {@see JobsClient::createJobAsync()} . + * + * @example samples/V2/JobsClient/create_job.php + * + * @param CreateJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createJob(CreateJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); + } + + /** + * Deletes a Job. + * + * The async variant is {@see JobsClient::deleteJobAsync()} . + * + * @example samples/V2/JobsClient/delete_job.php + * + * @param DeleteJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteJob(DeleteJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM Access Control policy currently in effect for the given Job. + * This result does not include any inherited policies. + * + * The async variant is {@see JobsClient::getIamPolicyAsync()} . + * + * @example samples/V2/JobsClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets information about a Job. + * + * The async variant is {@see JobsClient::getJobAsync()} . + * + * @example samples/V2/JobsClient/get_job.php + * + * @param GetJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function getJob(GetJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('GetJob', $request, $callOptions)->wait(); + } + + /** + * Lists Jobs. Results are sorted by creation time, descending. + * + * The async variant is {@see JobsClient::listJobsAsync()} . + * + * @example samples/V2/JobsClient/list_jobs.php + * + * @param ListJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListJobs', $request, $callOptions); + } + + /** + * Triggers creation of a new Execution of this Job. + * + * The async variant is {@see JobsClient::runJobAsync()} . + * + * @example samples/V2/JobsClient/run_job.php + * + * @param RunJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runJob(RunJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunJob', $request, $callOptions)->wait(); + } + + /** + * Sets the IAM Access control policy for the specified Job. Overwrites + * any existing policy. + * + * The async variant is {@see JobsClient::setIamPolicyAsync()} . + * + * @example samples/V2/JobsClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified Project. + * + * There are no permissions required for making this API call. + * + * The async variant is {@see JobsClient::testIamPermissionsAsync()} . + * + * @example samples/V2/JobsClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates a Job. + * + * The async variant is {@see JobsClient::updateJobAsync()} . + * + * @example samples/V2/JobsClient/update_job.php + * + * @param UpdateJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateJob(UpdateJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateJob', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php new file mode 100644 index 000000000000..1a6b36dff92c --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php @@ -0,0 +1,389 @@ + deleteRevisionAsync(DeleteRevisionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRevisionAsync(GetRevisionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRevisionsAsync(ListRevisionsRequest $request, array $optionalArgs = []) + */ +final class RevisionsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.Revisions'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/revisions_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/revisions_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/revisions_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/revisions_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a revision + * resource. + * + * @param string $project + * @param string $location + * @param string $service + * @param string $revision + * + * @return string The formatted revision resource. + */ + public static function revisionName(string $project, string $location, string $service, string $revision): string + { + return self::getPathTemplate('revision')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + 'revision' => $revision, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $location + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $location, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - revision: projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * - service: projects/{project}/locations/{location}/services/{service} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\RevisionsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new RevisionsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Deletes a Revision. + * + * The async variant is {@see RevisionsClient::deleteRevisionAsync()} . + * + * @example samples/V2/RevisionsClient/delete_revision.php + * + * @param DeleteRevisionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteRevision(DeleteRevisionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteRevision', $request, $callOptions)->wait(); + } + + /** + * Gets information about a Revision. + * + * The async variant is {@see RevisionsClient::getRevisionAsync()} . + * + * @example samples/V2/RevisionsClient/get_revision.php + * + * @param GetRevisionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Revision + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRevision(GetRevisionRequest $request, array $callOptions = []): Revision + { + return $this->startApiCall('GetRevision', $request, $callOptions)->wait(); + } + + /** + * Lists Revisions from a given Service, or from a given location. Results + * are sorted by creation time, descending. + * + * The async variant is {@see RevisionsClient::listRevisionsAsync()} . + * + * @example samples/V2/RevisionsClient/list_revisions.php + * + * @param ListRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRevisions(ListRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRevisions', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php b/owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php new file mode 100644 index 000000000000..90725720735b --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php @@ -0,0 +1,742 @@ + createServiceAsync(CreateServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteServiceAsync(DeleteServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getServiceAsync(GetServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateServiceAsync(UpdateServiceRequest $request, array $optionalArgs = []) + */ +final class ServicesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.Services'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/services_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/services_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/services_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/services_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a build + * resource. + * + * @param string $project + * @param string $location + * @param string $build + * + * @return string The formatted build resource. + */ + public static function buildName(string $project, string $location, string $build): string + { + return self::getPathTemplate('build')->render([ + 'project' => $project, + 'location' => $location, + 'build' => $build, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * build_worker_pool resource. + * + * @param string $project + * @param string $location + * @param string $workerPool + * + * @return string The formatted build_worker_pool resource. + */ + public static function buildWorkerPoolName(string $project, string $location, string $workerPool): string + { + return self::getPathTemplate('buildWorkerPool')->render([ + 'project' => $project, + 'location' => $location, + 'worker_pool' => $workerPool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a connector + * resource. + * + * @param string $project + * @param string $location + * @param string $connector + * + * @return string The formatted connector resource. + */ + public static function connectorName(string $project, string $location, string $connector): string + { + return self::getPathTemplate('connector')->render([ + 'project' => $project, + 'location' => $location, + 'connector' => $connector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * location_policy resource. + * + * @param string $location + * + * @return string The formatted location_policy resource. + */ + public static function locationPolicyName(string $location): string + { + return self::getPathTemplate('locationPolicy')->render([ + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a mesh + * resource. + * + * @param string $project + * @param string $location + * @param string $mesh + * + * @return string The formatted mesh resource. + */ + public static function meshName(string $project, string $location, string $mesh): string + { + return self::getPathTemplate('mesh')->render([ + 'project' => $project, + 'location' => $location, + 'mesh' => $mesh, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy + * resource. + * + * @param string $project + * + * @return string The formatted policy resource. + */ + public static function policyName(string $project): string + { + return self::getPathTemplate('policy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_policy resource. + * + * @param string $project + * + * @return string The formatted project_policy resource. + */ + public static function projectPolicyName(string $project): string + { + return self::getPathTemplate('projectPolicy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a revision + * resource. + * + * @param string $project + * @param string $location + * @param string $service + * @param string $revision + * + * @return string The formatted revision resource. + */ + public static function revisionName(string $project, string $location, string $service, string $revision): string + { + return self::getPathTemplate('revision')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + 'revision' => $revision, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a secret + * resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted secret resource. + */ + public static function secretName(string $project, string $secret): string + { + return self::getPathTemplate('secret')->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $location + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $location, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - build: projects/{project}/locations/{location}/builds/{build} + * - buildWorkerPool: projects/{project}/locations/{location}/workerPools/{worker_pool} + * - connector: projects/{project}/locations/{location}/connectors/{connector} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - location: projects/{project}/locations/{location} + * - locationPolicy: locations/{location}/policy + * - mesh: projects/{project}/locations/{location}/meshes/{mesh} + * - policy: projects/{project}/policy + * - projectPolicy: projects/{project}/policy + * - revision: projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * - secret: projects/{project}/secrets/{secret} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * - service: projects/{project}/locations/{location}/services/{service} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\ServicesClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ServicesClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new Service in a given project and location. + * + * The async variant is {@see ServicesClient::createServiceAsync()} . + * + * @example samples/V2/ServicesClient/create_service.php + * + * @param CreateServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createService(CreateServiceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateService', $request, $callOptions)->wait(); + } + + /** + * Deletes a Service. + * This will cause the Service to stop serving traffic and will delete all + * revisions. + * + * The async variant is {@see ServicesClient::deleteServiceAsync()} . + * + * @example samples/V2/ServicesClient/delete_service.php + * + * @param DeleteServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteService(DeleteServiceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteService', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM Access Control policy currently in effect for the given + * Cloud Run Service. This result does not include any inherited policies. + * + * The async variant is {@see ServicesClient::getIamPolicyAsync()} . + * + * @example samples/V2/ServicesClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets information about a Service. + * + * The async variant is {@see ServicesClient::getServiceAsync()} . + * + * @example samples/V2/ServicesClient/get_service.php + * + * @param GetServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Service + * + * @throws ApiException Thrown if the API call fails. + */ + public function getService(GetServiceRequest $request, array $callOptions = []): Service + { + return $this->startApiCall('GetService', $request, $callOptions)->wait(); + } + + /** + * Lists Services. Results are sorted by creation time, descending. + * + * The async variant is {@see ServicesClient::listServicesAsync()} . + * + * @example samples/V2/ServicesClient/list_services.php + * + * @param ListServicesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listServices(ListServicesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListServices', $request, $callOptions); + } + + /** + * Sets the IAM Access control policy for the specified Service. Overwrites + * any existing policy. + * + * The async variant is {@see ServicesClient::setIamPolicyAsync()} . + * + * @example samples/V2/ServicesClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified Project. + * + * There are no permissions required for making this API call. + * + * The async variant is {@see ServicesClient::testIamPermissionsAsync()} . + * + * @example samples/V2/ServicesClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates a Service. + * + * The async variant is {@see ServicesClient::updateServiceAsync()} . + * + * @example samples/V2/ServicesClient/update_service.php + * + * @param UpdateServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateService(UpdateServiceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateService', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php b/owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php new file mode 100644 index 000000000000..f57b57c3dabb --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php @@ -0,0 +1,310 @@ + getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) + */ +final class TasksClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.Tasks'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/tasks_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/tasks_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/tasks_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/tasks_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a execution + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $execution + * + * @return string The formatted execution resource. + */ + public static function executionName(string $project, string $location, string $job, string $execution): string + { + return self::getPathTemplate('execution')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'execution' => $execution, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $execution + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName(string $project, string $location, string $job, string $execution, string $task): string + { + return self::getPathTemplate('task')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'execution' => $execution, + 'task' => $task, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - execution: projects/{project}/locations/{location}/jobs/{job}/executions/{execution} + * - task: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\TasksClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new TasksClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Gets information about a Task. + * + * The async variant is {@see TasksClient::getTaskAsync()} . + * + * @example samples/V2/TasksClient/get_task.php + * + * @param GetTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTask(GetTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('GetTask', $request, $callOptions)->wait(); + } + + /** + * Lists Tasks from an Execution of a Job. + * + * The async variant is {@see TasksClient::listTasksAsync()} . + * + * @example samples/V2/TasksClient/list_tasks.php + * + * @param ListTasksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTasks', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php new file mode 100644 index 000000000000..afd5c3342f22 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php @@ -0,0 +1,700 @@ + createWorkerPoolAsync(CreateWorkerPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteWorkerPoolAsync(DeleteWorkerPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getWorkerPoolAsync(GetWorkerPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface listWorkerPoolsAsync(ListWorkerPoolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateWorkerPoolAsync(UpdateWorkerPoolRequest $request, array $optionalArgs = []) + */ +final class WorkerPoolsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.run.v2.WorkerPools'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'run.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/worker_pools_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/worker_pools_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/worker_pools_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/worker_pools_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a connector + * resource. + * + * @param string $project + * @param string $location + * @param string $connector + * + * @return string The formatted connector resource. + */ + public static function connectorName(string $project, string $location, string $connector): string + { + return self::getPathTemplate('connector')->render([ + 'project' => $project, + 'location' => $location, + 'connector' => $connector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * location_policy resource. + * + * @param string $location + * + * @return string The formatted location_policy resource. + */ + public static function locationPolicyName(string $location): string + { + return self::getPathTemplate('locationPolicy')->render([ + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a mesh + * resource. + * + * @param string $project + * @param string $location + * @param string $mesh + * + * @return string The formatted mesh resource. + */ + public static function meshName(string $project, string $location, string $mesh): string + { + return self::getPathTemplate('mesh')->render([ + 'project' => $project, + 'location' => $location, + 'mesh' => $mesh, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy + * resource. + * + * @param string $project + * + * @return string The formatted policy resource. + */ + public static function policyName(string $project): string + { + return self::getPathTemplate('policy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_policy resource. + * + * @param string $project + * + * @return string The formatted project_policy resource. + */ + public static function projectPolicyName(string $project): string + { + return self::getPathTemplate('projectPolicy')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a revision + * resource. + * + * @param string $project + * @param string $location + * @param string $service + * @param string $revision + * + * @return string The formatted revision resource. + */ + public static function revisionName(string $project, string $location, string $service, string $revision): string + { + return self::getPathTemplate('revision')->render([ + 'project' => $project, + 'location' => $location, + 'service' => $service, + 'revision' => $revision, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a secret + * resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted secret resource. + */ + public static function secretName(string $project, string $secret): string + { + return self::getPathTemplate('secret')->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a worker_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $workerPool + * + * @return string The formatted worker_pool resource. + */ + public static function workerPoolName(string $project, string $location, string $workerPool): string + { + return self::getPathTemplate('workerPool')->render([ + 'project' => $project, + 'location' => $location, + 'worker_pool' => $workerPool, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connector: projects/{project}/locations/{location}/connectors/{connector} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - location: projects/{project}/locations/{location} + * - locationPolicy: locations/{location}/policy + * - mesh: projects/{project}/locations/{location}/meshes/{mesh} + * - policy: projects/{project}/policy + * - projectPolicy: projects/{project}/policy + * - revision: projects/{project}/locations/{location}/services/{service}/revisions/{revision} + * - secret: projects/{project}/secrets/{secret} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * - workerPool: projects/{project}/locations/{location}/workerPools/{worker_pool} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'run.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Run\V2\WorkerPoolsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new WorkerPoolsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new WorkerPool in a given project and location. + * + * The async variant is {@see WorkerPoolsClient::createWorkerPoolAsync()} . + * + * @example samples/V2/WorkerPoolsClient/create_worker_pool.php + * + * @param CreateWorkerPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createWorkerPool(CreateWorkerPoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateWorkerPool', $request, $callOptions)->wait(); + } + + /** + * Deletes a WorkerPool. + * + * The async variant is {@see WorkerPoolsClient::deleteWorkerPoolAsync()} . + * + * @example samples/V2/WorkerPoolsClient/delete_worker_pool.php + * + * @param DeleteWorkerPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteWorkerPool(DeleteWorkerPoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteWorkerPool', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM Access Control policy currently in effect for the given + * Cloud Run WorkerPool. This result does not include any inherited policies. + * + * The async variant is {@see WorkerPoolsClient::getIamPolicyAsync()} . + * + * @example samples/V2/WorkerPoolsClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets information about a WorkerPool. + * + * The async variant is {@see WorkerPoolsClient::getWorkerPoolAsync()} . + * + * @example samples/V2/WorkerPoolsClient/get_worker_pool.php + * + * @param GetWorkerPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return WorkerPool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getWorkerPool(GetWorkerPoolRequest $request, array $callOptions = []): WorkerPool + { + return $this->startApiCall('GetWorkerPool', $request, $callOptions)->wait(); + } + + /** + * Lists WorkerPools. Results are sorted by creation time, descending. + * + * The async variant is {@see WorkerPoolsClient::listWorkerPoolsAsync()} . + * + * @example samples/V2/WorkerPoolsClient/list_worker_pools.php + * + * @param ListWorkerPoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listWorkerPools(ListWorkerPoolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListWorkerPools', $request, $callOptions); + } + + /** + * Sets the IAM Access control policy for the specified WorkerPool. Overwrites + * any existing policy. + * + * The async variant is {@see WorkerPoolsClient::setIamPolicyAsync()} . + * + * @example samples/V2/WorkerPoolsClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified Project. + * + * There are no permissions required for making this API call. + * + * The async variant is {@see WorkerPoolsClient::testIamPermissionsAsync()} . + * + * @example samples/V2/WorkerPoolsClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates a WorkerPool. + * + * The async variant is {@see WorkerPoolsClient::updateWorkerPoolAsync()} . + * + * @example samples/V2/WorkerPoolsClient/update_worker_pool.php + * + * @param UpdateWorkerPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateWorkerPool(UpdateWorkerPoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateWorkerPool', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Run/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..68d37bcf5427 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/gapic_metadata.json @@ -0,0 +1,286 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.run.v2", + "libraryPackage": "Google\\Cloud\\Run\\V2", + "services": { + "Builds": { + "clients": { + "grpc": { + "libraryClient": "BuildsGapicClient", + "rpcs": { + "SubmitBuild": { + "methods": [ + "submitBuild" + ] + } + } + } + } + }, + "Executions": { + "clients": { + "grpc": { + "libraryClient": "ExecutionsGapicClient", + "rpcs": { + "CancelExecution": { + "methods": [ + "cancelExecution" + ] + }, + "DeleteExecution": { + "methods": [ + "deleteExecution" + ] + }, + "GetExecution": { + "methods": [ + "getExecution" + ] + }, + "ListExecutions": { + "methods": [ + "listExecutions" + ] + } + } + } + } + }, + "Instances": { + "clients": { + "grpc": { + "libraryClient": "InstancesGapicClient", + "rpcs": { + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "StartInstance": { + "methods": [ + "startInstance" + ] + }, + "StopInstance": { + "methods": [ + "stopInstance" + ] + } + } + } + } + }, + "Jobs": { + "clients": { + "grpc": { + "libraryClient": "JobsGapicClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "ListJobs": { + "methods": [ + "listJobs" + ] + }, + "RunJob": { + "methods": [ + "runJob" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateJob": { + "methods": [ + "updateJob" + ] + } + } + } + } + }, + "Revisions": { + "clients": { + "grpc": { + "libraryClient": "RevisionsGapicClient", + "rpcs": { + "DeleteRevision": { + "methods": [ + "deleteRevision" + ] + }, + "GetRevision": { + "methods": [ + "getRevision" + ] + }, + "ListRevisions": { + "methods": [ + "listRevisions" + ] + } + } + } + } + }, + "Services": { + "clients": { + "grpc": { + "libraryClient": "ServicesGapicClient", + "rpcs": { + "CreateService": { + "methods": [ + "createService" + ] + }, + "DeleteService": { + "methods": [ + "deleteService" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetService": { + "methods": [ + "getService" + ] + }, + "ListServices": { + "methods": [ + "listServices" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateService": { + "methods": [ + "updateService" + ] + } + } + } + } + }, + "Tasks": { + "clients": { + "grpc": { + "libraryClient": "TasksGapicClient", + "rpcs": { + "GetTask": { + "methods": [ + "getTask" + ] + }, + "ListTasks": { + "methods": [ + "listTasks" + ] + } + } + } + } + }, + "WorkerPools": { + "clients": { + "grpc": { + "libraryClient": "WorkerPoolsGapicClient", + "rpcs": { + "CreateWorkerPool": { + "methods": [ + "createWorkerPool" + ] + }, + "DeleteWorkerPool": { + "methods": [ + "deleteWorkerPool" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetWorkerPool": { + "methods": [ + "getWorkerPool" + ] + }, + "ListWorkerPools": { + "methods": [ + "listWorkerPools" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateWorkerPool": { + "methods": [ + "updateWorkerPool" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json new file mode 100644 index 000000000000..b09e6e721847 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json @@ -0,0 +1,27 @@ +{ + "interfaces": { + "google.cloud.run.v2.Builds": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "SubmitBuild": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php new file mode 100644 index 000000000000..ae74d1adac52 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php @@ -0,0 +1,43 @@ + [ + 'google.cloud.run.v2.Builds' => [ + 'SubmitBuild' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\SubmitBuildResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'buildWorkerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php new file mode 100644 index 000000000000..9fc42fbf0285 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php @@ -0,0 +1,88 @@ + [ + 'google.cloud.run.v2.Builds' => [ + 'SubmitBuild' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/builds:submit', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json new file mode 100644 index 000000000000..2ca1a996052f --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.cloud.run.v2.Executions": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CancelExecution": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteExecution": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetExecution": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListExecutions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php new file mode 100644 index 000000000000..1258cfd84152 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php @@ -0,0 +1,102 @@ + [ + 'google.cloud.run.v2.Executions' => [ + 'CancelExecution' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Execution', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Execution', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExecution' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Execution', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Execution', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetExecution' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\Execution', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListExecutions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExecutions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Run\V2\ListExecutionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'execution' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}', + 'job' => 'projects/{project}/locations/{location}/jobs/{job}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php new file mode 100644 index 000000000000..66147cb56cb6 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php @@ -0,0 +1,121 @@ + [ + 'google.cloud.run.v2.Executions' => [ + 'CancelExecution' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExecution' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetExecution' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListExecutions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/jobs/*}/executions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/instances_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/instances_client_config.json new file mode 100644 index 000000000000..823b3772d1b4 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/instances_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.run.v2.Instances": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CreateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "StartInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "StopInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/instances_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/instances_descriptor_config.php new file mode 100644 index 000000000000..5c84f8676c5d --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/instances_descriptor_config.php @@ -0,0 +1,151 @@ + [ + 'google.cloud.run.v2.Instances' => [ + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Instance', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Instance', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'StartInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Instance', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Instance', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\Instance', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Run\V2\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'templateMap' => [ + 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'location' => 'projects/{project}/locations/{location}', + 'locationPolicy' => 'locations/{location}/policy', + 'policy' => 'projects/{project}/policy', + 'projectPolicy' => 'projects/{project}/policy', + 'secret' => 'projects/{project}/secrets/{secret}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/instances_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/instances_rest_client_config.php new file mode 100644 index 000000000000..e8de7e1101b3 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/instances_rest_client_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.run.v2.Instances' => [ + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json new file mode 100644 index 000000000000..c5f5321be6c1 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json @@ -0,0 +1,67 @@ +{ + "interfaces": { + "google.cloud.run.v2.Jobs": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CreateJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RunJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php new file mode 100644 index 000000000000..fd3107ba7991 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php @@ -0,0 +1,191 @@ + [ + 'google.cloud.run.v2.Jobs' => [ + 'CreateJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Job', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Job', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'DeleteJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Job', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Job', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'RunJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Execution', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Execution', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'UpdateJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Job', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Job', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getJob', + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\Job', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'ListJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Run\V2\ListJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'templateMap' => [ + 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'execution' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}', + 'job' => 'projects/{project}/locations/{location}/jobs/{job}', + 'location' => 'projects/{project}/locations/{location}', + 'locationPolicy' => 'locations/{location}/policy', + 'policy' => 'projects/{project}/policy', + 'projectPolicy' => 'projects/{project}/policy', + 'secret' => 'projects/{project}/secrets/{secret}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php new file mode 100644 index 000000000000..ec614b248227 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php @@ -0,0 +1,184 @@ + [ + 'google.cloud.run.v2.Jobs' => [ + 'CreateJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/jobs', + 'body' => 'job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'job_id', + ], + ], + 'DeleteJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/jobs/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/jobs/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/jobs/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateJob' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{job.name=projects/*/locations/*/jobs/*}', + 'body' => 'job', + 'placeholders' => [ + 'job.name' => [ + 'getters' => [ + 'getJob', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json new file mode 100644 index 000000000000..ba39cada8bc5 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.run.v2.Revisions": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "DeleteRevision": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetRevision": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php new file mode 100644 index 000000000000..be4f93d8c387 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php @@ -0,0 +1,86 @@ + [ + 'google.cloud.run.v2.Revisions' => [ + 'DeleteRevision' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Revision', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Revision', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'GetRevision' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\Revision', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'ListRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRevisions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Run\V2\ListRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'templateMap' => [ + 'revision' => 'projects/{project}/locations/{location}/services/{service}/revisions/{revision}', + 'service' => 'projects/{project}/locations/{location}/services/{service}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php new file mode 100644 index 000000000000..851593567e0e --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php @@ -0,0 +1,127 @@ + [ + 'google.cloud.run.v2.Revisions' => [ + 'DeleteRevision' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*/revisions/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*/revisions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRevision' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*/revisions/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*/revisions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/services/*}/revisions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/workerPools/*}/revisions', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json new file mode 100644 index 000000000000..53e3bc1d5fa5 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.run.v2.Services": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 10000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 10000, + "total_timeout_millis": 10000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 15000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 15000, + "total_timeout_millis": 15000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 10000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 10000, + "total_timeout_millis": 10000 + } + }, + "methods": { + "CreateService": { + "timeout_millis": 15000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteService": { + "timeout_millis": 10000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetService": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListServices": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateService": { + "timeout_millis": 15000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php new file mode 100644 index 000000000000..ce32f880046c --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php @@ -0,0 +1,174 @@ + [ + 'google.cloud.run.v2.Services' => [ + 'CreateService' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Service', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Service', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'DeleteService' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Service', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Service', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'UpdateService' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\Service', + 'metadataReturnType' => '\Google\Cloud\Run\V2\Service', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getService', + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\Service', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'ListServices' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getServices', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Run\V2\ListServicesResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'templateMap' => [ + 'build' => 'projects/{project}/locations/{location}/builds/{build}', + 'buildWorkerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', + 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'location' => 'projects/{project}/locations/{location}', + 'locationPolicy' => 'locations/{location}/policy', + 'mesh' => 'projects/{project}/locations/{location}/meshes/{mesh}', + 'policy' => 'projects/{project}/policy', + 'projectPolicy' => 'projects/{project}/policy', + 'revision' => 'projects/{project}/locations/{location}/services/{service}/revisions/{revision}', + 'secret' => 'projects/{project}/secrets/{secret}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + 'service' => 'projects/{project}/locations/{location}/services/{service}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php new file mode 100644 index 000000000000..6b244e981c12 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php @@ -0,0 +1,172 @@ + [ + 'google.cloud.run.v2.Services' => [ + 'CreateService' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/services', + 'body' => 'service', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'service_id', + ], + ], + 'DeleteService' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/services/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetService' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListServices' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/services', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/services/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/services/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateService' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{service.name=projects/*/locations/*/services/*}', + 'body' => 'service', + 'placeholders' => [ + 'service.name' => [ + 'getters' => [ + 'getService', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json new file mode 100644 index 000000000000..60a75305960e --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.cloud.run.v2.Tasks": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetTask": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php new file mode 100644 index 000000000000..9bc52e3f428b --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.cloud.run.v2.Tasks' => [ + 'GetTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\Task', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTasks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Run\V2\ListTasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'execution' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}', + 'task' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php new file mode 100644 index 000000000000..594f6b965b47 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.run.v2.Tasks' => [ + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/jobs/*/executions/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json new file mode 100644 index 000000000000..4fa3730c30dc --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.run.v2.WorkerPools": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CreateWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListWorkerPools": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php new file mode 100644 index 000000000000..641879748aa2 --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php @@ -0,0 +1,172 @@ + [ + 'google.cloud.run.v2.WorkerPools' => [ + 'CreateWorkerPool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\WorkerPool', + 'metadataReturnType' => '\Google\Cloud\Run\V2\WorkerPool', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'DeleteWorkerPool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\WorkerPool', + 'metadataReturnType' => '\Google\Cloud\Run\V2\WorkerPool', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'UpdateWorkerPool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Run\V2\WorkerPool', + 'metadataReturnType' => '\Google\Cloud\Run\V2\WorkerPool', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getWorkerPool', + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetWorkerPool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Run\V2\WorkerPool', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [], + ], + ], + ], + 'ListWorkerPools' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getWorkerPools', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Run\V2\ListWorkerPoolsResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'templateMap' => [ + 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'location' => 'projects/{project}/locations/{location}', + 'locationPolicy' => 'locations/{location}/policy', + 'mesh' => 'projects/{project}/locations/{location}/meshes/{mesh}', + 'policy' => 'projects/{project}/policy', + 'projectPolicy' => 'projects/{project}/policy', + 'revision' => 'projects/{project}/locations/{location}/services/{service}/revisions/{revision}', + 'secret' => 'projects/{project}/secrets/{secret}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + 'workerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php new file mode 100644 index 000000000000..dc048632620e --- /dev/null +++ b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php @@ -0,0 +1,172 @@ + [ + 'google.cloud.run.v2.WorkerPools' => [ + 'CreateWorkerPool' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workerPools', + 'body' => 'worker_pool', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'worker_pool_id', + ], + ], + 'DeleteWorkerPool' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/workerPools/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetWorkerPool' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListWorkerPools' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workerPools', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/workerPools/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/workerPools/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateWorkerPool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{worker_pool.name=projects/*/locations/*/workerPools/*}', + 'body' => 'worker_pool', + 'placeholders' => [ + 'worker_pool.name' => [ + 'getters' => [ + 'getWorkerPool', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php new file mode 100644 index 000000000000..a9c1182cfe03 --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php @@ -0,0 +1,192 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BuildsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BuildsClient($options); + } + + /** @test */ + public function submitBuildTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseImageUri = 'baseImageUri2088954010'; + $baseImageWarning = 'baseImageWarning-2033873974'; + $expectedResponse = new SubmitBuildResponse(); + $expectedResponse->setBaseImageUri($baseImageUri); + $expectedResponse->setBaseImageWarning($baseImageWarning); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $storageSource = new StorageSource(); + $storageSourceBucket = 'storageSourceBucket608605184'; + $storageSource->setBucket($storageSourceBucket); + $storageSourceObject = 'storageSourceObject963439957'; + $storageSource->setObject($storageSourceObject); + $imageUri = 'imageUri-877823864'; + $request = (new SubmitBuildRequest()) + ->setParent($parent) + ->setStorageSource($storageSource) + ->setImageUri($imageUri); + $response = $gapicClient->submitBuild($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Builds/SubmitBuild', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getStorageSource(); + $this->assertProtobufEquals($storageSource, $actualValue); + $actualValue = $actualRequestObject->getImageUri(); + $this->assertProtobufEquals($imageUri, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function submitBuildExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $storageSource = new StorageSource(); + $storageSourceBucket = 'storageSourceBucket608605184'; + $storageSource->setBucket($storageSourceBucket); + $storageSourceObject = 'storageSourceObject963439957'; + $storageSource->setObject($storageSourceObject); + $imageUri = 'imageUri-877823864'; + $request = (new SubmitBuildRequest()) + ->setParent($parent) + ->setStorageSource($storageSource) + ->setImageUri($imageUri); + try { + $gapicClient->submitBuild($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function submitBuildAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseImageUri = 'baseImageUri2088954010'; + $baseImageWarning = 'baseImageWarning-2033873974'; + $expectedResponse = new SubmitBuildResponse(); + $expectedResponse->setBaseImageUri($baseImageUri); + $expectedResponse->setBaseImageWarning($baseImageWarning); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $storageSource = new StorageSource(); + $storageSourceBucket = 'storageSourceBucket608605184'; + $storageSource->setBucket($storageSourceBucket); + $storageSourceObject = 'storageSourceObject963439957'; + $storageSource->setObject($storageSourceObject); + $imageUri = 'imageUri-877823864'; + $request = (new SubmitBuildRequest()) + ->setParent($parent) + ->setStorageSource($storageSource) + ->setImageUri($imageUri); + $response = $gapicClient->submitBuildAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Builds/SubmitBuild', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getStorageSource(); + $this->assertProtobufEquals($storageSource, $actualValue); + $actualValue = $actualRequestObject->getImageUri(); + $this->assertProtobufEquals($imageUri, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php new file mode 100644 index 000000000000..3bf58ca9aa6b --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php @@ -0,0 +1,646 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ExecutionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ExecutionsClient($options); + } + + /** @test */ + public function cancelExecutionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $creator = 'creator1028554796'; + $generation = 305703192; + $job = 'job105405'; + $parallelism = 635164956; + $taskCount = 1297805781; + $reconciling = false; + $observedGeneration = 900833007; + $runningCount = 261439119; + $succeededCount = 633694641; + $failedCount = 2013829491; + $cancelledCount = 1921113249; + $retriedCount = 1654679545; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setCreator($creator); + $expectedResponse->setGeneration($generation); + $expectedResponse->setJob($job); + $expectedResponse->setParallelism($parallelism); + $expectedResponse->setTaskCount($taskCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setRunningCount($runningCount); + $expectedResponse->setSucceededCount($succeededCount); + $expectedResponse->setFailedCount($failedCount); + $expectedResponse->setCancelledCount($cancelledCount); + $expectedResponse->setRetriedCount($retriedCount); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelExecutionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new CancelExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Executions/CancelExecution', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelExecutionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelExecutionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new CancelExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelExecutionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExecutionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $creator = 'creator1028554796'; + $generation = 305703192; + $job = 'job105405'; + $parallelism = 635164956; + $taskCount = 1297805781; + $reconciling = false; + $observedGeneration = 900833007; + $runningCount = 261439119; + $succeededCount = 633694641; + $failedCount = 2013829491; + $cancelledCount = 1921113249; + $retriedCount = 1654679545; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setCreator($creator); + $expectedResponse->setGeneration($generation); + $expectedResponse->setJob($job); + $expectedResponse->setParallelism($parallelism); + $expectedResponse->setTaskCount($taskCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setRunningCount($runningCount); + $expectedResponse->setSucceededCount($succeededCount); + $expectedResponse->setFailedCount($failedCount); + $expectedResponse->setCancelledCount($cancelledCount); + $expectedResponse->setRetriedCount($retriedCount); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteExecutionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new DeleteExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Executions/DeleteExecution', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExecutionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new DeleteExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $creator = 'creator1028554796'; + $generation = 305703192; + $job = 'job105405'; + $parallelism = 635164956; + $taskCount = 1297805781; + $reconciling = false; + $observedGeneration = 900833007; + $runningCount = 261439119; + $succeededCount = 633694641; + $failedCount = 2013829491; + $cancelledCount = 1921113249; + $retriedCount = 1654679545; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $etag = 'etag3123477'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setCreator($creator); + $expectedResponse->setGeneration($generation); + $expectedResponse->setJob($job); + $expectedResponse->setParallelism($parallelism); + $expectedResponse->setTaskCount($taskCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setRunningCount($runningCount); + $expectedResponse->setSucceededCount($succeededCount); + $expectedResponse->setFailedCount($failedCount); + $expectedResponse->setCancelledCount($cancelledCount); + $expectedResponse->setRetriedCount($retriedCount); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new GetExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->getExecution($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Executions/GetExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new GetExecutionRequest()) + ->setName($formattedName); + try { + $gapicClient->getExecution($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $executionsElement = new Execution(); + $executions = [ + $executionsElement, + ]; + $expectedResponse = new ListExecutionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExecutions($executions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new ListExecutionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExecutions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExecutions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Executions/ListExecutions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new ListExecutionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExecutions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelExecutionAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $creator = 'creator1028554796'; + $generation = 305703192; + $job = 'job105405'; + $parallelism = 635164956; + $taskCount = 1297805781; + $reconciling = false; + $observedGeneration = 900833007; + $runningCount = 261439119; + $succeededCount = 633694641; + $failedCount = 2013829491; + $cancelledCount = 1921113249; + $retriedCount = 1654679545; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setCreator($creator); + $expectedResponse->setGeneration($generation); + $expectedResponse->setJob($job); + $expectedResponse->setParallelism($parallelism); + $expectedResponse->setTaskCount($taskCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setRunningCount($runningCount); + $expectedResponse->setSucceededCount($succeededCount); + $expectedResponse->setFailedCount($failedCount); + $expectedResponse->setCancelledCount($cancelledCount); + $expectedResponse->setRetriedCount($retriedCount); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelExecutionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new CancelExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelExecutionAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Executions/CancelExecution', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelExecutionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/InstancesClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/InstancesClientTest.php new file mode 100644 index 000000000000..9102fe3c891e --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/InstancesClientTest.php @@ -0,0 +1,996 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return InstancesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new InstancesClient($options); + } + + /** @test */ + public function createInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $gpuZonalRedundancyDisabled = true; + $invokerIamDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instance = new Instance(); + $instanceContainers = []; + $instance->setContainers($instanceContainers); + $instanceId = 'instanceId-2101995259'; + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstance($instance) + ->setInstanceId($instanceId); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Instances/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instance = new Instance(); + $instanceContainers = []; + $instance->setContainers($instanceContainers); + $instanceId = 'instanceId-2101995259'; + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstance($instance) + ->setInstanceId($instanceId); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $gpuZonalRedundancyDisabled = true; + $invokerIamDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $reconciling = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Instances/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $gpuZonalRedundancyDisabled = true; + $invokerIamDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Instances/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Instances/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $gpuZonalRedundancyDisabled = true; + $invokerIamDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $reconciling = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StartInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->startInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Instances/StartInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StartInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->startInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $gpuZonalRedundancyDisabled = true; + $invokerIamDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $reconciling = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StopInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->stopInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Instances/StopInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new StopInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->stopInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $gpuZonalRedundancyDisabled = true; + $invokerIamDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instance = new Instance(); + $instanceContainers = []; + $instance->setContainers($instanceContainers); + $instanceId = 'instanceId-2101995259'; + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstance($instance) + ->setInstanceId($instanceId); + $response = $gapicClient->createInstanceAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Instances/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php new file mode 100644 index 000000000000..219b461ab0c4 --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php @@ -0,0 +1,1172 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return JobsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new JobsClient($options); + } + + /** @test */ + public function createJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $executionCount = 1646136616; + $reconciling = false; + $satisfiesPzs = false; + $startExecutionToken = 'startExecutionToken-1179087819'; + $etag = 'etag3123477'; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setExecutionCount($executionCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setStartExecutionToken($startExecutionToken); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $jobTemplate = new ExecutionTemplate(); + $templateTemplate = new TaskTemplate(); + $jobTemplate->setTemplate($templateTemplate); + $job->setTemplate($jobTemplate); + $jobId = 'jobId-1154752291'; + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job) + ->setJobId($jobId); + $response = $gapicClient->createJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/CreateJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $actualValue = $actualApiRequestObject->getJobId(); + $this->assertProtobufEquals($jobId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $jobTemplate = new ExecutionTemplate(); + $templateTemplate = new TaskTemplate(); + $jobTemplate->setTemplate($templateTemplate); + $job->setTemplate($jobTemplate); + $jobId = 'jobId-1154752291'; + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job) + ->setJobId($jobId); + $response = $gapicClient->createJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $executionCount = 1646136616; + $reconciling = false; + $satisfiesPzs = false; + $startExecutionToken = 'startExecutionToken-1179087819'; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setExecutionCount($executionCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setStartExecutionToken($startExecutionToken); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/DeleteJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $executionCount = 1646136616; + $reconciling = false; + $satisfiesPzs = false; + $startExecutionToken = 'startExecutionToken-1179087819'; + $etag = 'etag3123477'; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setExecutionCount($executionCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setStartExecutionToken($startExecutionToken); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/GetJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobsElement = new Job(); + $jobs = [ + $jobsElement, + ]; + $expectedResponse = new ListJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobs($jobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/ListJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $creator = 'creator1028554796'; + $generation = 305703192; + $job = 'job105405'; + $parallelism = 635164956; + $taskCount = 1297805781; + $reconciling = false; + $observedGeneration = 900833007; + $runningCount = 261439119; + $succeededCount = 633694641; + $failedCount = 2013829491; + $cancelledCount = 1921113249; + $retriedCount = 1654679545; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setCreator($creator); + $expectedResponse->setGeneration($generation); + $expectedResponse->setJob($job); + $expectedResponse->setParallelism($parallelism); + $expectedResponse->setTaskCount($taskCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setRunningCount($runningCount); + $expectedResponse->setSucceededCount($succeededCount); + $expectedResponse->setFailedCount($failedCount); + $expectedResponse->setCancelledCount($cancelledCount); + $expectedResponse->setRetriedCount($retriedCount); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new RunJobRequest()) + ->setName($formattedName); + $response = $gapicClient->runJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/RunJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function runJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new RunJobRequest()) + ->setName($formattedName); + $response = $gapicClient->runJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $executionCount = 1646136616; + $reconciling = false; + $satisfiesPzs = false; + $startExecutionToken = 'startExecutionToken-1179087819'; + $etag = 'etag3123477'; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setExecutionCount($executionCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setStartExecutionToken($startExecutionToken); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $job = new Job(); + $jobTemplate = new ExecutionTemplate(); + $templateTemplate = new TaskTemplate(); + $jobTemplate->setTemplate($templateTemplate); + $job->setTemplate($jobTemplate); + $request = (new UpdateJobRequest()) + ->setJob($job); + $response = $gapicClient->updateJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/UpdateJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $job = new Job(); + $jobTemplate = new ExecutionTemplate(); + $templateTemplate = new TaskTemplate(); + $jobTemplate->setTemplate($templateTemplate); + $job->setTemplate($jobTemplate); + $request = (new UpdateJobRequest()) + ->setJob($job); + $response = $gapicClient->updateJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createJobAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $executionCount = 1646136616; + $reconciling = false; + $satisfiesPzs = false; + $startExecutionToken = 'startExecutionToken-1179087819'; + $etag = 'etag3123477'; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setExecutionCount($executionCount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setStartExecutionToken($startExecutionToken); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $jobTemplate = new ExecutionTemplate(); + $templateTemplate = new TaskTemplate(); + $jobTemplate->setTemplate($templateTemplate); + $job->setTemplate($jobTemplate); + $jobId = 'jobId-1154752291'; + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job) + ->setJobId($jobId); + $response = $gapicClient->createJobAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Jobs/CreateJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $actualValue = $actualApiRequestObject->getJobId(); + $this->assertProtobufEquals($jobId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php new file mode 100644 index 000000000000..73cea513c2f3 --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php @@ -0,0 +1,478 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RevisionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RevisionsClient($options); + } + + /** @test */ + public function deleteRevisionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRevisionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $generation = 305703192; + $service = 'service1984153269'; + $maxInstanceRequestConcurrency = 117250100; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $reconciling = false; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $sessionAffinity = false; + $gpuZonalRedundancyDisabled = true; + $creator = 'creator1028554796'; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Revision(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setService($service); + $expectedResponse->setMaxInstanceRequestConcurrency($maxInstanceRequestConcurrency); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSessionAffinity($sessionAffinity); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setCreator($creator); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRevisionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); + $request = (new DeleteRevisionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRevision($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Revisions/DeleteRevision', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRevisionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRevisionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRevisionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); + $request = (new DeleteRevisionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRevision($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRevisionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getRevisionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $generation = 305703192; + $service = 'service1984153269'; + $maxInstanceRequestConcurrency = 117250100; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $reconciling = false; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $sessionAffinity = false; + $gpuZonalRedundancyDisabled = true; + $creator = 'creator1028554796'; + $etag = 'etag3123477'; + $expectedResponse = new Revision(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setService($service); + $expectedResponse->setMaxInstanceRequestConcurrency($maxInstanceRequestConcurrency); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSessionAffinity($sessionAffinity); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setCreator($creator); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); + $request = (new GetRevisionRequest()) + ->setName($formattedName); + $response = $gapicClient->getRevision($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Revisions/GetRevision', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRevisionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); + $request = (new GetRevisionRequest()) + ->setName($formattedName); + try { + $gapicClient->getRevision($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $revisionsElement = new Revision(); + $revisions = [ + $revisionsElement, + ]; + $expectedResponse = new ListRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRevisions($revisions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new ListRevisionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRevisions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Revisions/ListRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new ListRevisionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteRevisionAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRevisionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $generation = 305703192; + $service = 'service1984153269'; + $maxInstanceRequestConcurrency = 117250100; + $serviceAccount = 'serviceAccount-1948028253'; + $encryptionKey = 'encryptionKey-1122344029'; + $reconciling = false; + $observedGeneration = 900833007; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $sessionAffinity = false; + $gpuZonalRedundancyDisabled = true; + $creator = 'creator1028554796'; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Revision(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setService($service); + $expectedResponse->setMaxInstanceRequestConcurrency($maxInstanceRequestConcurrency); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSessionAffinity($sessionAffinity); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setCreator($creator); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRevisionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); + $request = (new DeleteRevisionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRevisionAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Revisions/DeleteRevision', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRevisionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php new file mode 100644 index 000000000000..3948de6bc615 --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php @@ -0,0 +1,1064 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ServicesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ServicesClient($options); + } + + /** @test */ + public function createServiceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $invokerIamDisabled = false; + $defaultUriDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $uri = 'uri116076'; + $satisfiesPzs = false; + $threatDetectionEnabled = true; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setUri($uri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $service = new Service(); + $serviceTemplate = new RevisionTemplate(); + $service->setTemplate($serviceTemplate); + $serviceId = 'serviceId-1724763419'; + $request = (new CreateServiceRequest()) + ->setParent($formattedParent) + ->setService($service) + ->setServiceId($serviceId); + $response = $gapicClient->createService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/CreateService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $actualValue = $actualApiRequestObject->getServiceId(); + $this->assertProtobufEquals($serviceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServiceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServiceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $service = new Service(); + $serviceTemplate = new RevisionTemplate(); + $service->setTemplate($serviceTemplate); + $serviceId = 'serviceId-1724763419'; + $request = (new CreateServiceRequest()) + ->setParent($formattedParent) + ->setService($service) + ->setServiceId($serviceId); + $response = $gapicClient->createService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServiceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServiceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $invokerIamDisabled = false; + $defaultUriDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $uri = 'uri116076'; + $satisfiesPzs = false; + $threatDetectionEnabled = true; + $reconciling = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Service(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setUri($uri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new DeleteServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/DeleteService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServiceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServiceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new DeleteServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServiceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $invokerIamDisabled = false; + $defaultUriDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $uri = 'uri116076'; + $satisfiesPzs = false; + $threatDetectionEnabled = true; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new Service(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setUri($uri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new GetServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->getService($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/GetService', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); + $request = (new GetServiceRequest()) + ->setName($formattedName); + try { + $gapicClient->getService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $servicesElement = new Service(); + $services = [ + $servicesElement, + ]; + $expectedResponse = new ListServicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServices($services); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServicesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listServices($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/ListServices', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServicesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listServices($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $invokerIamDisabled = false; + $defaultUriDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $uri = 'uri116076'; + $satisfiesPzs = false; + $threatDetectionEnabled = true; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setUri($uri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $service = new Service(); + $serviceTemplate = new RevisionTemplate(); + $service->setTemplate($serviceTemplate); + $request = (new UpdateServiceRequest()) + ->setService($service); + $response = $gapicClient->updateService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/UpdateService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateServiceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateServiceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $service = new Service(); + $serviceTemplate = new RevisionTemplate(); + $service->setTemplate($serviceTemplate); + $request = (new UpdateServiceRequest()) + ->setService($service); + $response = $gapicClient->updateService($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateServiceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServiceAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServiceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $invokerIamDisabled = false; + $defaultUriDisabled = false; + $iapEnabled = true; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $uri = 'uri116076'; + $satisfiesPzs = false; + $threatDetectionEnabled = true; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); + $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); + $expectedResponse->setIapEnabled($iapEnabled); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setUri($uri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createServiceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $service = new Service(); + $serviceTemplate = new RevisionTemplate(); + $service->setTemplate($serviceTemplate); + $serviceId = 'serviceId-1724763419'; + $request = (new CreateServiceRequest()) + ->setParent($formattedParent) + ->setService($service) + ->setServiceId($serviceId); + $response = $gapicClient->createServiceAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Services/CreateService', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $actualValue = $actualApiRequestObject->getServiceId(); + $this->assertProtobufEquals($serviceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServiceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php new file mode 100644 index 000000000000..28b61666042a --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php @@ -0,0 +1,289 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TasksClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TasksClient($options); + } + + /** @test */ + public function getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $generation = 305703192; + $job = 'job105405'; + $execution = 'execution-1090974952'; + $maxRetries = 1129288043; + $serviceAccount = 'serviceAccount-1948028253'; + $reconciling = false; + $observedGeneration = 900833007; + $index = 100346066; + $retried = 1098377527; + $encryptionKey = 'encryptionKey-1122344029'; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $gpuZonalRedundancyDisabled = true; + $etag = 'etag3123477'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setJob($job); + $expectedResponse->setExecution($execution); + $expectedResponse->setMaxRetries($maxRetries); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setIndex($index); + $expectedResponse->setRetried($retried); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->getTask($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Tasks/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + try { + $gapicClient->getTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTasks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Tasks/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTasks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $generation = 305703192; + $job = 'job105405'; + $execution = 'execution-1090974952'; + $maxRetries = 1129288043; + $serviceAccount = 'serviceAccount-1948028253'; + $reconciling = false; + $observedGeneration = 900833007; + $index = 100346066; + $retried = 1098377527; + $encryptionKey = 'encryptionKey-1122344029'; + $logUri = 'logUri342054385'; + $satisfiesPzs = false; + $gpuZonalRedundancyDisabled = true; + $etag = 'etag3123477'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setJob($job); + $expectedResponse->setExecution($execution); + $expectedResponse->setMaxRetries($maxRetries); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setIndex($index); + $expectedResponse->setRetried($retried); + $expectedResponse->setEncryptionKey($encryptionKey); + $expectedResponse->setLogUri($logUri); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->getTaskAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.Tasks/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php new file mode 100644 index 000000000000..a1311c5bf452 --- /dev/null +++ b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php @@ -0,0 +1,1024 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WorkerPoolsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WorkerPoolsClient($options); + } + + /** @test */ + public function createWorkerPoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkerPoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $threatDetectionEnabled = true; + $satisfiesPzs = false; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new WorkerPool(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createWorkerPoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workerPool = new WorkerPool(); + $workerPoolTemplate = new WorkerPoolRevisionTemplate(); + $workerPool->setTemplate($workerPoolTemplate); + $workerPoolId = 'workerPoolId-300928931'; + $request = (new CreateWorkerPoolRequest()) + ->setParent($formattedParent) + ->setWorkerPool($workerPool) + ->setWorkerPoolId($workerPoolId); + $response = $gapicClient->createWorkerPool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/CreateWorkerPool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getWorkerPool(); + $this->assertProtobufEquals($workerPool, $actualValue); + $actualValue = $actualApiRequestObject->getWorkerPoolId(); + $this->assertProtobufEquals($workerPoolId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkerPoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createWorkerPoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkerPoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workerPool = new WorkerPool(); + $workerPoolTemplate = new WorkerPoolRevisionTemplate(); + $workerPool->setTemplate($workerPoolTemplate); + $workerPoolId = 'workerPoolId-300928931'; + $request = (new CreateWorkerPoolRequest()) + ->setParent($formattedParent) + ->setWorkerPool($workerPool) + ->setWorkerPoolId($workerPoolId); + $response = $gapicClient->createWorkerPool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkerPoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteWorkerPoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteWorkerPoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $threatDetectionEnabled = true; + $satisfiesPzs = false; + $reconciling = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new WorkerPool(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteWorkerPoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); + $request = (new DeleteWorkerPoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteWorkerPool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/DeleteWorkerPool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteWorkerPoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteWorkerPoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteWorkerPoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); + $request = (new DeleteWorkerPoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteWorkerPool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteWorkerPoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWorkerPoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $threatDetectionEnabled = true; + $satisfiesPzs = false; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new WorkerPool(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); + $request = (new GetWorkerPoolRequest()) + ->setName($formattedName); + $response = $gapicClient->getWorkerPool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/GetWorkerPool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWorkerPoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); + $request = (new GetWorkerPoolRequest()) + ->setName($formattedName); + try { + $gapicClient->getWorkerPool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkerPoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $workerPoolsElement = new WorkerPool(); + $workerPools = [ + $workerPoolsElement, + ]; + $expectedResponse = new ListWorkerPoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setWorkerPools($workerPools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListWorkerPoolsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listWorkerPools($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getWorkerPools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/ListWorkerPools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkerPoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListWorkerPoolsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listWorkerPools($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateWorkerPoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateWorkerPoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $threatDetectionEnabled = true; + $satisfiesPzs = false; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new WorkerPool(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateWorkerPoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $workerPool = new WorkerPool(); + $workerPoolTemplate = new WorkerPoolRevisionTemplate(); + $workerPool->setTemplate($workerPoolTemplate); + $request = (new UpdateWorkerPoolRequest()) + ->setWorkerPool($workerPool); + $response = $gapicClient->updateWorkerPool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/UpdateWorkerPool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getWorkerPool(); + $this->assertProtobufEquals($workerPool, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateWorkerPoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateWorkerPoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateWorkerPoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $workerPool = new WorkerPool(); + $workerPoolTemplate = new WorkerPoolRevisionTemplate(); + $workerPool->setTemplate($workerPoolTemplate); + $request = (new UpdateWorkerPoolRequest()) + ->setWorkerPool($workerPool); + $response = $gapicClient->updateWorkerPool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateWorkerPoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createWorkerPoolAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkerPoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $generation = 305703192; + $creator = 'creator1028554796'; + $lastModifier = 'lastModifier-28366240'; + $client = 'client-1357712437'; + $clientVersion = 'clientVersion-1506231196'; + $observedGeneration = 900833007; + $latestReadyRevision = 'latestReadyRevision-853854545'; + $latestCreatedRevision = 'latestCreatedRevision452370698'; + $threatDetectionEnabled = true; + $satisfiesPzs = false; + $reconciling = false; + $etag = 'etag3123477'; + $expectedResponse = new WorkerPool(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setGeneration($generation); + $expectedResponse->setCreator($creator); + $expectedResponse->setLastModifier($lastModifier); + $expectedResponse->setClient($client); + $expectedResponse->setClientVersion($clientVersion); + $expectedResponse->setObservedGeneration($observedGeneration); + $expectedResponse->setLatestReadyRevision($latestReadyRevision); + $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); + $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createWorkerPoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workerPool = new WorkerPool(); + $workerPoolTemplate = new WorkerPoolRevisionTemplate(); + $workerPool->setTemplate($workerPoolTemplate); + $workerPoolId = 'workerPoolId-300928931'; + $request = (new CreateWorkerPoolRequest()) + ->setParent($formattedParent) + ->setWorkerPool($workerPool) + ->setWorkerPoolId($workerPoolId); + $response = $gapicClient->createWorkerPoolAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.run.v2.WorkerPools/CreateWorkerPool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getWorkerPool(); + $this->assertProtobufEquals($workerPool, $actualValue); + $actualValue = $actualApiRequestObject->getWorkerPoolId(); + $this->assertProtobufEquals($workerPoolId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkerPoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 13e819bf04ea87a95cd66f3bb0cfe32fc353937b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 15 Jan 2026 23:16:23 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata}/V2/ContainerStatus.php | 0 .../Run => Run/metadata}/V2/Instance.php | Bin Run/metadata/V2/K8SMin.php | Bin 4209 -> 4262 bytes .../V2/InstancesClient/create_instance.php | 0 .../V2/InstancesClient/delete_instance.php | 0 .../V2/InstancesClient/get_instance.php | 0 .../V2/InstancesClient/list_instances.php | 0 .../V2/InstancesClient/start_instance.php | 0 .../V2/InstancesClient/stop_instance.php | 0 .../src/V2/Client/InstancesClient.php | 4 +- Run/src/V2/Container.php | 44 + .../Run => Run/src}/V2/ContainerStatus.php | 0 .../src}/V2/CreateInstanceRequest.php | 0 .../src}/V2/DeleteInstanceRequest.php | 0 .../Run => Run/src}/V2/GetInstanceRequest.php | 0 .../Cloud/Run => Run/src}/V2/Instance.php | 0 .../src}/V2/ListInstancesRequest.php | 0 .../src}/V2/ListInstancesResponse.php | 0 .../src}/V2/StartInstanceRequest.php | 0 .../src}/V2/StopInstanceRequest.php | 0 Run/src/V2/gapic_metadata.json | 39 + .../V2/resources/instances_client_config.json | 0 .../resources/instances_descriptor_config.php | 0 .../instances_rest_client_config.php | 0 .../Unit/V2/Client/InstancesClientTest.php | 128 +- .../GPBMetadata/Google/Cloud/Run/V2/Build.php | Bin 2682 -> 0 bytes .../Google/Cloud/Run/V2/Condition.php | Bin 2482 -> 0 bytes .../Google/Cloud/Run/V2/Execution.php | 110 - .../Google/Cloud/Run/V2/ExecutionTemplate.php | 42 - .../Google/Cloud/Run/V2/InstanceSplit.php | Bin 1241 -> 0 bytes .../GPBMetadata/Google/Cloud/Run/V2/Job.php | Bin 6807 -> 0 bytes .../Google/Cloud/Run/V2/K8SMin.php | Bin 4262 -> 0 bytes .../Google/Cloud/Run/V2/Revision.php | Bin 5116 -> 0 bytes .../Google/Cloud/Run/V2/RevisionTemplate.php | Bin 2426 -> 0 bytes .../Google/Cloud/Run/V2/Service.php | 143 -- .../Google/Cloud/Run/V2/Status.php | 29 - .../GPBMetadata/Google/Cloud/Run/V2/Task.php | Bin 4099 -> 0 bytes .../Google/Cloud/Run/V2/TaskTemplate.php | Bin 1725 -> 0 bytes .../Google/Cloud/Run/V2/TrafficTarget.php | Bin 1280 -> 0 bytes .../Google/Cloud/Run/V2/VendorSettings.php | Bin 3198 -> 0 bytes .../Google/Cloud/Run/V2/WorkerPool.php | 138 -- .../Run/V2/WorkerPoolRevisionTemplate.php | Bin 2198 -> 0 bytes .../Cloud/Run/V2/BinaryAuthorization.php | 160 -- .../src/Google/Cloud/Run/V2/BuildConfig.php | 388 ---- .../src/Google/Cloud/Run/V2/BuildInfo.php | 105 - .../Cloud/Run/V2/CancelExecutionRequest.php | 172 -- .../Google/Cloud/Run/V2/CloudSqlInstance.php | 86 - .../src/Google/Cloud/Run/V2/Condition.php | 337 ---- .../Cloud/Run/V2/Condition/CommonReason.php | 155 -- .../Run/V2/Condition/ExecutionReason.php | 93 - .../Cloud/Run/V2/Condition/RevisionReason.php | 141 -- .../Cloud/Run/V2/Condition/Severity.php | 71 - .../Google/Cloud/Run/V2/Condition/State.php | 78 - .../src/Google/Cloud/Run/V2/Container.php | 701 ------- .../src/Google/Cloud/Run/V2/ContainerPort.php | 109 - .../Google/Cloud/Run/V2/CreateJobRequest.php | 216 -- .../Cloud/Run/V2/CreateServiceRequest.php | 221 --- .../Cloud/Run/V2/CreateWorkerPoolRequest.php | 231 --- .../Cloud/Run/V2/DeleteExecutionRequest.php | 172 -- .../Google/Cloud/Run/V2/DeleteJobRequest.php | 167 -- .../Cloud/Run/V2/DeleteRevisionRequest.php | 169 -- .../Cloud/Run/V2/DeleteServiceRequest.php | 167 -- .../Cloud/Run/V2/DeleteWorkerPoolRequest.php | 172 -- .../Cloud/Run/V2/EmptyDirVolumeSource.php | 143 -- .../Run/V2/EmptyDirVolumeSource/Medium.php | 58 - .../Run/V2/EncryptionKeyRevocationAction.php | 61 - .../proto/src/Google/Cloud/Run/V2/EnvVar.php | 152 -- .../src/Google/Cloud/Run/V2/EnvVarSource.php | 77 - .../src/Google/Cloud/Run/V2/Execution.php | 1217 ------------ .../Cloud/Run/V2/ExecutionEnvironment.php | 61 - .../Cloud/Run/V2/ExecutionReference.php | 238 --- .../ExecutionReference/CompletionStatus.php | 85 - .../Google/Cloud/Run/V2/ExecutionTemplate.php | 318 --- .../Google/Cloud/Run/V2/GCSVolumeSource.php | 140 -- .../src/Google/Cloud/Run/V2/GRPCAction.php | 121 -- .../Cloud/Run/V2/GetExecutionRequest.php | 96 - .../src/Google/Cloud/Run/V2/GetJobRequest.php | 91 - .../Cloud/Run/V2/GetRevisionRequest.php | 91 - .../Google/Cloud/Run/V2/GetServiceRequest.php | 91 - .../Google/Cloud/Run/V2/GetTaskRequest.php | 91 - .../Cloud/Run/V2/GetWorkerPoolRequest.php | 96 - .../src/Google/Cloud/Run/V2/HTTPGetAction.php | 147 -- .../src/Google/Cloud/Run/V2/HTTPHeader.php | 101 - .../Google/Cloud/Run/V2/IngressTraffic.php | 75 - .../src/Google/Cloud/Run/V2/InstanceSplit.php | 144 -- .../Run/V2/InstanceSplitAllocationType.php | 61 - .../Cloud/Run/V2/InstanceSplitStatus.php | 135 -- .../v2/proto/src/Google/Cloud/Run/V2/Job.php | 1245 ------------ .../Cloud/Run/V2/ListExecutionsRequest.php | 202 -- .../Cloud/Run/V2/ListExecutionsResponse.php | 105 - .../Google/Cloud/Run/V2/ListJobsRequest.php | 197 -- .../Google/Cloud/Run/V2/ListJobsResponse.php | 105 - .../Cloud/Run/V2/ListRevisionsRequest.php | 202 -- .../Cloud/Run/V2/ListRevisionsResponse.php | 105 - .../Cloud/Run/V2/ListServicesRequest.php | 202 -- .../Cloud/Run/V2/ListServicesResponse.php | 143 -- .../Google/Cloud/Run/V2/ListTasksRequest.php | 202 -- .../Google/Cloud/Run/V2/ListTasksResponse.php | 105 - .../Cloud/Run/V2/ListWorkerPoolsRequest.php | 202 -- .../Cloud/Run/V2/ListWorkerPoolsResponse.php | 105 - .../Google/Cloud/Run/V2/NFSVolumeSource.php | 135 -- .../src/Google/Cloud/Run/V2/NodeSelector.php | 67 - .../proto/src/Google/Cloud/Run/V2/Probe.php | 319 --- .../Cloud/Run/V2/ResourceRequirements.php | 179 -- .../src/Google/Cloud/Run/V2/Revision.php | 1455 -------------- .../Google/Cloud/Run/V2/RevisionScaling.php | 117 -- .../Cloud/Run/V2/RevisionScalingStatus.php | 67 - .../Google/Cloud/Run/V2/RevisionTemplate.php | 866 -------- .../src/Google/Cloud/Run/V2/RunJobRequest.php | 215 -- .../Cloud/Run/V2/RunJobRequest/Overrides.php | 160 -- .../Overrides/ContainerOverride.php | 180 -- .../Google/Cloud/Run/V2/SecretKeySelector.php | 121 -- .../Cloud/Run/V2/SecretVolumeSource.php | 217 -- .../proto/src/Google/Cloud/Run/V2/Service.php | 1761 ----------------- .../Run/V2/Service/MultiRegionSettings.php | 104 - .../src/Google/Cloud/Run/V2/ServiceMesh.php | 76 - .../Google/Cloud/Run/V2/ServiceScaling.php | 204 -- .../Run/V2/ServiceScaling/ScalingMode.php | 65 - .../src/Google/Cloud/Run/V2/SourceCode.php | 75 - .../Run/V2/SourceCode/CloudStorageSource.php | 138 -- .../src/Google/Cloud/Run/V2/StorageSource.php | 155 -- .../Cloud/Run/V2/SubmitBuildRequest.php | 466 ----- .../V2/SubmitBuildRequest/BuildpacksBuild.php | 317 --- .../Run/V2/SubmitBuildRequest/DockerBuild.php | 36 - .../Cloud/Run/V2/SubmitBuildResponse.php | 149 -- .../Google/Cloud/Run/V2/TCPSocketAction.php | 75 - .../v2/proto/src/Google/Cloud/Run/V2/Task.php | 1431 -------------- .../Google/Cloud/Run/V2/TaskAttemptResult.php | 173 -- .../src/Google/Cloud/Run/V2/TaskTemplate.php | 469 ----- .../src/Google/Cloud/Run/V2/TrafficTarget.php | 182 -- .../Run/V2/TrafficTargetAllocationType.php | 61 - .../Cloud/Run/V2/TrafficTargetStatus.php | 203 -- .../Google/Cloud/Run/V2/UpdateJobRequest.php | 170 -- .../Cloud/Run/V2/UpdateServiceRequest.php | 229 --- .../Cloud/Run/V2/UpdateWorkerPoolRequest.php | 287 --- .../src/Google/Cloud/Run/V2/VersionToPath.php | 188 -- .../proto/src/Google/Cloud/Run/V2/Volume.php | 247 --- .../src/Google/Cloud/Run/V2/VolumeMount.php | 155 -- .../src/Google/Cloud/Run/V2/VpcAccess.php | 160 -- .../Run/V2/VpcAccess/NetworkInterface.php | 170 -- .../Cloud/Run/V2/VpcAccess/VpcEgress.php | 64 - .../src/Google/Cloud/Run/V2/WorkerPool.php | 1441 -------------- .../Run/V2/WorkerPoolRevisionTemplate.php | 634 ------ .../Google/Cloud/Run/V2/WorkerPoolScaling.php | 77 - .../samples/V2/BuildsClient/submit_build.php | 94 - .../V2/ExecutionsClient/cancel_execution.php | 86 - .../V2/ExecutionsClient/delete_execution.php | 86 - .../V2/ExecutionsClient/get_execution.php | 74 - .../V2/ExecutionsClient/list_executions.php | 80 - .../v2/samples/V2/JobsClient/create_job.php | 97 - .../v2/samples/V2/JobsClient/delete_job.php | 85 - .../samples/V2/JobsClient/get_iam_policy.php | 72 - .../Run/v2/samples/V2/JobsClient/get_job.php | 73 - .../v2/samples/V2/JobsClient/list_jobs.php | 78 - .../Run/v2/samples/V2/JobsClient/run_job.php | 85 - .../samples/V2/JobsClient/set_iam_policy.php | 74 - .../V2/JobsClient/test_iam_permissions.php | 80 - .../v2/samples/V2/JobsClient/update_job.php | 77 - .../V2/RevisionsClient/delete_revision.php | 90 - .../V2/RevisionsClient/get_revision.php | 78 - .../V2/RevisionsClient/list_revisions.php | 80 - .../V2/ServicesClient/create_service.php | 95 - .../V2/ServicesClient/delete_service.php | 87 - .../V2/ServicesClient/get_iam_policy.php | 72 - .../samples/V2/ServicesClient/get_service.php | 73 - .../V2/ServicesClient/list_services.php | 79 - .../V2/ServicesClient/set_iam_policy.php | 74 - .../ServicesClient/test_iam_permissions.php | 80 - .../V2/ServicesClient/update_service.php | 74 - .../v2/samples/V2/TasksClient/get_task.php | 73 - .../v2/samples/V2/TasksClient/list_tasks.php | 79 - .../WorkerPoolsClient/create_worker_pool.php | 97 - .../WorkerPoolsClient/delete_worker_pool.php | 86 - .../V2/WorkerPoolsClient/get_iam_policy.php | 72 - .../V2/WorkerPoolsClient/get_worker_pool.php | 74 - .../WorkerPoolsClient/list_worker_pools.php | 79 - .../V2/WorkerPoolsClient/set_iam_policy.php | 74 - .../test_iam_permissions.php | 80 - .../WorkerPoolsClient/update_worker_pool.php | 74 - .../Run/v2/src/V2/Client/BuildsClient.php | 255 --- .../Run/v2/src/V2/Client/ExecutionsClient.php | 417 ---- .../Run/v2/src/V2/Client/JobsClient.php | 709 ------- .../Run/v2/src/V2/Client/RevisionsClient.php | 389 ---- .../Run/v2/src/V2/Client/ServicesClient.php | 742 ------- .../Run/v2/src/V2/Client/TasksClient.php | 310 --- .../v2/src/V2/Client/WorkerPoolsClient.php | 700 ------- .../Run/v2/src/V2/gapic_metadata.json | 286 --- .../V2/resources/builds_client_config.json | 27 - .../V2/resources/builds_descriptor_config.php | 43 - .../resources/builds_rest_client_config.php | 88 - .../resources/executions_client_config.json | 42 - .../executions_descriptor_config.php | 102 - .../executions_rest_client_config.php | 121 -- .../src/V2/resources/jobs_client_config.json | 67 - .../V2/resources/jobs_descriptor_config.php | 191 -- .../V2/resources/jobs_rest_client_config.php | 184 -- .../V2/resources/revisions_client_config.json | 37 - .../resources/revisions_descriptor_config.php | 86 - .../revisions_rest_client_config.php | 127 -- .../V2/resources/services_client_config.json | 94 - .../resources/services_descriptor_config.php | 174 -- .../resources/services_rest_client_config.php | 172 -- .../src/V2/resources/tasks_client_config.json | 32 - .../V2/resources/tasks_descriptor_config.php | 64 - .../V2/resources/tasks_rest_client_config.php | 98 - .../resources/worker_pools_client_config.json | 62 - .../worker_pools_descriptor_config.php | 172 -- .../worker_pools_rest_client_config.php | 172 -- .../tests/Unit/V2/Client/BuildsClientTest.php | 192 -- .../Unit/V2/Client/ExecutionsClientTest.php | 646 ------ .../tests/Unit/V2/Client/JobsClientTest.php | 1172 ----------- .../Unit/V2/Client/RevisionsClientTest.php | 478 ----- .../Unit/V2/Client/ServicesClientTest.php | 1064 ---------- .../tests/Unit/V2/Client/TasksClientTest.php | 289 --- .../Unit/V2/Client/WorkerPoolsClientTest.php | 1024 ---------- 215 files changed, 152 insertions(+), 39345 deletions(-) rename {owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run => Run/metadata}/V2/ContainerStatus.php (100%) rename {owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run => Run/metadata}/V2/Instance.php (100%) rename {owl-bot-staging/Run/v2 => Run}/samples/V2/InstancesClient/create_instance.php (100%) rename {owl-bot-staging/Run/v2 => Run}/samples/V2/InstancesClient/delete_instance.php (100%) rename {owl-bot-staging/Run/v2 => Run}/samples/V2/InstancesClient/get_instance.php (100%) rename {owl-bot-staging/Run/v2 => Run}/samples/V2/InstancesClient/list_instances.php (100%) rename {owl-bot-staging/Run/v2 => Run}/samples/V2/InstancesClient/start_instance.php (100%) rename {owl-bot-staging/Run/v2 => Run}/samples/V2/InstancesClient/stop_instance.php (100%) rename {owl-bot-staging/Run/v2 => Run}/src/V2/Client/InstancesClient.php (99%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/ContainerStatus.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/CreateInstanceRequest.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/DeleteInstanceRequest.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/GetInstanceRequest.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/Instance.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/ListInstancesRequest.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/ListInstancesResponse.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/StartInstanceRequest.php (100%) rename {owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run => Run/src}/V2/StopInstanceRequest.php (100%) rename {owl-bot-staging/Run/v2 => Run}/src/V2/resources/instances_client_config.json (100%) rename {owl-bot-staging/Run/v2 => Run}/src/V2/resources/instances_descriptor_config.php (100%) rename {owl-bot-staging/Run/v2 => Run}/src/V2/resources/instances_rest_client_config.php (100%) rename {owl-bot-staging/Run/v2 => Run}/tests/Unit/V2/Client/InstancesClientTest.php (94%) delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Build.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Condition.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Execution.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/ExecutionTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/InstanceSplit.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Job.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/K8SMin.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Revision.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/RevisionTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Task.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TaskTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TrafficTarget.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/VendorSettings.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPool.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php delete mode 100644 owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php delete mode 100644 owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php delete mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php delete mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php delete mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php delete mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php delete mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php delete mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php delete mode 100644 owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/ContainerStatus.php b/Run/metadata/V2/ContainerStatus.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/ContainerStatus.php rename to Run/metadata/V2/ContainerStatus.php diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Instance.php b/Run/metadata/V2/Instance.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Instance.php rename to Run/metadata/V2/Instance.php diff --git a/Run/metadata/V2/K8SMin.php b/Run/metadata/V2/K8SMin.php index d6e29d39776bf496d0522b99cdbfe784aee601c4..b596449b57ebbc28f44331d297edf77960eb90e3 100644 GIT binary patch delta 47 zcmeyUuuO4-JrmP>naPe!A&eh4Ph+~tC}PaTUzD1dl9`uUTpV9el%JF;!ME9uMVSWx Djm8hR delta 26 icmZ3c_)%elJrmO_>B){vA&h%APh+~txOoW+6Au7}atTHN diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/create_instance.php b/Run/samples/V2/InstancesClient/create_instance.php similarity index 100% rename from owl-bot-staging/Run/v2/samples/V2/InstancesClient/create_instance.php rename to Run/samples/V2/InstancesClient/create_instance.php diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/delete_instance.php b/Run/samples/V2/InstancesClient/delete_instance.php similarity index 100% rename from owl-bot-staging/Run/v2/samples/V2/InstancesClient/delete_instance.php rename to Run/samples/V2/InstancesClient/delete_instance.php diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/get_instance.php b/Run/samples/V2/InstancesClient/get_instance.php similarity index 100% rename from owl-bot-staging/Run/v2/samples/V2/InstancesClient/get_instance.php rename to Run/samples/V2/InstancesClient/get_instance.php diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/list_instances.php b/Run/samples/V2/InstancesClient/list_instances.php similarity index 100% rename from owl-bot-staging/Run/v2/samples/V2/InstancesClient/list_instances.php rename to Run/samples/V2/InstancesClient/list_instances.php diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/start_instance.php b/Run/samples/V2/InstancesClient/start_instance.php similarity index 100% rename from owl-bot-staging/Run/v2/samples/V2/InstancesClient/start_instance.php rename to Run/samples/V2/InstancesClient/start_instance.php diff --git a/owl-bot-staging/Run/v2/samples/V2/InstancesClient/stop_instance.php b/Run/samples/V2/InstancesClient/stop_instance.php similarity index 100% rename from owl-bot-staging/Run/v2/samples/V2/InstancesClient/stop_instance.php rename to Run/samples/V2/InstancesClient/stop_instance.php diff --git a/owl-bot-staging/Run/v2/src/V2/Client/InstancesClient.php b/Run/src/V2/Client/InstancesClient.php similarity index 99% rename from owl-bot-staging/Run/v2/src/V2/Client/InstancesClient.php rename to Run/src/V2/Client/InstancesClient.php index e40256ad3c21..2145e20791cd 100644 --- a/owl-bot-staging/Run/v2/src/V2/Client/InstancesClient.php +++ b/Run/src/V2/Client/InstancesClient.php @@ -90,9 +90,7 @@ final class InstancesClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; private $operationsClient; diff --git a/Run/src/V2/Container.php b/Run/src/V2/Container.php index 50f99c57de60..2ffcd41a34c8 100644 --- a/Run/src/V2/Container.php +++ b/Run/src/V2/Container.php @@ -105,6 +105,12 @@ class Container extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.run.v2.Probe startup_probe = 11; */ protected $startup_probe = null; + /** + * Readiness probe to be used for health checks. + * + * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; + */ + protected $readiness_probe = null; /** * Names of the containers that must start before this container. * @@ -169,6 +175,8 @@ class Container extends \Google\Protobuf\Internal\Message * All other probes are disabled if a startup probe is provided, until it * succeeds. Container will not be added to service endpoints if the probe * fails. + * @type \Google\Cloud\Run\V2\Probe $readiness_probe + * Readiness probe to be used for health checks. * @type array|\Google\Protobuf\Internal\RepeatedField $depends_on * Names of the containers that must start before this container. * @type string $base_image_uri @@ -563,6 +571,42 @@ public function setStartupProbe($var) return $this; } + /** + * Readiness probe to be used for health checks. + * + * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; + * @return \Google\Cloud\Run\V2\Probe|null + */ + public function getReadinessProbe() + { + return $this->readiness_probe; + } + + public function hasReadinessProbe() + { + return isset($this->readiness_probe); + } + + public function clearReadinessProbe() + { + unset($this->readiness_probe); + } + + /** + * Readiness probe to be used for health checks. + * + * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; + * @param \Google\Cloud\Run\V2\Probe $var + * @return $this + */ + public function setReadinessProbe($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Probe::class); + $this->readiness_probe = $var; + + return $this; + } + /** * Names of the containers that must start before this container. * diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerStatus.php b/Run/src/V2/ContainerStatus.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerStatus.php rename to Run/src/V2/ContainerStatus.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateInstanceRequest.php b/Run/src/V2/CreateInstanceRequest.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateInstanceRequest.php rename to Run/src/V2/CreateInstanceRequest.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteInstanceRequest.php b/Run/src/V2/DeleteInstanceRequest.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteInstanceRequest.php rename to Run/src/V2/DeleteInstanceRequest.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetInstanceRequest.php b/Run/src/V2/GetInstanceRequest.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetInstanceRequest.php rename to Run/src/V2/GetInstanceRequest.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Instance.php b/Run/src/V2/Instance.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Instance.php rename to Run/src/V2/Instance.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesRequest.php b/Run/src/V2/ListInstancesRequest.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesRequest.php rename to Run/src/V2/ListInstancesRequest.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesResponse.php b/Run/src/V2/ListInstancesResponse.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListInstancesResponse.php rename to Run/src/V2/ListInstancesResponse.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StartInstanceRequest.php b/Run/src/V2/StartInstanceRequest.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StartInstanceRequest.php rename to Run/src/V2/StartInstanceRequest.php diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StopInstanceRequest.php b/Run/src/V2/StopInstanceRequest.php similarity index 100% rename from owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StopInstanceRequest.php rename to Run/src/V2/StopInstanceRequest.php diff --git a/Run/src/V2/gapic_metadata.json b/Run/src/V2/gapic_metadata.json index a17310d3cc5b..68d37bcf5427 100644 --- a/Run/src/V2/gapic_metadata.json +++ b/Run/src/V2/gapic_metadata.json @@ -48,6 +48,45 @@ } } }, + "Instances": { + "clients": { + "grpc": { + "libraryClient": "InstancesGapicClient", + "rpcs": { + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "StartInstance": { + "methods": [ + "startInstance" + ] + }, + "StopInstance": { + "methods": [ + "stopInstance" + ] + } + } + } + } + }, "Jobs": { "clients": { "grpc": { diff --git a/owl-bot-staging/Run/v2/src/V2/resources/instances_client_config.json b/Run/src/V2/resources/instances_client_config.json similarity index 100% rename from owl-bot-staging/Run/v2/src/V2/resources/instances_client_config.json rename to Run/src/V2/resources/instances_client_config.json diff --git a/owl-bot-staging/Run/v2/src/V2/resources/instances_descriptor_config.php b/Run/src/V2/resources/instances_descriptor_config.php similarity index 100% rename from owl-bot-staging/Run/v2/src/V2/resources/instances_descriptor_config.php rename to Run/src/V2/resources/instances_descriptor_config.php diff --git a/owl-bot-staging/Run/v2/src/V2/resources/instances_rest_client_config.php b/Run/src/V2/resources/instances_rest_client_config.php similarity index 100% rename from owl-bot-staging/Run/v2/src/V2/resources/instances_rest_client_config.php rename to Run/src/V2/resources/instances_rest_client_config.php diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/InstancesClientTest.php b/Run/tests/Unit/V2/Client/InstancesClientTest.php similarity index 94% rename from owl-bot-staging/Run/v2/tests/Unit/V2/Client/InstancesClientTest.php rename to Run/tests/Unit/V2/Client/InstancesClientTest.php index 9102fe3c891e..fd0d7213454d 100644 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/InstancesClientTest.php +++ b/Run/tests/Unit/V2/Client/InstancesClientTest.php @@ -58,7 +58,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return InstancesClient */ @@ -204,12 +206,15 @@ public function createInstanceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); @@ -310,8 +315,7 @@ public function deleteInstanceTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); + $request = (new DeleteInstanceRequest())->setName($formattedName); $response = $gapicClient->deleteInstance($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -367,17 +371,19 @@ public function deleteInstanceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); + $request = (new DeleteInstanceRequest())->setName($formattedName); $response = $gapicClient->deleteInstance($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -449,8 +455,7 @@ public function getInstanceTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); + $request = (new GetInstanceRequest())->setName($formattedName); $response = $gapicClient->getInstance($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -474,17 +479,19 @@ public function getInstanceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); + $request = (new GetInstanceRequest())->setName($formattedName); try { $gapicClient->getInstance($request); // If the $gapicClient method call did not throw, fail the test @@ -509,17 +516,14 @@ public function listInstancesTest() // Mock response $nextPageToken = ''; $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; + $instances = [$instancesElement]; $expectedResponse = new ListInstancesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setInstances($instances); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); + $request = (new ListInstancesRequest())->setParent($formattedParent); $response = $gapicClient->listInstances($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -546,17 +550,19 @@ public function listInstancesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); + $request = (new ListInstancesRequest())->setParent($formattedParent); try { $gapicClient->listInstances($request); // If the $gapicClient method call did not throw, fail the test @@ -637,8 +643,7 @@ public function startInstanceTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StartInstanceRequest()) - ->setName($formattedName); + $request = (new StartInstanceRequest())->setName($formattedName); $response = $gapicClient->startInstance($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -694,17 +699,19 @@ public function startInstanceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StartInstanceRequest()) - ->setName($formattedName); + $request = (new StartInstanceRequest())->setName($formattedName); $response = $gapicClient->startInstance($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -794,8 +801,7 @@ public function stopInstanceTest() $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StopInstanceRequest()) - ->setName($formattedName); + $request = (new StopInstanceRequest())->setName($formattedName); $response = $gapicClient->stopInstance($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -851,17 +857,19 @@ public function stopInstanceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new StopInstanceRequest()) - ->setName($formattedName); + $request = (new StopInstanceRequest())->setName($formattedName); $response = $gapicClient->stopInstance($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Build.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Build.php deleted file mode 100644 index 40a4c8b2cb899cd8df8f3489f25c05f87c6d7800..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2682 zcmb7GO>Y}T7-pU3Yn%_U5oBXgbx4ci1iGs_QbA4wvYVu>C?q6Rk&va;cs;ghVhiq}k8*mAWmgd)v@ZY;vqt zFC@8*rAX;`bc_X+sff08-pausKQ%6asTQ+FEsD58fk#QTI;v^p;wr<(A)}GJnav)f zVXIENq|dmxndx%^z;}-%>Cl@Q9@1>4-nhEwJnF#6MJ(zx_G2~4SEHjFe*aUJwYS!4 z<=xza2`}gPt8T2JpBB)aYew5%G77GqeHRjO`<2piW<_EKOQDcAi%=T6Q-ZdF*KcO{ zW(v2*EJF>V4;XNMP_GxNmym6hK(4thy%Bxsu%@qk5znK|6T*mi;c8Wj*B} z70j6!xjsaTnjU}=j(vS{ZfV~iU+()t#;#6ZnJ4=6)UrQEb1fbmQ;|8G)DAb_)Zvb{ z9XfjtEhbd-SwMXf1Uv;~riSTT_8uypaG^pe0&%9bNd0@*@k zc~~KYamV&f^}te{H3R4rb5EstR2(a}^lt$z>eNPfg55OCvSdA)jYPq*Y(Qm5sJ}g4&ElsqTuTsHwR*;=-9a{7Vc*g~ z`mOvf$U3e7E^VQeDr3SNV;S;MqgQm=C)#m^nb>r!-ul``6 zrE?`FF)%*0A7*>w=Zmd<7b~}iD2;8uo3kP8;lc=fy^Ly=XYCTQ$G)Esp;*)`>gpky zKey9rl$t3l*g2AbkG!ei8BIb#^}1so6+p$>-GoN7@{fh4^rR*BFBU3}m1sBCh9z9n z=u-K5MFZFBqaXkL>*vD5)d%W5a%LEAJ8Ng+ZFnIM%x&Rq3_J~gQcX11RIQED-tRSA z@ws8U;S&E*bGuT;N!9aCPEKAEdN4~}^9;HlheWoy=+%F-&@ycQWm(seMnk_l4yxb`7#*&kQxF^~fMnw4mj3;_7TttsYI)IT*=aCV{MitPfoEtZCAHlS2hjMbXy%D{j<6223e*ZF1934veOg>1Vv_20gfa{ za$!>}jWC1uHRYM{%HSR(H|Jonr~Qa}6@zmL%~+~FZlyo`_V=?9#> z=QvKHEb^lM7pX%w35SD&*9iGzFHNyt zK%n0chQD}nIu3lCW?lwAyFuy(AuQpIgI|ID8+_)CQx4gm#-2?=UvR-9!3=%A_X6jb zB6c^9pxQUMAY%yup!gvTGoFOrc-Z2pp9FChB^HD>8s|JKWfLQNFQ&^1xZn)$HOWp$DWBD{(Ae9ye!*;;Oqb7gvT?SFoXw0gbfh<O!=HX1F@L#w;5nH9e+mLwm&)|_FZ4PkfceIjgeh=NY9nB$b->@yB(>5h7<%SBw zx@o{^LQTW92s{}bWl4R2?#+f7foGj|#nespE>dPwZH;yTr=s3RcV?q@U)Kp~!Nl@T z8?D=g;5BsDCIiB#b8?MF6|E4)Oa@DDptWO-8Tn%CXqg&qQ>pCyT|t{y8=yWy_jR+^ z1KNyeHvIIB7HLyMmIWYvJ#(`>YNT+gvlAeZ4pBVx~5|EpO=gqwgSMU9F?9 zuSXQ~nrwr9Nc5wEX;s}tm>4=cvE<|tIe|W1Ul$2t*P`ZNHbj6;bVeN8)u264_FTZG z==re*Mld>V+hnc@t4Kb|EukRo_2AMG1_B6nqHKvl%d{QK1j(m^+i*IpQ^O(5(7K8u zAP1K28pJs^*^vu37eGUwl-oOh-9%gSdq91R9+Z7r+|!vsp~28P!UhB^DPJ7QK;DXA z01PP;{aRMH5CZ!Gny5=z5$!o7TGu(8RzK@R?!Q$bx8AoMvnSf+S{j7HN>HUu$_=un zK1Gjv)NrW*o5}z+Wo=-n+-9=R5TfZ09SFsy?(5PXb>LM4>03%wy^U@eCV0o{nkPMC zI0{l>kIWIYkEmrq@P-g`eo5FSFwjvpcm7;L+t&^N6%0<^61^{7vp`O$^JlZ^ibJ7q zyFyB;LxpBn>~pu+jb9+u0DHe9%!J(mD`O`Y%eaG=wkmolHWaE v9Kfd!+-&jbYx)0lRo)t}o|jkVxA_OamG1>{g9ZMAZv`2d-{>FFM}+internalAddGeneratedFile( - ' -– -#google/cloud/run/v2/execution.protogoogle.cloud.run.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/launch_stage.protogoogle/api/resource.proto#google/cloud/run/v2/condition.proto\'google/cloud/run/v2/task_template.proto#google/longrunning/operations.protogoogle/protobuf/timestamp.proto"I -GetExecutionRequest2 -name ( B$àAúA -run.googleapis.com/Execution"Š -ListExecutionsRequest4 -parent ( B$àAúArun.googleapis.com/Execution - page_size ( - -page_token (  - show_deleted ("e -ListExecutionsResponse2 - -executions ( 2.google.cloud.run.v2.Execution -next_page_token ( "q -DeleteExecutionRequest2 -name ( B$àAúA -run.googleapis.com/Execution - validate_only ( -etag ( "q -CancelExecutionRequest2 -name ( B$àAúA -run.googleapis.com/Execution - validate_only ( -etag ( "˜ - - Execution -name ( BàA -uid ( BàA -creator ( BàA - -generation (BàA? -labels ( 2*.google.cloud.run.v2.Execution.LabelsEntryBàAI - annotations ( 2/.google.cloud.run.v2.Execution.AnnotationsEntryBàA4 - create_time ( 2.google.protobuf.TimestampBàA3 - -start_time ( 2.google.protobuf.TimestampBàA8 -completion_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA4 - delete_time ( 2.google.protobuf.TimestampBàA4 - expire_time - ( 2.google.protobuf.TimestampBàA- - launch_stage (2.google.api.LaunchStage+ -job ( BàAúA -run.googleapis.com/Job - parallelism (BàA - -task_count (BàA8 -template ( 2!.google.cloud.run.v2.TaskTemplateBàA - reconciling (BàA7 - -conditions ( 2.google.cloud.run.v2.ConditionBàA -observed_generation (BàA - running_count (BàA -succeeded_count (BàA - failed_count (BàA -cancelled_count (BàA - retried_count (BàA -log_uri ( BàA - satisfies_pzs (BàA -etagc ( BàA- - LabelsEntry -key (  -value ( :82 -AnnotationsEntry -key (  -value ( :8:oêAl -run.googleapis.com/ExecutionIprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}R2± - -Executionsž - GetExecution(.google.cloud.run.v2.GetExecutionRequest.google.cloud.run.v2.Execution"DÚAname‚Óä“75/v2/{name=projects/*/locations/*/jobs/*/executions/*}± -ListExecutions*.google.cloud.run.v2.ListExecutionsRequest+.google.cloud.run.v2.ListExecutionsResponse"FÚAparent‚Óä“75/v2/{parent=projects/*/locations/*/jobs/*}/executions¼ -DeleteExecution+.google.cloud.run.v2.DeleteExecutionRequest.google.longrunning.Operation"]ÊA - Execution ExecutionÚAname‚Óä“7*5/v2/{name=projects/*/locations/*/jobs/*/executions/*}Æ -CancelExecution+.google.cloud.run.v2.CancelExecutionRequest.google.longrunning.Operation"gÊA - Execution ExecutionÚAname‚Óä“A"internalAddGeneratedFile( - ' -Ç -,google/cloud/run/v2/execution_template.protogoogle.cloud.run.v2\'google/cloud/run/v2/task_template.proto"ð -ExecutionTemplateB -labels ( 22.google.cloud.run.v2.ExecutionTemplate.LabelsEntryL - annotations ( 27.google.cloud.run.v2.ExecutionTemplate.AnnotationsEntry - parallelism (BàA - -task_count (8 -template ( 2!.google.cloud.run.v2.TaskTemplateBàA- - LabelsEntry -key (  -value ( :82 -AnnotationsEntry -key (  -value ( :8B^ -com.google.cloud.run.v2BExecutionTemplateProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/InstanceSplit.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/InstanceSplit.php deleted file mode 100644 index 7812488cf0b9f2ad76efdb95a2ba1d62b9a487ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1241 zcmd5+O>fgc5XGf@tprr=fk+k7P>Pxqa8S6Vw8%-^%2G(I*i>p|DRP`mx{|xQTCXb= z)PKQ=JAaZ3jO{dSXi+)hgTFNI&6{~M`{AQJmgFVuQ%+T+=@>?5ppPj?CA5e|0;6m) zp$cMgB3VL}1<>h3uOEQZaf25KO+}_++JvbP(}dRJL}cT-%6R>>QD;2W5s&FGl?l^U zK}raZPG~Bln8Lo-`b2d!j&v067x=K9a1U1cLKW* zx?EGmqa^ImG*(P%p*#$2Hm6k2`N2_!CJlQ7swM?r2YNfeaMp}jG z7MgCIHrBrx3w%nc{*uAzh^u4Yd4DD{W-?js{-x~&po-_R1^F62S?zv89<&Ie+uWpI&+JWN- zD~9=+gqyd-4x9tm$4o0rtt0Xb+kBIQEpwrOVr@L*s8-I#h2?0`R20VpT81YCS|~@` g#eH93nqM3zH;PRHq)$ diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Job.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Job.php deleted file mode 100644 index 5432791c1604bd972e2bd94f94ac6a54f677f132..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6807 zcmcIp&2t+`6<=AlW3~Jtx086H-DJnwu(5?bBFa_~6r7a4Y#bb0<&P8vs+t;&+VZSN zGqW=zIZnzPC@w5iap1-uz=b2lpTH$>f(xXIf&(Z1gq(QYJzt6?TQZQUSkk=r`n`Vd z_ddGkyU(m+3wlpQy`6mdey5czEbF+coAQApqorbQdqT?zqeB9R@Su-?OQ*`Y$SiCMC zDY`>I?jr9|$536(G(;+}Yp7&-MdWKz-uspbJ6soiGir3xu;Kca;S$?W^m>Ijs;ybB zY1e?YP-qc1a20*ByyB^)%V|gAGPki%xM1YE=-M3;)h>!QaXYs0gxO6OI1j$n`#7m+ zY4xIEnA8iV;S>ttp28&t36^z@8185?8yeA@C338EHPaqVbXx((AMd+Li;O0?M?5@@ zw7WgC<7!50cvVrr)yt;Q1UQ+-HRY?Xhzk1ud-(&>wsgqCYufSs$NMj|>u%yDF`A~m zPh9HA5x}*jwCgV)*5RXOLXw^hZ@VWss@S$^w4l5gU}k;SqE&0OYzUIP(&4hhTO5cU zXi&^trET?>Wp!okspeIYVzU_(jSVQG%R!pcqoO+dr;o?9+Ha+RNp`&?@wk`zai2VPq_$>wEGzw3x(x5K;{o1dz2~uNN;}tm zn1c`5VzBn;>0Wvd&G&#F0yJj^0R2D#>x$57a!n6~9^H>!KzDtpafZyVV<=U&2~-K_ zk9*{+4ge8LXwp(_K!6YvW6O!sy?++R-WLUYn?i+~46$}3=;ApL!&wxE)+~$xb22Y@ z96jigfUOjVW$*%;1YTKd3URhJdw2`YbfNu14=1u|=x4$>(55o$Xl9eRAnF^oipFW< z?==ezFe~#FN*!8s&BzL#sdQggntH)1YVj0KqZvil%~QFpIS!N!ZY!#B~ia|}i_iB4e9@;tVWQlWmwg1%1h z=V%-}?ts(cm+cuZqB(=Sa^;9B8qq|Cpj3rviTH7(NZ=qWOy} zgHOUd!t-ccv0Dykh(oed9OGpaCq@^bMj`XDzk0M^NL8czQn9I#s!kMJW=pWV<*D#K zf#MKL>i>wY6pD8s_ZhG#Uz{$`;>QJOybRoNPWS>%>Pmy?G)~lv`+dy-71B0is~WC- zhM%IO5>Boi7x%?L>sj_+~Qx^-9;Pqra?aK%L4O+HuYqG;i4VStxv=mQY zE;Ti@6nSN7HsMl<;iPV&8*E>uEg+C!agNhk28Sb8ZktUFdb=$oL)t8wRRxL0Cw~r#Z$oPMPaI)^A#o_dPtaUApz!R!32IsP$MFsl z=u{6;<3Mf70kd$MSyzA1*Sx?Jdj!tl1dgxVP5~ut0+y~SoeN2v?xdxcD4@88AUK?4KMLwbKnRM*M9@xGnsbW`O= zg4`Sb>p8uM03P^zz88y?FiLqPBM3z1A8~{)`Wxq>#jv#WzIYFP(r2g&Btf939MQUY zX*t4=&>X#7fuR60lvfDa`7Rd%Ezv?WaizdMnvZA!9Jn3cPG|Fvhr}K|W{%ZEGrwQ6~5W2;(8eFPn3q56Yr`H*uQmdn*@ z1qd;iky0UHqqwyVPsd;wnGc`t9q#OG?QEvvy^m|voeF(C-n)3YxKplf(`6>|U(cd( zXg&`9dkiJY{s@h~(Rcd+-J1&2cYU_VcrOL#&&u-`#eayQDSs5k z{YM9%?8l^k=t3?&PiORZMelgjvymY}a2@ae70?x&Vg{fqp!++y0$o4-5M2}+Y%`DY zs|-)@TN)xVA*S;9TWHFc8ZtzGgslY!ive2;=tFMp)dzVK0bKU~3%I{Qn(#xzfHdhj zQCw93ehwkJjS^ua2){W0lmL2D9%}z3m;+af;e((qd8(qsE6k}dbDm~KGY9T@ z0`1^b{QDTf2QZS+hjeCyivc)$<6xTg?7GO}TNj*AF5&d*&vRyRCG%_~2hxGD*E+B} zz45k)FU}u-E=tF)YdM8n?)3E33uAEOL&tXhUS^G6FCUq9yHrDqFc0_vk9LRB)N`{@ zqi;fLu^+B*3co^P*GDarz1)Gtp^bqhR^ti#+n9tZ@0yPu1ecqu{EbKC1qmHHG_}vm O5yr`1Vw|IMg#H6jHLAJ* diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/K8SMin.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/K8SMin.php deleted file mode 100644 index b596449b57ebbc28f44331d297edf77960eb90e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4262 zcmb7H(RSO$5j91LriP+qA$G#pIVlX=wcI#lLdT6w*-lAHmK8@fkEpn(IXnjk1eVlB zAQoCI*f2Tzi9YtF-_bwt2lNB_+Pvj8Po3QbC{luB#}6_H%)PraJ9B6D(O2PN2sg|f z5)keP;+g%4DGrGlaweF|e6t@9285d~8->&-ylR?TFU=P(56tbY-Gl20jabZG(lCdN z4SiB`eHME)9tX8?y>|27sh>`x@IICf&bm4kxc_CsN>TgapRB8f#XL6q33M}ao`Hd z0#gEB1}@pSV`@%mdoyI{=wmb8Nk{sQe)o0*L3rT!y)6>CoQ8t&4w^O^Ln5XTlW#We zB+E)VIxsi%9vh8wn|y2v9+TPCO_LK5^I%i$TN0d1pL!W_YKFA;loH=-kwa%p8E-UB zy*ed%6Lg;>2bPIaq4@L(O&o7}-qg>hc>EjFoymRPhJSqo*WY^X#(UbNs#2qhsZkx* zuYQ=|oRHRdvL~G<)-Q{&+-8ArC?=(`0*f+lDmgQ^v1}NyL`Tk$R2JmVR{p=u1>+%< zv`@CnJW^T5FQxh)su`D6+9w z`=kQOhpU-%SRj3Zn=WITa}kFLr1VzEJy_$!@$g)y>#V*NWB_<1B!L&%EU2uggLxlT z`%Xk`l?!&vX{D_E_!6KWQ{O{n7_iEk;{G_(hn6(kMJt&IdF$UfxSV-3+feZ7h+=?q zD!}(M*|MP3Zxn7j5PV`>f}$J7HuZd+x<%tdSWm+zzw{Z41SVl_qj>dGD9vI^kUt`m zqyWmWGjkXLelwoHYD8QVG8=blb23o7E!F>+N!wMX&&i}qeBz?2TK~ww`nk8pCKNQQ z_PzB9R{O8bTW~|a#j-^u;K>pwBvBQMxu$uHzre*Y;Ss8Sq7}7Yn|I+)?*M(JVb*;p z&)3|%6k!g!sY=n-C4Mz!hgvA>%bV@5rJ zWikrIMCpm#cB!7NecRG%i}Ev@xCi-Q5TVLS)7M+Q#p3zTT=OR~0? ztR|G_&G1B38mRu3*6e)h%C0m+aSJY;Jq65*<@ETpQY~BmL`lnvI95hsL_8XgR9UUo zKg$ex7PPvjaM*<*!lBDn%BaiBx(kKm>-%8r;dJ=zp8f5MZfCo_`*e4E>(T`T7529G zUheh#h<**dTV_!AY%qV*is&K$Ai=*R965edf} zN)i=~D^S+O$3i(0Mo5N@-+H|OOS-RFa3z^5ZIAfQ#74ON_$@c8v zptD0nQw_F?8cXpj0O5ux?J5R(4#_T#gLbE@tmX;6fW;vXT^vN-JVfp6ciMBP)(U`{ z8f;Zo$55WzoD{A36wetASW#Xc;+dk{s(I^8Lz^UfrtEYCC7qO8DHuB9);)kzt1OYk zxpAg#Djw@5teuI1+Nq?L#h6gv2RL;&!vO32qRd;0!l_bKlkdRtbi|P9l3qb<9GT?N zPRl(nzv^CW`^?3=&9q~w$>enoKBQ@8<%{gdOfq0PvKQ992%N- zfvbN7wkIp06TQn z9$Tg74$$fW6IXSh&wmxL)R*7vMFP3YAr@6XL2;JUIt8bt|UIt#S< z1aECPX&7BhP`U4@_EYk7QcJ^)@6yMU8V)e~I2_|UHOk=QNzF}Z@U4E9bI!@n&9C2W z7P*nJxE@51P(L7<_j{%jO)Wc6MX914?v)e&{8^6A7sw%`@Mbd?R&rX z7QgsqI0(^AbDsnxvN>_h?#Sc=Vulgr)SQ%Eo5%EhD#09>pYkx@ks)$5C)!+AS1}(_fvONVP(*(+UDA zqCf-IY@YjcuHw6ZJHAH(emTrTkN9qz4D6vtqsu`b+YtD{F}M5Va=;^^GwV{`9nqM3 zLI2`MWwWlcLjxDmi3Z;j|Hanv6Yu+iAx1pD#AQxc{)_}JjgAQy-d{q=V;c0KSOY+H z4nn~Jm&>TMP5Jzt&LY z-CTq}P%<^iS2YMhZP+NUYM>o@KxCp$6myk7&TRBVF<4z)4O(C=BjC%Fx4@-7(c2$p zwj-U`ddtXesqED|H}#G*F`-l^Nl`7do+os&#cHRXrrmNbHG_4KZCc4@o|2(VDU0cx zdc!FHJaOtYO&l$BL+g{Y4>VeLb$00eB%J9!Pf|b$RQ3_xCp;nlBl2|&8G=7US40Of z3T9!W*uMFyHS@Z)hCULPrw)XBV>M`1^#ob@rht|odn{GO5?%MuTxdsd!;{+ZG;R2O zR1D!#Ee7qzm;o!UVvLYn;`D?B#;mXmFQaR0K+i0f_yl^YaRpWvDqXblh9xWn_9pl) zDkhDRfi<%mrN)|eXd*ppiC1_Py%&(@+{&CRtSMF~TG^F{CZdVEmk%9YL5o9Ztk9x~ zMFW2%9bUlK&=qLhedTK9uS;klISay*y`R}vtyz2>&BmT9p~bdbSw*O?rVU^ksbyAe zJV0~4-6cMQc!?NnPK`nBv6S5lcr;S@N2p|qn@ZQ*p;i68{uH4x~-cH?B#mZYAooOq-_i zv696NgodGG*^WaPGZrQCMlSMM=(MC12IfDtpTh(QTm}Q36)BpqfFhkZg4%XQMg=ro z#Z@#f?gZG?cu%VSFj1XeX41bzZE3HCH8ci>xDJ@2FcCC!+k;V=8Sl&V$~O_l2qlI; zMe{@I$I#ylECC-S2Tw%fnUukg&?Mf3a{zvT zmcadJ6iQVmWMr%eAKIV1Zrw!d^6ZmSrfo@Cb4LK^7i5Hg1`MVy)B@WF#t&uG%v|I3 z%|8J--02{5@?f}?A$8(7^~8oMy|5G)M_vTh($wN5{Y--(#{4kcj;MRB^|~v zq^VOb*g&O-h#c``mfisQ1y#X6mp7~?KxTYA{f3p80-ERp+7$sKu9YD-6I5$*TSoIf z?OSo=8SAjBxv-2D8H9$xNWrY|1v7qpZj6DhGpGfT3U;q2Cj61{iP*;bXi1ltm@%M> z8=c#*QEF6kLz>XDF12F`QFd>k#elld&!A^G@U$^Dq@ML$Jzs+4u@;14SnG$e^@76N z2(H+T0~cy=WVs%*yFT>1yV8@nSFHk&#-ks6Qz$@NoR_o;=X?gcItI`*WIu7zrSctA z%CI{wp;?i^vg_kTbQQW%tlDp}IkQzLH_-JrdHh|NCjU?C>#36iJ^*U?HAIEgU+Q1u zy06m_){>v&x-Jx0)4#^)yBF3V{pAyQd{ij3O?1PW8n(t?=20=ZFou6OgG!k>2zPGh z-b_YB_xtkn0iyD!!arNGSO4Z8|Ni~V2ycnk`b#lfZKrNmGwxQ;y{u-utB$|g#`oWe zJ)_YHk?&?!pM?Kb9A5*Pl*Zs&xre8*-mZ@8)hhnO3|gF+q;USIFd>r!Ccj4B5LJU& z<~WX*d0?Cea}VA?kA zm=Dx(+rL7q@D9nV*7jmj--qHO(_!JOO*IRsCyac)^r?LA!3p9cS{#Jk n`|@vh4hn?Rd$-d!@2BcxQs&!}XbGN^^W8~Gs_#Q%G)CyZ&gG&m diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/RevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/RevisionTemplate.php deleted file mode 100644 index 3a7cabd458af03e96548bc304d473e2eab80abbf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2426 zcmb7GT~8ZF6s<$U$2bt;6m>%i8UkvJTGooIw#bxJHeZQS0s_QCRrxsymVPh!zLuWlhk1ELf@Nu|zG zCG;1<@D;|bfK#kA(ePu9D~}7VISKeXC}tbCNuU^r+{CtHK{e!t6T*?8th|n`W`bP{ zB^1Anvz(3-KfsITOQBgLNYLD6ibg!tGCBrmt=3_B=wkAh@_HIJk>hP#wmH^nHGCE~ibJ0<^7a2BWH-^E5KIT(RA2*)!v}<+WA2w+p=D9qyH8J@q z`sW_{?lT6t^w5G`GxaV^z1y!YK1vlx$YBGlwRZ3qSMtO!HkI4sB89ByLHfoePo*}c z(B%|rmI{Wm;-_BN|3CR}2F+jJo6?VHI$KMpfD7fB#_GTI!u$FXdYt5MB_Va?!p>JR zdTAd`2BgIT<=nv&IQJ)xsPV*=uoj!}^aA(MTTLOByg?5Ep_ z)knlJ#TuGY6c%1|oG+oCVs-7KYNr-!v-ugJen>q+DO1XsH1y?M`gus}24#sAG^Kfu z$yhtnhV>|8WzBH2!L)>L(0#?CKBp{+CS#$U8RNcjr3zo~1q;?X5e8mQ(4TO8-EnI9kjc|ayi2V^W zr9H5M#!&>?1Lr;{-nHSj(7nt;D7x#+!@r7EoSXEi_4*KSmP`=7nkz)>OKQdtI+9f2 zJTNX)a|QQ?g+k^q<|(yqm^Q?V8zEFT*1r5xc-dk)C6n`~hGhxOD;UV6OQhXSPWixj z2+V04=m}crG7{*nN4tz(cs^I86)@lVYJ}NFvqJg|PDa2eJW|eriM*0q+-pFdra&8_ zf|fdA?7frl)PYleEPQCuU=+$3hI;YE--W{B1}cv2dZ~yel6f!(rZkK0_DK*kI2~|r zYIimZi&Zp#eVaeUX<)SMeKe`Y@91kdT6rZl7OtNr^MD)|-mKegv3JkhypA-VUtnO9 nk1(+aTU+LPYtroY4^M}W#`pH+9((9N_{bZieTpy9B|`rLeb^TP diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php deleted file mode 100644 index 0134f596fa4b..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Service.php +++ /dev/null @@ -1,143 +0,0 @@ -internalAddGeneratedFile( - ' -‡( -!google/cloud/run/v2/service.protogoogle.cloud.run.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/launch_stage.protogoogle/api/resource.protogoogle/api/routing.proto#google/cloud/run/v2/condition.proto+google/cloud/run/v2/revision_template.proto(google/cloud/run/v2/traffic_target.proto)google/cloud/run/v2/vendor_settings.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"® -CreateServiceRequest2 -parent ( B"àAúArun.googleapis.com/Service2 -service ( 2.google.cloud.run.v2.ServiceBàA - -service_id ( BàA - validate_only ("³ -UpdateServiceRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA2 -service ( 2.google.cloud.run.v2.ServiceBàA - validate_only ( - allow_missing (BàA"† -ListServicesRequest2 -parent ( B"àAúArun.googleapis.com/Service - page_size ( - -page_token (  - show_deleted ("y -ListServicesResponse. -services ( 2.google.cloud.run.v2.Service -next_page_token (  - unreachable ( BàA"E -GetServiceRequest0 -name ( B"àAúA -run.googleapis.com/Service"m -DeleteServiceRequest0 -name ( B"àAúA -run.googleapis.com/Service - validate_only ( -etag ( "¤ -Service -name ( BàA - description (  -uid ( BàA - -generation (BàA= -labels ( 2(.google.cloud.run.v2.Service.LabelsEntryBàAG - annotations ( 2-.google.cloud.run.v2.Service.AnnotationsEntryBàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA4 - delete_time ( 2.google.protobuf.TimestampBàA4 - expire_time - ( 2.google.protobuf.TimestampBàA -creator ( BàA - last_modifier ( BàA -client (  -client_version ( 9 -ingress (2#.google.cloud.run.v2.IngressTrafficBàA2 - launch_stage (2.google.api.LaunchStageBàAK -binary_authorization ( 2(.google.cloud.run.v2.BinaryAuthorizationBàA< -template ( 2%.google.cloud.run.v2.RevisionTemplateBàA8 -traffic ( 2".google.cloud.run.v2.TrafficTargetBàA9 -scaling ( 2#.google.cloud.run.v2.ServiceScalingBàA! -invoker_iam_disabled (BàA! -default_uri_disabled (BàA -urls ( BàA - iap_enabled (BàAT -multi_region_settings ( 20.google.cloud.run.v2.Service.MultiRegionSettingsBàA -custom_audiences% (  -observed_generation (BàA? -terminal_condition ( 2.google.cloud.run.v2.ConditionBàA7 - -conditions ( 2.google.cloud.run.v2.ConditionBàAB -latest_ready_revision! ( B#àAúA -run.googleapis.com/RevisionD -latest_created_revision" ( B#àAúA -run.googleapis.com/RevisionG -traffic_statuses# ( 2(.google.cloud.run.v2.TrafficTargetStatusBàA -uri$ ( BàA - satisfies_pzs& (BàA% -threat_detection_enabled( (BàA; - build_config) ( 2 .google.cloud.run.v2.BuildConfigBàA - reconcilingb (BàA -etagc ( BàAI -MultiRegionSettings -regions ( BàA -multi_region_id ( BàA- - LabelsEntry -key (  -value ( :82 -AnnotationsEntry -key (  -value ( :8:^êA[ -run.googleapis.com/Service:projects/{project}/locations/{location}/services/{service}R2Í -Servicesý - CreateService).google.cloud.run.v2.CreateServiceRequest.google.longrunning.Operation"¡ÊA -ServiceServiceÚAparent,service,service_id‚Óä“7",/v2/{parent=projects/*/locations/*}/services:serviceŠÓä“-+ -parent!projects/*/locations/{location=*}à - -GetService&.google.cloud.run.v2.GetServiceRequest.google.cloud.run.v2.Service"oÚAname‚Óä“.,/v2/{name=projects/*/locations/*/services/*}ŠÓä“., -name$projects/*/locations/{location=*}/**Õ - ListServices(.google.cloud.run.v2.ListServicesRequest).google.cloud.run.v2.ListServicesResponse"pÚAparent‚Óä“.,/v2/{parent=projects/*/locations/*}/servicesŠÓä“-+ -parent!projects/*/locations/{location=*}’ - UpdateService).google.cloud.run.v2.UpdateServiceRequest.google.longrunning.Operation"¶ÊA -ServiceServiceÚAserviceÚAservice,update_mask‚Óä“?24/v2/{service.name=projects/*/locations/*/services/*}:serviceŠÓä“64 - service.name$projects/*/locations/{location=*}/**à - DeleteService).google.cloud.run.v2.DeleteServiceRequest.google.longrunning.Operation"„ÊA -ServiceServiceÚAname‚Óä“.*,/v2/{name=projects/*/locations/*/services/*}ŠÓä“., -name$projects/*/locations/{location=*}/** - GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"E‚Óä“?=/v2/{resource=projects/*/locations/*/services/*}:getIamPolicy“ - SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"H‚Óä“B"=/v2/{resource=projects/*/locations/*/services/*}:setIamPolicy:*¹ -TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"N‚Óä“H"C/v2/{resource=projects/*/locations/*/services/*}:testIamPermissions:*FÊArun.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBT -com.google.cloud.run.v2B ServiceProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php deleted file mode 100644 index 2b1ce742f014..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Status.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - ' -Ñ - google/cloud/run/v2/status.protogoogle.cloud.run.v2"; -RevisionScalingStatus" -desired_min_instance_count (BS -com.google.cloud.run.v2B StatusProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Task.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/Task.php deleted file mode 100644 index a2051a018d3e75233e1f79cbea99baa688115784..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4099 zcmbVP&2JM&6t6K!@G}Wy`N(1*Yyy-d1zR$eK&C0ON%$yVX%gj7Sz4`kC(e-d&UR z!1W!@t#w4h8?f*%j9Wf+EiN2^|E^JP(|`)<`1Cc}yl8DYJ|_tLPjvA~Le%%G`W%tW-xg ztvPLDt@eSDi!SJUZz(2ja_MHA-@CFGy7OfE> zXwW_a%~|v;#h6S-GCqT@Q%n=#bi&~sUk%;n8pcF?h^Z>bZ+%IVkgj`P7QqiOr{}Vm zlM#3Wewl*lk0-NnM(>wZvX?R0%iU^eDgikm#VR0!O{ae8O5et&j3~R6gj6DMp-&)6 z;wIU;nrx|)(z4>F!I22f3=-PD%gY@aBqH;JM7rvpZJu0oBAPm{>K4|5ikIAGvY)z> z?Thrv5`mP6D0C~b8pK?0%-)BIM?}c7wo1N@@tTcWa9q|!GiT-I3XLmo>&M>JFTj*! zR2z(B@-i0RibTzRmxI&KC|4?Ys-ps;_EsS-?ZAL&TVa5n1XvT9BVBRxc#RABc~# z^uU;cQvul(cHe2zg2L?Y<8WL_Odg;l|F)htPD4JXo-(!2P%BdaZQZgk%apx&y-|Zv z-)Rw_qq)+Q>xY_Bex~G>0}<_M>=G26{pxCtCQR zR!gatG-%3Mp6j#kzyx=)ZsO*I3YF>flKabI89SL4Gj76Im-#W)ck`42 zTpS44P%_3DD0ZA(8z+Q_BH}a}H)1Tnn2ahG3v*J@k)>J|SZVK(sm4jvr7p1@*JUvl z2t#^kJce_b(>4jZG-5$V){nEeJyD$>XjSI=@;<;Yp%@Y5!KFTSO7k4zPo(iI`Oz($ zo992yj~3HF3(l~Xv>WrFFU6-&b&}!+jL^U%yQYb2BN}xU#xzl$d0~I`F`U6cQrM0V zq!S9{lE=O|103su5wlRfhiDk(JPRj^!z8Fl5` z9iAx7%Ju_^VNb~(h8lE3S6&6-+`O!87#uMhp<7o{nQuO8+i^rqOC72zUI^g#1Mq515Aq9xJztldE}6oi;Pj;}U739jC378 z*6pWIJ9al$s>12_3+jJiYCHeb#i8BO*ub24g#_@*o8+rk@tLcK=gOP(vsb}-fin2p zt7M6R3)y#1J!Ei2Ho4wvF4wSN+Wsg4kWyAe z4hTtQv(Nsjs|n@%KmY#m*nMMBzUtn{k!3L>ccG8e1A@J> zo3s67z9|h()IKpigv`G9tDX!(2aMIT(Gko|ZoBmGx4Q9R5BQ^A-V!3@wMu1YXXpKN zcVe-npTM_5-w~TE>NLKFDQvcb?x9hT9IwbX=SuFIdCk6_`_#V=;d(Z>;7n>z07XSbN diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TaskTemplate.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/TaskTemplate.php deleted file mode 100644 index 253ebfc4ce8ef4cce225b0099c72937e939ef6f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1725 zcma)7T~8B16t$utgCDVmSW(F!M%qMoV|~yR(X@bQ3?BhPqS<6KoxLp+wlkZV*~Vgc z_h6#2JI@ot$H`Qen_X;*kgs%%<^NwFwnk0Pk%6L5?3rKAer0*;WP2o`iT`Zt(ny@qds4yb` z|Izm=b-HMK4$R;||{X5LSLpX8I~laZoFl9pU~&!jZ$Y zrhYU_<#{sKV_!mSU@ed~MN8GI?=O{oGGj##RB9_%@Ta-@y`j?Z0^TsmT;~C~WkB}@ zhmdiuQfVt!kvN$RcycsAbVkg<7A$mQOUn;^L! zBu?)H29+6i){|e&WwPW%PI{&g#b}L(i_l-s22?;!G^0OoX`JnSZEc&czCq2*C3BPRJEjD%tB7^2E` zl)L7z?@QlGrPeH&DUxYXvKaoC-1B1tuFQnYc_=}PYIYQ3&h zP(OwT_yWF;C&qS~HngZb;s@U}=ggToGyDF7JeKGM?omz^(R7BVXILLoES1nA5D}gx zVMrAY#EE1PRTjpb0qzex>~vi3IY48PsDRe-T!?u@t3f1^Syd&xdRnV$MZ%B;6HU~d zYAYi}h?5f?XbtG)y}I zUGQD5sp2H^J2VaylUk@Dgx2d&+OmJ?pK@i9Hl<@BF6SES^=l%VSgV9y&5p66I#Ill z=}rmGmv8$JA>%|MS<3^Vu9hCY+DXkerKxc1h%0cEWq>?jfe_$s&uIJ1WCD|*Ue_%5yi z$AcFBWj{mPX~LX~NETZ#qt($O&U}LINeY9>b#Waao908buF1T(k>YoL8fa@J;~2&$ ziT^*Psq93t;$|v)@4JDvS7iUuC=2a*BfHym+Y`?o^&D?v9~=zYw&xD|6YulTnSAPx zhfdq=x=yEX$E={2x5OXVo-_6ehWQHlrCVZ0&Y?SoOog@95qb)4++=jiTqz*iuAy;M z$w%m7GQi2X$W9S(77h|{T233;eR?-LM&6Z{gZnz)qAN@H*M-X>^W8W{=Lr1<&5@7> diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/VendorSettings.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/VendorSettings.php deleted file mode 100644 index f346e1785e73f5800d77679f4fcc8c7e1d5725cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3198 zcmb7GTXWh*6b|4x@o{1kITzwIjZBgnyD2p8B-6olI|5{f1`7(9)E%apMJ!l}SZQ>j zaWa1BTmMSmI@ABs=g#ykKf%+7o?QuS6FYHvKpO2i-=6Dt&NtsVdk)-}w%wjha4>#rpAs*{G25FawYmkmM~0^D=JQ8h z9f6#sTBlJ0Pt_8k_~KhLa$Mw95V-O*e4Y3f) z%VGiNiX(Yx1Ey&o;k{HGHRskck?09qvg6D6n=0fBiNBSYR0D}o{}L9WF(;ME;4pZvl8gXLP{Lp9zh+22(!ihh~JI z(m#lRg_cW;aI;k_>grZqZ8Y>9tx;2p<;}8MN?wrWVOFVB^k!Yz+$_oYjOPf;@y&$ED;|pA&-qGVpw}XBy&ik;KsD z!Zn!Zs0jH+A5gTgn{L2-oeoV8&1@LR4y-TT18HC~Odd8Sw!d!J0Sk@37zUFIkk^v} zJldf^T7}sLb%&-wx2d-$J%uUcw7n=%nM36v+>dhPg<{^MXIwA+dmQE>oO9duJzViZ zKlFj!r6Q}+($HmZHd&#AGWQhOP03Va#fc$T8x zM^fkzY(H_Bx_ESeT|*h^SX9TBum^ln>Vbpv7Ws-NFzitYbH~|?x;meIsY?Q2+@>FK z<|rr9&v1jXq3POeK$))(iEHx9z0_sFjrmi#@mM^w>XCM9q^vUE-4DwZqZ750jtLS? zJ2Q56aUE`-sV~h!;uYNw6D3`Ri$h`sG-Qr^{Oj22pD~y#GePoAm-LWZkR|S5`3ky> zm~o2F3s`X?7>+$-etX9?3 z0(=|_89&6(D_<2 zzUshTl^O27!|#7i_mO9#a#qBGC4C8xRIOOwtqDV(tGjw#ZB>id_Gp(<6p!~tQ4M9d zt(y7*ZMXuL8_#x{rRoa}+2P+f+`?IYS|Jq{POgb!Z>zinternalAddGeneratedFile( - ' -þ& -%google/cloud/run/v2/worker_pool.protogoogle.cloud.run.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/launch_stage.protogoogle/api/resource.protogoogle/api/routing.proto#google/cloud/run/v2/condition.proto(google/cloud/run/v2/instance_split.proto)google/cloud/run/v2/vendor_settings.proto7google/cloud/run/v2/worker_pool_revision_template.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ä -CreateWorkerPoolRequest5 -parent ( B%àAúArun.googleapis.com/WorkerPool9 - worker_pool ( 2.google.cloud.run.v2.WorkerPoolBàA -worker_pool_id ( BàA - validate_only (BàA"ã -UpdateWorkerPoolRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA9 - worker_pool ( 2.google.cloud.run.v2.WorkerPoolBàA - validate_only (BàA - allow_missing (BàA -force_new_revision (BàA"Œ -ListWorkerPoolsRequest5 -parent ( B%àAúArun.googleapis.com/WorkerPool - page_size ( - -page_token (  - show_deleted ("i -ListWorkerPoolsResponse5 - worker_pools ( 2.google.cloud.run.v2.WorkerPool -next_page_token ( "K -GetWorkerPoolRequest3 -name ( B%àAúA -run.googleapis.com/WorkerPool"x -DeleteWorkerPoolRequest3 -name ( B%àAúA -run.googleapis.com/WorkerPool - validate_only (BàA -etag ( "Ê - -WorkerPool -name (  - description (  -uid ( BàA - -generation (BàA@ -labels ( 2+.google.cloud.run.v2.WorkerPool.LabelsEntryBàAJ - annotations ( 20.google.cloud.run.v2.WorkerPool.AnnotationsEntryBàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA4 - delete_time ( 2.google.protobuf.TimestampBàA4 - expire_time - ( 2.google.protobuf.TimestampBàA -creator ( BàA - last_modifier ( BàA -client (  -client_version ( 2 - launch_stage (2.google.api.LaunchStageBàAK -binary_authorization ( 2(.google.cloud.run.v2.BinaryAuthorizationBàAF -template ( 2/.google.cloud.run.v2.WorkerPoolRevisionTemplateBàA@ -instance_splits ( 2".google.cloud.run.v2.InstanceSplitBàA< -scaling ( 2&.google.cloud.run.v2.WorkerPoolScalingBàA -observed_generation (BàA? -terminal_condition ( 2.google.cloud.run.v2.ConditionBàA7 - -conditions ( 2.google.cloud.run.v2.ConditionBàAB -latest_ready_revision! ( B#àAúA -run.googleapis.com/RevisionD -latest_created_revision" ( B#àAúA -run.googleapis.com/RevisionN -instance_split_statuses ( 2(.google.cloud.run.v2.InstanceSplitStatusBàA% -threat_detection_enabled (BàA -custom_audiences% (  - satisfies_pzs& (BàA - reconcilingb (BàA -etagc ( BàA- - LabelsEntry -key (  -value ( :82 -AnnotationsEntry -key (  -value ( :8:êA~ -run.googleapis.com/WorkerPoolAprojects/{project}/locations/{location}/workerPools/{worker_pool}* workerPools2 -workerPoolR2¾ - WorkerPools˜ -CreateWorkerPool,.google.cloud.run.v2.CreateWorkerPoolRequest.google.longrunning.Operation"¶ÊA - -WorkerPool -WorkerPoolÚA!parent,worker_pool,worker_pool_id‚Óä“>"//v2/{parent=projects/*/locations/*}/workerPools: worker_poolŠÓä“-+ -parent!projects/*/locations/{location=*}Ï - GetWorkerPool).google.cloud.run.v2.GetWorkerPoolRequest.google.cloud.run.v2.WorkerPool"rÚAname‚Óä“1//v2/{name=projects/*/locations/*/workerPools/*}ŠÓä“., -name$projects/*/locations/{location=*}/**á -ListWorkerPools+.google.cloud.run.v2.ListWorkerPoolsRequest,.google.cloud.run.v2.ListWorkerPoolsResponse"sÚAparent‚Óä“1//v2/{parent=projects/*/locations/*}/workerPoolsŠÓä“-+ -parent!projects/*/locations/{location=*}µ -UpdateWorkerPool,.google.cloud.run.v2.UpdateWorkerPoolRequest.google.longrunning.Operation"ÓÊA - -WorkerPool -WorkerPoolÚA worker_poolÚAworker_pool,update_mask‚Óä“J2;/v2/{worker_pool.name=projects/*/locations/*/workerPools/*}: worker_poolŠÓä“:8 -worker_pool.name$projects/*/locations/{location=*}/**ï -DeleteWorkerPool,.google.cloud.run.v2.DeleteWorkerPoolRequest.google.longrunning.Operation"ÊA - -WorkerPool -WorkerPoolÚAname‚Óä“1*//v2/{name=projects/*/locations/*/workerPools/*}ŠÓä“., -name$projects/*/locations/{location=*}/**“ - GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"H‚Óä“B@/v2/{resource=projects/*/locations/*/workerPools/*}:getIamPolicy– - SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"K‚Óä“E"@/v2/{resource=projects/*/locations/*/workerPools/*}:setIamPolicy:*¼ -TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"Q‚Óä“K"F/v2/{resource=projects/*/locations/*/workerPools/*}:testIamPermissions:*FÊArun.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBW -com.google.cloud.run.v2BWorkerPoolProtoPZ)cloud.google.com/go/run/apiv2/runpb;runpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/GPBMetadata/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php deleted file mode 100644 index ed68845a192c4dcc9ab5b1d2a03498ad2ac46bde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2198 zcmbVNT~8ZF6sg#rJoWDEt}$iZ((+&szUSO?KhB*WevC&k+QbJ;FhvXtaes=|!c>l99x>%&ymy4(9-ZR-z1OE30M#;4l(q0s%3;KsG?Gc!REcO#yyknU z&Y22gDWgEK3D;bTz_4)~K`z(kKuC}=(=nk8AN0D1%#e^6;vZN#e>bJ`j}zgad2NJf zM6|}gSlS-29_OT|IVbuRVfcxYe#9x(h8XzunCpNGZa9hf2Pkm|4@jgL&|QxmB!U`H ziBrIlpscZlGtM;jaasxB3w6D;OVAfQ^jK=RVuI58ZtBMZTg?aR-QJc z;{)8tG`3pTMDAdt5;mV5W5rCOMBD042`*-T`6a#U#N2<$Srm5Jh)lRtt=45#mn4gz z$1ET1jZyQ%^51Nq9CC5YJ0y2C|pHI>Q{xp>~eXUhsTsoiLmY z=_PD=W7gKR$xqPl2tEIw>s`B_0bT107kuGPy!wNjjl{gE@-}C7sBe@dI^Wjrn2S7Q zt1M(!Ia{^jV~xTX?Ba_1byll_t20^SVD<^u91^+FgQ-wRfmWgpjG9 zrO?ijrTyu@(snK>=D43DG>K_IC}mnZpF){cZ@rZIET$bBm5KTieXg0BaLQ7!OoVZ6 z+a_7b9$YIa4B>EDwX8V zI;&R0Hy=BjXv1#Z`B>*Pvr+A)0QrVZYi;ydQ3RwNId^RRxHRucR_!6gWyuM`SCgk# zUQ#``+e}<}adt9rcrF1&hMzu9`dqSdwfkD7kty|lbx`*!leLw#V)5T~# z_(xIQA^HNWSyp2AtHlPiXS7#&x0UrI^SSl-P};X0773nrxB+p$Z9n_Vw(H+LnVrt3 V+50v3+%0_SY-IKzU7!nu{sO;J)VBZt diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php deleted file mode 100644 index c0169d3c5d71..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BinaryAuthorization.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.run.v2.BinaryAuthorization - */ -class BinaryAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If present, indicates to use Breakglass using this justification. - * If use_default is False, then it must be empty. - * For more information on breakglass, see - * https://cloud.google.com/binary-authorization/docs/using-breakglass - * - * Generated from protobuf field string breakglass_justification = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $breakglass_justification = ''; - protected $binauthz_method; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $use_default - * Optional. If True, indicates to use the default project's binary - * authorization policy. If False, binary authorization will be disabled. - * @type string $policy - * Optional. The path to a binary authorization policy. - * Format: `projects/{project}/platforms/cloudRun/{policy-name}` - * @type string $breakglass_justification - * Optional. If present, indicates to use Breakglass using this justification. - * If use_default is False, then it must be empty. - * For more information on breakglass, see - * https://cloud.google.com/binary-authorization/docs/using-breakglass - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If True, indicates to use the default project's binary - * authorization policy. If False, binary authorization will be disabled. - * - * Generated from protobuf field bool use_default = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUseDefault() - { - return $this->readOneof(1); - } - - public function hasUseDefault() - { - return $this->hasOneof(1); - } - - /** - * Optional. If True, indicates to use the default project's binary - * authorization policy. If False, binary authorization will be disabled. - * - * Generated from protobuf field bool use_default = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUseDefault($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. The path to a binary authorization policy. - * Format: `projects/{project}/platforms/cloudRun/{policy-name}` - * - * Generated from protobuf field string policy = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getPolicy() - { - return $this->readOneof(3); - } - - public function hasPolicy() - { - return $this->hasOneof(3); - } - - /** - * Optional. The path to a binary authorization policy. - * Format: `projects/{project}/platforms/cloudRun/{policy-name}` - * - * Generated from protobuf field string policy = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. If present, indicates to use Breakglass using this justification. - * If use_default is False, then it must be empty. - * For more information on breakglass, see - * https://cloud.google.com/binary-authorization/docs/using-breakglass - * - * Generated from protobuf field string breakglass_justification = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBreakglassJustification() - { - return $this->breakglass_justification; - } - - /** - * Optional. If present, indicates to use Breakglass using this justification. - * If use_default is False, then it must be empty. - * For more information on breakglass, see - * https://cloud.google.com/binary-authorization/docs/using-breakglass - * - * Generated from protobuf field string breakglass_justification = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBreakglassJustification($var) - { - GPBUtil::checkString($var, True); - $this->breakglass_justification = $var; - - return $this; - } - - /** - * @return string - */ - public function getBinauthzMethod() - { - return $this->whichOneof("binauthz_method"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php deleted file mode 100644 index 6c756d34055e..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildConfig.php +++ /dev/null @@ -1,388 +0,0 @@ -google.cloud.run.v2.BuildConfig - */ -class BuildConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The Cloud Storage bucket URI where the function source code is located. - * - * Generated from protobuf field string source_location = 2; - */ - protected $source_location = ''; - /** - * Optional. The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * - * Generated from protobuf field string function_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $function_target = ''; - /** - * Optional. Artifact Registry URI to store the built image. - * - * Generated from protobuf field string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_uri = ''; - /** - * Optional. The base image used to build the function. - * - * Generated from protobuf field string base_image = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $base_image = ''; - /** - * Optional. Sets whether the function will receive automatic base image - * updates. - * - * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_automatic_updates = false; - /** - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the Cloud Run function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * - * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $worker_pool = ''; - /** - * Optional. User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $environment_variables; - /** - * Optional. Service account to be used for building the container. The format - * of this field is - * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * @type string $source_location - * The Cloud Storage bucket URI where the function source code is located. - * @type string $function_target - * Optional. The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * @type string $image_uri - * Optional. Artifact Registry URI to store the built image. - * @type string $base_image - * Optional. The base image used to build the function. - * @type bool $enable_automatic_updates - * Optional. Sets whether the function will receive automatic base image - * updates. - * @type string $worker_pool - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the Cloud Run function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * Optional. User-provided build-time environment variables for the function - * @type string $service_account - * Optional. Service account to be used for building the container. The format - * of this field is - * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The Cloud Storage bucket URI where the function source code is located. - * - * Generated from protobuf field string source_location = 2; - * @return string - */ - public function getSourceLocation() - { - return $this->source_location; - } - - /** - * The Cloud Storage bucket URI where the function source code is located. - * - * Generated from protobuf field string source_location = 2; - * @param string $var - * @return $this - */ - public function setSourceLocation($var) - { - GPBUtil::checkString($var, True); - $this->source_location = $var; - - return $this; - } - - /** - * Optional. The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * - * Generated from protobuf field string function_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFunctionTarget() - { - return $this->function_target; - } - - /** - * Optional. The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * - * Generated from protobuf field string function_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFunctionTarget($var) - { - GPBUtil::checkString($var, True); - $this->function_target = $var; - - return $this; - } - - /** - * Optional. Artifact Registry URI to store the built image. - * - * Generated from protobuf field string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * Optional. Artifact Registry URI to store the built image. - * - * Generated from protobuf field string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * Optional. The base image used to build the function. - * - * Generated from protobuf field string base_image = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBaseImage() - { - return $this->base_image; - } - - /** - * Optional. The base image used to build the function. - * - * Generated from protobuf field string base_image = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBaseImage($var) - { - GPBUtil::checkString($var, True); - $this->base_image = $var; - - return $this; - } - - /** - * Optional. Sets whether the function will receive automatic base image - * updates. - * - * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableAutomaticUpdates() - { - return $this->enable_automatic_updates; - } - - /** - * Optional. Sets whether the function will receive automatic base image - * updates. - * - * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableAutomaticUpdates($var) - { - GPBUtil::checkBool($var); - $this->enable_automatic_updates = $var; - - return $this; - } - - /** - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the Cloud Run function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * - * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getWorkerPool() - { - return $this->worker_pool; - } - - /** - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the Cloud Run function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * - * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool = $var; - - return $this; - } - - /** - * Optional. User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * Optional. User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - - /** - * Optional. Service account to be used for building the container. The format - * of this field is - * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. Service account to be used for building the container. The format - * of this field is - * `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php deleted file mode 100644 index 55c736e08086..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/BuildInfo.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.run.v2.BuildInfo - */ -class BuildInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Entry point of the function when the image is a Cloud Run - * function. - * - * Generated from protobuf field string function_target = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $function_target = ''; - /** - * Output only. Source code location of the image. - * - * Generated from protobuf field string source_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $function_target - * Output only. Entry point of the function when the image is a Cloud Run - * function. - * @type string $source_location - * Output only. Source code location of the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Entry point of the function when the image is a Cloud Run - * function. - * - * Generated from protobuf field string function_target = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFunctionTarget() - { - return $this->function_target; - } - - /** - * Output only. Entry point of the function when the image is a Cloud Run - * function. - * - * Generated from protobuf field string function_target = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFunctionTarget($var) - { - GPBUtil::checkString($var, True); - $this->function_target = $var; - - return $this; - } - - /** - * Output only. Source code location of the image. - * - * Generated from protobuf field string source_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceLocation() - { - return $this->source_location; - } - - /** - * Output only. Source code location of the image. - * - * Generated from protobuf field string source_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceLocation($var) - { - GPBUtil::checkString($var, True); - $this->source_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php deleted file mode 100644 index 771e535b0e3a..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CancelExecutionRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.run.v2.CancelExecutionRequest - */ -class CancelExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Execution to cancel. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates that the request should be validated without actually - * cancelling any resources. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. The name of the Execution to cancel. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. Please see - * {@see ExecutionsClient::executionName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\CancelExecutionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Execution to cancel. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * @type bool $validate_only - * Indicates that the request should be validated without actually - * cancelling any resources. - * @type string $etag - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Execution to cancel. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Execution to cancel. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates that the request should be validated without actually - * cancelling any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated without actually - * cancelling any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php deleted file mode 100644 index 93ca08a9f462..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CloudSqlInstance.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.run.v2.CloudSqlInstance - */ -class CloudSqlInstance extends \Google\Protobuf\Internal\Message -{ - /** - * The Cloud SQL instance connection names, as can be found in - * https://console.cloud.google.com/sql/instances. Visit - * https://cloud.google.com/sql/docs/mysql/connect-run for more information on - * how to connect Cloud SQL and Cloud Run. Format: - * {project}:{location}:{instance} - * - * Generated from protobuf field repeated string instances = 1; - */ - private $instances; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $instances - * The Cloud SQL instance connection names, as can be found in - * https://console.cloud.google.com/sql/instances. Visit - * https://cloud.google.com/sql/docs/mysql/connect-run for more information on - * how to connect Cloud SQL and Cloud Run. Format: - * {project}:{location}:{instance} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud SQL instance connection names, as can be found in - * https://console.cloud.google.com/sql/instances. Visit - * https://cloud.google.com/sql/docs/mysql/connect-run for more information on - * how to connect Cloud SQL and Cloud Run. Format: - * {project}:{location}:{instance} - * - * Generated from protobuf field repeated string instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The Cloud SQL instance connection names, as can be found in - * https://console.cloud.google.com/sql/instances. Visit - * https://cloud.google.com/sql/docs/mysql/connect-run for more information on - * how to connect Cloud SQL and Cloud Run. Format: - * {project}:{location}:{instance} - * - * Generated from protobuf field repeated string instances = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instances = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php deleted file mode 100644 index e15712d24b3f..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition.php +++ /dev/null @@ -1,337 +0,0 @@ -google.cloud.run.v2.Condition - */ -class Condition extends \Google\Protobuf\Internal\Message -{ - /** - * type is used to communicate the status of the reconciliation process. - * See also: - * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting - * Types common to all resources include: - * * "Ready": True when the Resource is ready. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * State of the condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.State state = 2; - */ - protected $state = 0; - /** - * Human readable message indicating details about the current status. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - /** - * Last time the condition transitioned from one status to another. - * - * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 4; - */ - protected $last_transition_time = null; - /** - * How to interpret failures of this condition, one of Error, Warning, Info - * - * Generated from protobuf field .google.cloud.run.v2.Condition.Severity severity = 5; - */ - protected $severity = 0; - protected $reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * type is used to communicate the status of the reconciliation process. - * See also: - * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting - * Types common to all resources include: - * * "Ready": True when the Resource is ready. - * @type int $state - * State of the condition. - * @type string $message - * Human readable message indicating details about the current status. - * @type \Google\Protobuf\Timestamp $last_transition_time - * Last time the condition transitioned from one status to another. - * @type int $severity - * How to interpret failures of this condition, one of Error, Warning, Info - * @type int $reason - * Output only. A common (service-level) reason for this condition. - * @type int $revision_reason - * Output only. A reason for the revision condition. - * @type int $execution_reason - * Output only. A reason for the execution condition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Condition::initOnce(); - parent::__construct($data); - } - - /** - * type is used to communicate the status of the reconciliation process. - * See also: - * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting - * Types common to all resources include: - * * "Ready": True when the Resource is ready. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * type is used to communicate the status of the reconciliation process. - * See also: - * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting - * Types common to all resources include: - * * "Ready": True when the Resource is ready. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * State of the condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of the condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\State::class); - $this->state = $var; - - return $this; - } - - /** - * Human readable message indicating details about the current status. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human readable message indicating details about the current status. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last time the condition transitioned from one status to another. - * - * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastTransitionTime() - { - return $this->last_transition_time; - } - - public function hasLastTransitionTime() - { - return isset($this->last_transition_time); - } - - public function clearLastTransitionTime() - { - unset($this->last_transition_time); - } - - /** - * Last time the condition transitioned from one status to another. - * - * Generated from protobuf field .google.protobuf.Timestamp last_transition_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastTransitionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_transition_time = $var; - - return $this; - } - - /** - * How to interpret failures of this condition, one of Error, Warning, Info - * - * Generated from protobuf field .google.cloud.run.v2.Condition.Severity severity = 5; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * How to interpret failures of this condition, one of Error, Warning, Info - * - * Generated from protobuf field .google.cloud.run.v2.Condition.Severity severity = 5; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Output only. A common (service-level) reason for this condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.CommonReason reason = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReason() - { - return $this->readOneof(6); - } - - public function hasReason() - { - return $this->hasOneof(6); - } - - /** - * Output only. A common (service-level) reason for this condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.CommonReason reason = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\CommonReason::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. A reason for the revision condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.RevisionReason revision_reason = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRevisionReason() - { - return $this->readOneof(9); - } - - public function hasRevisionReason() - { - return $this->hasOneof(9); - } - - /** - * Output only. A reason for the revision condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.RevisionReason revision_reason = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRevisionReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\RevisionReason::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Output only. A reason for the execution condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.ExecutionReason execution_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getExecutionReason() - { - return $this->readOneof(11); - } - - public function hasExecutionReason() - { - return $this->hasOneof(11); - } - - /** - * Output only. A reason for the execution condition. - * - * Generated from protobuf field .google.cloud.run.v2.Condition.ExecutionReason execution_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setExecutionReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\Condition\ExecutionReason::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * @return string - */ - public function getReasons() - { - return $this->whichOneof("reasons"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php deleted file mode 100644 index ac9f6d89e665..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/CommonReason.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.run.v2.Condition.CommonReason - */ -class CommonReason -{ - /** - * Default value. - * - * Generated from protobuf enum COMMON_REASON_UNDEFINED = 0; - */ - const COMMON_REASON_UNDEFINED = 0; - /** - * Reason unknown. Further details will be in message. - * - * Generated from protobuf enum UNKNOWN = 1; - */ - const UNKNOWN = 1; - /** - * Revision creation process failed. - * - * Generated from protobuf enum REVISION_FAILED = 3; - */ - const REVISION_FAILED = 3; - /** - * Timed out waiting for completion. - * - * Generated from protobuf enum PROGRESS_DEADLINE_EXCEEDED = 4; - */ - const PROGRESS_DEADLINE_EXCEEDED = 4; - /** - * The container image path is incorrect. - * - * Generated from protobuf enum CONTAINER_MISSING = 6; - */ - const CONTAINER_MISSING = 6; - /** - * Insufficient permissions on the container image. - * - * Generated from protobuf enum CONTAINER_PERMISSION_DENIED = 7; - */ - const CONTAINER_PERMISSION_DENIED = 7; - /** - * Container image is not authorized by policy. - * - * Generated from protobuf enum CONTAINER_IMAGE_UNAUTHORIZED = 8; - */ - const CONTAINER_IMAGE_UNAUTHORIZED = 8; - /** - * Container image policy authorization check failed. - * - * Generated from protobuf enum CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9; - */ - const CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9; - /** - * Insufficient permissions on encryption key. - * - * Generated from protobuf enum ENCRYPTION_KEY_PERMISSION_DENIED = 10; - */ - const ENCRYPTION_KEY_PERMISSION_DENIED = 10; - /** - * Permission check on encryption key failed. - * - * Generated from protobuf enum ENCRYPTION_KEY_CHECK_FAILED = 11; - */ - const ENCRYPTION_KEY_CHECK_FAILED = 11; - /** - * At least one Access check on secrets failed. - * - * Generated from protobuf enum SECRETS_ACCESS_CHECK_FAILED = 12; - */ - const SECRETS_ACCESS_CHECK_FAILED = 12; - /** - * Waiting for operation to complete. - * - * Generated from protobuf enum WAITING_FOR_OPERATION = 13; - */ - const WAITING_FOR_OPERATION = 13; - /** - * System will retry immediately. - * - * Generated from protobuf enum IMMEDIATE_RETRY = 14; - */ - const IMMEDIATE_RETRY = 14; - /** - * System will retry later; current attempt failed. - * - * Generated from protobuf enum POSTPONED_RETRY = 15; - */ - const POSTPONED_RETRY = 15; - /** - * An internal error occurred. Further information may be in the message. - * - * Generated from protobuf enum INTERNAL = 16; - */ - const INTERNAL = 16; - /** - * User-provided VPC network was not found. - * - * Generated from protobuf enum VPC_NETWORK_NOT_FOUND = 17; - */ - const VPC_NETWORK_NOT_FOUND = 17; - - private static $valueToName = [ - self::COMMON_REASON_UNDEFINED => 'COMMON_REASON_UNDEFINED', - self::UNKNOWN => 'UNKNOWN', - self::REVISION_FAILED => 'REVISION_FAILED', - self::PROGRESS_DEADLINE_EXCEEDED => 'PROGRESS_DEADLINE_EXCEEDED', - self::CONTAINER_MISSING => 'CONTAINER_MISSING', - self::CONTAINER_PERMISSION_DENIED => 'CONTAINER_PERMISSION_DENIED', - self::CONTAINER_IMAGE_UNAUTHORIZED => 'CONTAINER_IMAGE_UNAUTHORIZED', - self::CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED => 'CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED', - self::ENCRYPTION_KEY_PERMISSION_DENIED => 'ENCRYPTION_KEY_PERMISSION_DENIED', - self::ENCRYPTION_KEY_CHECK_FAILED => 'ENCRYPTION_KEY_CHECK_FAILED', - self::SECRETS_ACCESS_CHECK_FAILED => 'SECRETS_ACCESS_CHECK_FAILED', - self::WAITING_FOR_OPERATION => 'WAITING_FOR_OPERATION', - self::IMMEDIATE_RETRY => 'IMMEDIATE_RETRY', - self::POSTPONED_RETRY => 'POSTPONED_RETRY', - self::INTERNAL => 'INTERNAL', - self::VPC_NETWORK_NOT_FOUND => 'VPC_NETWORK_NOT_FOUND', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CommonReason::class, \Google\Cloud\Run\V2\Condition_CommonReason::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php deleted file mode 100644 index be73c847927d..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/ExecutionReason.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.run.v2.Condition.ExecutionReason - */ -class ExecutionReason -{ - /** - * Default value. - * - * Generated from protobuf enum EXECUTION_REASON_UNDEFINED = 0; - */ - const EXECUTION_REASON_UNDEFINED = 0; - /** - * Internal system error getting execution status. System will retry. - * - * Generated from protobuf enum JOB_STATUS_SERVICE_POLLING_ERROR = 1; - */ - const JOB_STATUS_SERVICE_POLLING_ERROR = 1; - /** - * A task reached its retry limit and the last attempt failed due to the - * user container exiting with a non-zero exit code. - * - * Generated from protobuf enum NON_ZERO_EXIT_CODE = 2; - */ - const NON_ZERO_EXIT_CODE = 2; - /** - * The execution was cancelled by users. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The execution is in the process of being cancelled. - * - * Generated from protobuf enum CANCELLING = 4; - */ - const CANCELLING = 4; - /** - * The execution was deleted. - * - * Generated from protobuf enum DELETED = 5; - */ - const DELETED = 5; - /** - * A delayed execution is waiting for a start time. - * - * Generated from protobuf enum DELAYED_START_PENDING = 6; - */ - const DELAYED_START_PENDING = 6; - - private static $valueToName = [ - self::EXECUTION_REASON_UNDEFINED => 'EXECUTION_REASON_UNDEFINED', - self::JOB_STATUS_SERVICE_POLLING_ERROR => 'JOB_STATUS_SERVICE_POLLING_ERROR', - self::NON_ZERO_EXIT_CODE => 'NON_ZERO_EXIT_CODE', - self::CANCELLED => 'CANCELLED', - self::CANCELLING => 'CANCELLING', - self::DELETED => 'DELETED', - self::DELAYED_START_PENDING => 'DELAYED_START_PENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionReason::class, \Google\Cloud\Run\V2\Condition_ExecutionReason::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php deleted file mode 100644 index 267653375813..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/RevisionReason.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.run.v2.Condition.RevisionReason - */ -class RevisionReason -{ - /** - * Default value. - * - * Generated from protobuf enum REVISION_REASON_UNDEFINED = 0; - */ - const REVISION_REASON_UNDEFINED = 0; - /** - * Revision in Pending state. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Revision is in Reserve state. - * - * Generated from protobuf enum RESERVE = 2; - */ - const RESERVE = 2; - /** - * Revision is Retired. - * - * Generated from protobuf enum RETIRED = 3; - */ - const RETIRED = 3; - /** - * Revision is being retired. - * - * Generated from protobuf enum RETIRING = 4; - */ - const RETIRING = 4; - /** - * Revision is being recreated. - * - * Generated from protobuf enum RECREATING = 5; - */ - const RECREATING = 5; - /** - * There was a health check error. - * - * Generated from protobuf enum HEALTH_CHECK_CONTAINER_ERROR = 6; - */ - const HEALTH_CHECK_CONTAINER_ERROR = 6; - /** - * Health check failed due to user error from customized path of the - * container. System will retry. - * - * Generated from protobuf enum CUSTOMIZED_PATH_RESPONSE_PENDING = 7; - */ - const CUSTOMIZED_PATH_RESPONSE_PENDING = 7; - /** - * A revision with min_instance_count > 0 was created and is reserved, but - * it was not configured to serve traffic, so it's not live. This can also - * happen momentarily during traffic migration. - * - * Generated from protobuf enum MIN_INSTANCES_NOT_PROVISIONED = 8; - */ - const MIN_INSTANCES_NOT_PROVISIONED = 8; - /** - * The maximum allowed number of active revisions has been reached. - * - * Generated from protobuf enum ACTIVE_REVISION_LIMIT_REACHED = 9; - */ - const ACTIVE_REVISION_LIMIT_REACHED = 9; - /** - * There was no deployment defined. - * This value is no longer used, but Services created in older versions of - * the API might contain this value. - * - * Generated from protobuf enum NO_DEPLOYMENT = 10; - */ - const NO_DEPLOYMENT = 10; - /** - * A revision's container has no port specified since the revision is of a - * manually scaled service with 0 instance count - * - * Generated from protobuf enum HEALTH_CHECK_SKIPPED = 11; - */ - const HEALTH_CHECK_SKIPPED = 11; - /** - * A revision with min_instance_count > 0 was created and is waiting for - * enough instances to begin a traffic migration. - * - * Generated from protobuf enum MIN_INSTANCES_WARMING = 12; - */ - const MIN_INSTANCES_WARMING = 12; - - private static $valueToName = [ - self::REVISION_REASON_UNDEFINED => 'REVISION_REASON_UNDEFINED', - self::PENDING => 'PENDING', - self::RESERVE => 'RESERVE', - self::RETIRED => 'RETIRED', - self::RETIRING => 'RETIRING', - self::RECREATING => 'RECREATING', - self::HEALTH_CHECK_CONTAINER_ERROR => 'HEALTH_CHECK_CONTAINER_ERROR', - self::CUSTOMIZED_PATH_RESPONSE_PENDING => 'CUSTOMIZED_PATH_RESPONSE_PENDING', - self::MIN_INSTANCES_NOT_PROVISIONED => 'MIN_INSTANCES_NOT_PROVISIONED', - self::ACTIVE_REVISION_LIMIT_REACHED => 'ACTIVE_REVISION_LIMIT_REACHED', - self::NO_DEPLOYMENT => 'NO_DEPLOYMENT', - self::HEALTH_CHECK_SKIPPED => 'HEALTH_CHECK_SKIPPED', - self::MIN_INSTANCES_WARMING => 'MIN_INSTANCES_WARMING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RevisionReason::class, \Google\Cloud\Run\V2\Condition_RevisionReason::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php deleted file mode 100644 index eb2c0967fd4b..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/Severity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.run.v2.Condition.Severity - */ -class Severity -{ - /** - * Unspecified severity - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Error severity. - * - * Generated from protobuf enum ERROR = 1; - */ - const ERROR = 1; - /** - * Warning severity. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * Info severity. - * - * Generated from protobuf enum INFO = 3; - */ - const INFO = 3; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::ERROR => 'ERROR', - self::WARNING => 'WARNING', - self::INFO => 'INFO', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Severity::class, \Google\Cloud\Run\V2\Condition_Severity::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php deleted file mode 100644 index 3ca42a0f1e32..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Condition/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.run.v2.Condition.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Transient state: Reconciliation has not started yet. - * - * Generated from protobuf enum CONDITION_PENDING = 1; - */ - const CONDITION_PENDING = 1; - /** - * Transient state: reconciliation is still in progress. - * - * Generated from protobuf enum CONDITION_RECONCILING = 2; - */ - const CONDITION_RECONCILING = 2; - /** - * Terminal state: Reconciliation did not succeed. - * - * Generated from protobuf enum CONDITION_FAILED = 3; - */ - const CONDITION_FAILED = 3; - /** - * Terminal state: Reconciliation completed successfully. - * - * Generated from protobuf enum CONDITION_SUCCEEDED = 4; - */ - const CONDITION_SUCCEEDED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CONDITION_PENDING => 'CONDITION_PENDING', - self::CONDITION_RECONCILING => 'CONDITION_RECONCILING', - self::CONDITION_FAILED => 'CONDITION_FAILED', - self::CONDITION_SUCCEEDED => 'CONDITION_SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Run\V2\Condition_State::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php deleted file mode 100644 index 2ffcd41a34c8..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Container.php +++ /dev/null @@ -1,701 +0,0 @@ -google.cloud.run.v2.Container - */ -class Container extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the container specified as a DNS_LABEL (RFC 1123). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Name of the container image in Dockerhub, Google Artifact - * Registry, or Google Container Registry. If the host is not provided, - * Dockerhub is assumed. - * - * Generated from protobuf field string image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $image = ''; - /** - * Optional. Location of the source. - * - * Generated from protobuf field .google.cloud.run.v2.SourceCode source_code = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $source_code = null; - /** - * Entrypoint array. Not executed within a shell. - * The docker image's ENTRYPOINT is used if this is not provided. - * - * Generated from protobuf field repeated string command = 3; - */ - private $command; - /** - * Arguments to the entrypoint. - * The docker image's CMD is used if this is not provided. - * - * Generated from protobuf field repeated string args = 4; - */ - private $args; - /** - * List of environment variables to set in the container. - * - * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 5; - */ - private $env; - /** - * Compute Resource requirements by this container. - * - * Generated from protobuf field .google.cloud.run.v2.ResourceRequirements resources = 6; - */ - protected $resources = null; - /** - * List of ports to expose from the container. Only a single port can be - * specified. The specified ports must be listening on all interfaces - * (0.0.0.0) within the container to be accessible. - * If omitted, a port number will be chosen and passed to the container - * through the PORT environment variable for the container to listen on. - * - * Generated from protobuf field repeated .google.cloud.run.v2.ContainerPort ports = 7; - */ - private $ports; - /** - * Volume to mount into the container's filesystem. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8; - */ - private $volume_mounts; - /** - * Container's working directory. - * If not specified, the container runtime's default will be used, which - * might be configured in the container image. - * - * Generated from protobuf field string working_dir = 9; - */ - protected $working_dir = ''; - /** - * Periodic probe of container liveness. - * Container will be restarted if the probe fails. - * - * Generated from protobuf field .google.cloud.run.v2.Probe liveness_probe = 10; - */ - protected $liveness_probe = null; - /** - * Startup probe of application within the container. - * All other probes are disabled if a startup probe is provided, until it - * succeeds. Container will not be added to service endpoints if the probe - * fails. - * - * Generated from protobuf field .google.cloud.run.v2.Probe startup_probe = 11; - */ - protected $startup_probe = null; - /** - * Readiness probe to be used for health checks. - * - * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; - */ - protected $readiness_probe = null; - /** - * Names of the containers that must start before this container. - * - * Generated from protobuf field repeated string depends_on = 12; - */ - private $depends_on; - /** - * Base image for this container. Only supported for services. If set, it - * indicates that the service is enrolled into automatic base image update. - * - * Generated from protobuf field string base_image_uri = 13; - */ - protected $base_image_uri = ''; - /** - * Output only. The build info of the container image. - * - * Generated from protobuf field .google.cloud.run.v2.BuildInfo build_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the container specified as a DNS_LABEL (RFC 1123). - * @type string $image - * Required. Name of the container image in Dockerhub, Google Artifact - * Registry, or Google Container Registry. If the host is not provided, - * Dockerhub is assumed. - * @type \Google\Cloud\Run\V2\SourceCode $source_code - * Optional. Location of the source. - * @type array|\Google\Protobuf\Internal\RepeatedField $command - * Entrypoint array. Not executed within a shell. - * The docker image's ENTRYPOINT is used if this is not provided. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Arguments to the entrypoint. - * The docker image's CMD is used if this is not provided. - * @type array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $env - * List of environment variables to set in the container. - * @type \Google\Cloud\Run\V2\ResourceRequirements $resources - * Compute Resource requirements by this container. - * @type array<\Google\Cloud\Run\V2\ContainerPort>|\Google\Protobuf\Internal\RepeatedField $ports - * List of ports to expose from the container. Only a single port can be - * specified. The specified ports must be listening on all interfaces - * (0.0.0.0) within the container to be accessible. - * If omitted, a port number will be chosen and passed to the container - * through the PORT environment variable for the container to listen on. - * @type array<\Google\Cloud\Run\V2\VolumeMount>|\Google\Protobuf\Internal\RepeatedField $volume_mounts - * Volume to mount into the container's filesystem. - * @type string $working_dir - * Container's working directory. - * If not specified, the container runtime's default will be used, which - * might be configured in the container image. - * @type \Google\Cloud\Run\V2\Probe $liveness_probe - * Periodic probe of container liveness. - * Container will be restarted if the probe fails. - * @type \Google\Cloud\Run\V2\Probe $startup_probe - * Startup probe of application within the container. - * All other probes are disabled if a startup probe is provided, until it - * succeeds. Container will not be added to service endpoints if the probe - * fails. - * @type \Google\Cloud\Run\V2\Probe $readiness_probe - * Readiness probe to be used for health checks. - * @type array|\Google\Protobuf\Internal\RepeatedField $depends_on - * Names of the containers that must start before this container. - * @type string $base_image_uri - * Base image for this container. Only supported for services. If set, it - * indicates that the service is enrolled into automatic base image update. - * @type \Google\Cloud\Run\V2\BuildInfo $build_info - * Output only. The build info of the container image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Name of the container specified as a DNS_LABEL (RFC 1123). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the container specified as a DNS_LABEL (RFC 1123). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Name of the container image in Dockerhub, Google Artifact - * Registry, or Google Container Registry. If the host is not provided, - * Dockerhub is assumed. - * - * Generated from protobuf field string image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * Required. Name of the container image in Dockerhub, Google Artifact - * Registry, or Google Container Registry. If the host is not provided, - * Dockerhub is assumed. - * - * Generated from protobuf field string image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkString($var, True); - $this->image = $var; - - return $this; - } - - /** - * Optional. Location of the source. - * - * Generated from protobuf field .google.cloud.run.v2.SourceCode source_code = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\SourceCode|null - */ - public function getSourceCode() - { - return $this->source_code; - } - - public function hasSourceCode() - { - return isset($this->source_code); - } - - public function clearSourceCode() - { - unset($this->source_code); - } - - /** - * Optional. Location of the source. - * - * Generated from protobuf field .google.cloud.run.v2.SourceCode source_code = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\SourceCode $var - * @return $this - */ - public function setSourceCode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SourceCode::class); - $this->source_code = $var; - - return $this; - } - - /** - * Entrypoint array. Not executed within a shell. - * The docker image's ENTRYPOINT is used if this is not provided. - * - * Generated from protobuf field repeated string command = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCommand() - { - return $this->command; - } - - /** - * Entrypoint array. Not executed within a shell. - * The docker image's ENTRYPOINT is used if this is not provided. - * - * Generated from protobuf field repeated string command = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCommand($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->command = $arr; - - return $this; - } - - /** - * Arguments to the entrypoint. - * The docker image's CMD is used if this is not provided. - * - * Generated from protobuf field repeated string args = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Arguments to the entrypoint. - * The docker image's CMD is used if this is not provided. - * - * Generated from protobuf field repeated string args = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * List of environment variables to set in the container. - * - * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnv() - { - return $this->env; - } - - /** - * List of environment variables to set in the container. - * - * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 5; - * @param array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnv($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\EnvVar::class); - $this->env = $arr; - - return $this; - } - - /** - * Compute Resource requirements by this container. - * - * Generated from protobuf field .google.cloud.run.v2.ResourceRequirements resources = 6; - * @return \Google\Cloud\Run\V2\ResourceRequirements|null - */ - public function getResources() - { - return $this->resources; - } - - public function hasResources() - { - return isset($this->resources); - } - - public function clearResources() - { - unset($this->resources); - } - - /** - * Compute Resource requirements by this container. - * - * Generated from protobuf field .google.cloud.run.v2.ResourceRequirements resources = 6; - * @param \Google\Cloud\Run\V2\ResourceRequirements $var - * @return $this - */ - public function setResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ResourceRequirements::class); - $this->resources = $var; - - return $this; - } - - /** - * List of ports to expose from the container. Only a single port can be - * specified. The specified ports must be listening on all interfaces - * (0.0.0.0) within the container to be accessible. - * If omitted, a port number will be chosen and passed to the container - * through the PORT environment variable for the container to listen on. - * - * Generated from protobuf field repeated .google.cloud.run.v2.ContainerPort ports = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPorts() - { - return $this->ports; - } - - /** - * List of ports to expose from the container. Only a single port can be - * specified. The specified ports must be listening on all interfaces - * (0.0.0.0) within the container to be accessible. - * If omitted, a port number will be chosen and passed to the container - * through the PORT environment variable for the container to listen on. - * - * Generated from protobuf field repeated .google.cloud.run.v2.ContainerPort ports = 7; - * @param array<\Google\Cloud\Run\V2\ContainerPort>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\ContainerPort::class); - $this->ports = $arr; - - return $this; - } - - /** - * Volume to mount into the container's filesystem. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeMounts() - { - return $this->volume_mounts; - } - - /** - * Volume to mount into the container's filesystem. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8; - * @param array<\Google\Cloud\Run\V2\VolumeMount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeMounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\VolumeMount::class); - $this->volume_mounts = $arr; - - return $this; - } - - /** - * Container's working directory. - * If not specified, the container runtime's default will be used, which - * might be configured in the container image. - * - * Generated from protobuf field string working_dir = 9; - * @return string - */ - public function getWorkingDir() - { - return $this->working_dir; - } - - /** - * Container's working directory. - * If not specified, the container runtime's default will be used, which - * might be configured in the container image. - * - * Generated from protobuf field string working_dir = 9; - * @param string $var - * @return $this - */ - public function setWorkingDir($var) - { - GPBUtil::checkString($var, True); - $this->working_dir = $var; - - return $this; - } - - /** - * Periodic probe of container liveness. - * Container will be restarted if the probe fails. - * - * Generated from protobuf field .google.cloud.run.v2.Probe liveness_probe = 10; - * @return \Google\Cloud\Run\V2\Probe|null - */ - public function getLivenessProbe() - { - return $this->liveness_probe; - } - - public function hasLivenessProbe() - { - return isset($this->liveness_probe); - } - - public function clearLivenessProbe() - { - unset($this->liveness_probe); - } - - /** - * Periodic probe of container liveness. - * Container will be restarted if the probe fails. - * - * Generated from protobuf field .google.cloud.run.v2.Probe liveness_probe = 10; - * @param \Google\Cloud\Run\V2\Probe $var - * @return $this - */ - public function setLivenessProbe($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Probe::class); - $this->liveness_probe = $var; - - return $this; - } - - /** - * Startup probe of application within the container. - * All other probes are disabled if a startup probe is provided, until it - * succeeds. Container will not be added to service endpoints if the probe - * fails. - * - * Generated from protobuf field .google.cloud.run.v2.Probe startup_probe = 11; - * @return \Google\Cloud\Run\V2\Probe|null - */ - public function getStartupProbe() - { - return $this->startup_probe; - } - - public function hasStartupProbe() - { - return isset($this->startup_probe); - } - - public function clearStartupProbe() - { - unset($this->startup_probe); - } - - /** - * Startup probe of application within the container. - * All other probes are disabled if a startup probe is provided, until it - * succeeds. Container will not be added to service endpoints if the probe - * fails. - * - * Generated from protobuf field .google.cloud.run.v2.Probe startup_probe = 11; - * @param \Google\Cloud\Run\V2\Probe $var - * @return $this - */ - public function setStartupProbe($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Probe::class); - $this->startup_probe = $var; - - return $this; - } - - /** - * Readiness probe to be used for health checks. - * - * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; - * @return \Google\Cloud\Run\V2\Probe|null - */ - public function getReadinessProbe() - { - return $this->readiness_probe; - } - - public function hasReadinessProbe() - { - return isset($this->readiness_probe); - } - - public function clearReadinessProbe() - { - unset($this->readiness_probe); - } - - /** - * Readiness probe to be used for health checks. - * - * Generated from protobuf field .google.cloud.run.v2.Probe readiness_probe = 14; - * @param \Google\Cloud\Run\V2\Probe $var - * @return $this - */ - public function setReadinessProbe($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Probe::class); - $this->readiness_probe = $var; - - return $this; - } - - /** - * Names of the containers that must start before this container. - * - * Generated from protobuf field repeated string depends_on = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDependsOn() - { - return $this->depends_on; - } - - /** - * Names of the containers that must start before this container. - * - * Generated from protobuf field repeated string depends_on = 12; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDependsOn($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->depends_on = $arr; - - return $this; - } - - /** - * Base image for this container. Only supported for services. If set, it - * indicates that the service is enrolled into automatic base image update. - * - * Generated from protobuf field string base_image_uri = 13; - * @return string - */ - public function getBaseImageUri() - { - return $this->base_image_uri; - } - - /** - * Base image for this container. Only supported for services. If set, it - * indicates that the service is enrolled into automatic base image update. - * - * Generated from protobuf field string base_image_uri = 13; - * @param string $var - * @return $this - */ - public function setBaseImageUri($var) - { - GPBUtil::checkString($var, True); - $this->base_image_uri = $var; - - return $this; - } - - /** - * Output only. The build info of the container image. - * - * Generated from protobuf field .google.cloud.run.v2.BuildInfo build_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\BuildInfo|null - */ - public function getBuildInfo() - { - return $this->build_info; - } - - public function hasBuildInfo() - { - return isset($this->build_info); - } - - public function clearBuildInfo() - { - unset($this->build_info); - } - - /** - * Output only. The build info of the container image. - * - * Generated from protobuf field .google.cloud.run.v2.BuildInfo build_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\BuildInfo $var - * @return $this - */ - public function setBuildInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BuildInfo::class); - $this->build_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php deleted file mode 100644 index 9fad73b12eed..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ContainerPort.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.run.v2.ContainerPort - */ -class ContainerPort extends \Google\Protobuf\Internal\Message -{ - /** - * If specified, used to specify which protocol to use. - * Allowed values are "http1" and "h2c". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Port number the container listens on. - * This must be a valid TCP port number, 0 < container_port < 65536. - * - * Generated from protobuf field int32 container_port = 3; - */ - protected $container_port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * If specified, used to specify which protocol to use. - * Allowed values are "http1" and "h2c". - * @type int $container_port - * Port number the container listens on. - * This must be a valid TCP port number, 0 < container_port < 65536. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * If specified, used to specify which protocol to use. - * Allowed values are "http1" and "h2c". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * If specified, used to specify which protocol to use. - * Allowed values are "http1" and "h2c". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Port number the container listens on. - * This must be a valid TCP port number, 0 < container_port < 65536. - * - * Generated from protobuf field int32 container_port = 3; - * @return int - */ - public function getContainerPort() - { - return $this->container_port; - } - - /** - * Port number the container listens on. - * This must be a valid TCP port number, 0 < container_port < 65536. - * - * Generated from protobuf field int32 container_port = 3; - * @param int $var - * @return $this - */ - public function setContainerPort($var) - { - GPBUtil::checkInt32($var); - $this->container_port = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php deleted file mode 100644 index f201e0ba2b8c..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateJobRequest.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.run.v2.CreateJobRequest - */ -class CreateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location and project in which this Job should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Job instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - /** - * Required. The unique identifier for the Job. The name of the job becomes - * {parent}/jobs/{job_id}. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_id = ''; - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The location and project in which this Job should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. Please see - * {@see JobsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Run\V2\Job $job Required. The Job instance to create. - * @param string $jobId Required. The unique identifier for the Job. The name of the job becomes - * {parent}/jobs/{job_id}. - * - * @return \Google\Cloud\Run\V2\CreateJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Run\V2\Job $job, string $jobId): self - { - return (new self()) - ->setParent($parent) - ->setJob($job) - ->setJobId($jobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location and project in which this Job should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * @type \Google\Cloud\Run\V2\Job $job - * Required. The Job instance to create. - * @type string $job_id - * Required. The unique identifier for the Job. The name of the job becomes - * {parent}/jobs/{job_id}. - * @type bool $validate_only - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location and project in which this Job should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location and project in which this Job should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The Job instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. The Job instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Job::class); - $this->job = $var; - - return $this; - } - - /** - * Required. The unique identifier for the Job. The name of the job becomes - * {parent}/jobs/{job_id}. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Required. The unique identifier for the Job. The name of the job becomes - * {parent}/jobs/{job_id}. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php deleted file mode 100644 index 7a5677b8d359..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateServiceRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.run.v2.CreateServiceRequest - */ -class CreateServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location and project in which this service should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. Only lowercase characters, digits, and hyphens. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Service instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = null; - /** - * Required. The unique identifier for the Service. It must begin with letter, - * and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the service becomes {parent}/services/{service_id}. - * - * Generated from protobuf field string service_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_id = ''; - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The location and project in which this service should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. Only lowercase characters, digits, and hyphens. Please see - * {@see ServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Run\V2\Service $service Required. The Service instance to create. - * @param string $serviceId Required. The unique identifier for the Service. It must begin with letter, - * and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the service becomes {parent}/services/{service_id}. - * - * @return \Google\Cloud\Run\V2\CreateServiceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Run\V2\Service $service, string $serviceId): self - { - return (new self()) - ->setParent($parent) - ->setService($service) - ->setServiceId($serviceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location and project in which this service should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. Only lowercase characters, digits, and hyphens. - * @type \Google\Cloud\Run\V2\Service $service - * Required. The Service instance to create. - * @type string $service_id - * Required. The unique identifier for the Service. It must begin with letter, - * and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the service becomes {parent}/services/{service_id}. - * @type bool $validate_only - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location and project in which this service should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. Only lowercase characters, digits, and hyphens. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location and project in which this service should be created. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. Only lowercase characters, digits, and hyphens. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The Service instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Required. The Service instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Service::class); - $this->service = $var; - - return $this; - } - - /** - * Required. The unique identifier for the Service. It must begin with letter, - * and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the service becomes {parent}/services/{service_id}. - * - * Generated from protobuf field string service_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getServiceId() - { - return $this->service_id; - } - - /** - * Required. The unique identifier for the Service. It must begin with letter, - * and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the service becomes {parent}/services/{service_id}. - * - * Generated from protobuf field string service_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setServiceId($var) - { - GPBUtil::checkString($var, True); - $this->service_id = $var; - - return $this; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php deleted file mode 100644 index 9c089a86fa79..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/CreateWorkerPoolRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.run.v2.CreateWorkerPoolRequest - */ -class CreateWorkerPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location and project in which this worker pool should be - * created. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. Only lowercase characters, digits, - * and hyphens. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The WorkerPool instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $worker_pool = null; - /** - * Required. The unique identifier for the WorkerPool. It must begin with - * letter, and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the worker pool becomes - * `{parent}/workerPools/{worker_pool_id}`. - * - * Generated from protobuf field string worker_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $worker_pool_id = ''; - /** - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The location and project in which this worker pool should be - * created. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. Only lowercase characters, digits, - * and hyphens. Please see - * {@see WorkerPoolsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Run\V2\WorkerPool $workerPool Required. The WorkerPool instance to create. - * @param string $workerPoolId Required. The unique identifier for the WorkerPool. It must begin with - * letter, and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the worker pool becomes - * `{parent}/workerPools/{worker_pool_id}`. - * - * @return \Google\Cloud\Run\V2\CreateWorkerPoolRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Run\V2\WorkerPool $workerPool, string $workerPoolId): self - { - return (new self()) - ->setParent($parent) - ->setWorkerPool($workerPool) - ->setWorkerPoolId($workerPoolId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location and project in which this worker pool should be - * created. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. Only lowercase characters, digits, - * and hyphens. - * @type \Google\Cloud\Run\V2\WorkerPool $worker_pool - * Required. The WorkerPool instance to create. - * @type string $worker_pool_id - * Required. The unique identifier for the WorkerPool. It must begin with - * letter, and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the worker pool becomes - * `{parent}/workerPools/{worker_pool_id}`. - * @type bool $validate_only - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location and project in which this worker pool should be - * created. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. Only lowercase characters, digits, - * and hyphens. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location and project in which this worker pool should be - * created. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. Only lowercase characters, digits, - * and hyphens. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The WorkerPool instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\WorkerPool|null - */ - public function getWorkerPool() - { - return $this->worker_pool; - } - - public function hasWorkerPool() - { - return isset($this->worker_pool); - } - - public function clearWorkerPool() - { - unset($this->worker_pool); - } - - /** - * Required. The WorkerPool instance to create. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\WorkerPool $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPool::class); - $this->worker_pool = $var; - - return $this; - } - - /** - * Required. The unique identifier for the WorkerPool. It must begin with - * letter, and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the worker pool becomes - * `{parent}/workerPools/{worker_pool_id}`. - * - * Generated from protobuf field string worker_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getWorkerPoolId() - { - return $this->worker_pool_id; - } - - /** - * Required. The unique identifier for the WorkerPool. It must begin with - * letter, and cannot end with hyphen; must contain fewer than 50 characters. - * The name of the worker pool becomes - * `{parent}/workerPools/{worker_pool_id}`. - * - * Generated from protobuf field string worker_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setWorkerPoolId($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool_id = $var; - - return $this; - } - - /** - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or creating any resources. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php deleted file mode 100644 index ea7d31e245fe..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteExecutionRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.run.v2.DeleteExecutionRequest - */ -class DeleteExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Execution to delete. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. The name of the Execution to delete. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. Please see - * {@see ExecutionsClient::executionName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\DeleteExecutionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Execution to delete. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * @type bool $validate_only - * Indicates that the request should be validated without actually - * deleting any resources. - * @type string $etag - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Execution to delete. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Execution to delete. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * A system-generated fingerprint for this version of the resource. - * This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php deleted file mode 100644 index 0c4f53d97680..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteJobRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.run.v2.DeleteJobRequest - */ -class DeleteJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. Please see - * {@see JobsClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\DeleteJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * @type bool $validate_only - * Indicates that the request should be validated without actually - * deleting any resources. - * @type string $etag - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php deleted file mode 100644 index 0b7bb2e76937..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteRevisionRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.run.v2.DeleteRevisionRequest - */ -class DeleteRevisionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Revision to delete. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * A system-generated fingerprint for this version of the - * resource. This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. The name of the Revision to delete. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * Please see {@see RevisionsClient::revisionName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\DeleteRevisionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Revision to delete. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * @type bool $validate_only - * Indicates that the request should be validated without actually - * deleting any resources. - * @type string $etag - * A system-generated fingerprint for this version of the - * resource. This may be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Revision to delete. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Revision to delete. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * A system-generated fingerprint for this version of the - * resource. This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * A system-generated fingerprint for this version of the - * resource. This may be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php deleted file mode 100644 index 16182d4a1603..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteServiceRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.run.v2.DeleteServiceRequest - */ -class DeleteServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. Please see - * {@see ServicesClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\DeleteServiceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * @type bool $validate_only - * Indicates that the request should be validated without actually - * deleting any resources. - * @type string $etag - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php deleted file mode 100644 index 70978326316a..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/DeleteWorkerPoolRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.run.v2.DeleteWorkerPoolRequest - */ -class DeleteWorkerPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. Please see - * {@see WorkerPoolsClient::workerPoolName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\DeleteWorkerPoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * @type bool $validate_only - * Optional. Indicates that the request should be validated without actually - * deleting any resources. - * @type string $etag - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php deleted file mode 100644 index be49c7f974ba..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.run.v2.EmptyDirVolumeSource - */ -class EmptyDirVolumeSource extends \Google\Protobuf\Internal\Message -{ - /** - * The medium on which the data is stored. Acceptable values today is only - * MEMORY or none. When none, the default will currently be backed by memory - * but could change over time. +optional - * - * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1; - */ - protected $medium = 0; - /** - * Limit on the storage usable by this EmptyDir volume. - * The size limit is also applicable for memory medium. - * The maximum usage on memory medium EmptyDir would be the minimum value - * between the SizeLimit specified here and the sum of memory limits of all - * containers. The default is nil which means that the limit is undefined. - * More info: - * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. - * Info in Kubernetes: - * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - * - * Generated from protobuf field string size_limit = 2; - */ - protected $size_limit = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $medium - * The medium on which the data is stored. Acceptable values today is only - * MEMORY or none. When none, the default will currently be backed by memory - * but could change over time. +optional - * @type string $size_limit - * Limit on the storage usable by this EmptyDir volume. - * The size limit is also applicable for memory medium. - * The maximum usage on memory medium EmptyDir would be the minimum value - * between the SizeLimit specified here and the sum of memory limits of all - * containers. The default is nil which means that the limit is undefined. - * More info: - * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. - * Info in Kubernetes: - * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * The medium on which the data is stored. Acceptable values today is only - * MEMORY or none. When none, the default will currently be backed by memory - * but could change over time. +optional - * - * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1; - * @return int - */ - public function getMedium() - { - return $this->medium; - } - - /** - * The medium on which the data is stored. Acceptable values today is only - * MEMORY or none. When none, the default will currently be backed by memory - * but could change over time. +optional - * - * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1; - * @param int $var - * @return $this - */ - public function setMedium($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EmptyDirVolumeSource\Medium::class); - $this->medium = $var; - - return $this; - } - - /** - * Limit on the storage usable by this EmptyDir volume. - * The size limit is also applicable for memory medium. - * The maximum usage on memory medium EmptyDir would be the minimum value - * between the SizeLimit specified here and the sum of memory limits of all - * containers. The default is nil which means that the limit is undefined. - * More info: - * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. - * Info in Kubernetes: - * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - * - * Generated from protobuf field string size_limit = 2; - * @return string - */ - public function getSizeLimit() - { - return $this->size_limit; - } - - /** - * Limit on the storage usable by this EmptyDir volume. - * The size limit is also applicable for memory medium. - * The maximum usage on memory medium EmptyDir would be the minimum value - * between the SizeLimit specified here and the sum of memory limits of all - * containers. The default is nil which means that the limit is undefined. - * More info: - * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. - * Info in Kubernetes: - * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - * - * Generated from protobuf field string size_limit = 2; - * @param string $var - * @return $this - */ - public function setSizeLimit($var) - { - GPBUtil::checkString($var, True); - $this->size_limit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php deleted file mode 100644 index f226a6c0cdda..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EmptyDirVolumeSource/Medium.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.run.v2.EmptyDirVolumeSource.Medium - */ -class Medium -{ - /** - * When not specified, falls back to the default implementation which - * is currently in memory (this may change over time). - * - * Generated from protobuf enum MEDIUM_UNSPECIFIED = 0; - */ - const MEDIUM_UNSPECIFIED = 0; - /** - * Explicitly set the EmptyDir to be in memory. Uses tmpfs. - * - * Generated from protobuf enum MEMORY = 1; - */ - const MEMORY = 1; - - private static $valueToName = [ - self::MEDIUM_UNSPECIFIED => 'MEDIUM_UNSPECIFIED', - self::MEMORY => 'MEMORY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Medium::class, \Google\Cloud\Run\V2\EmptyDirVolumeSource_Medium::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php deleted file mode 100644 index 0b07b810a082..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EncryptionKeyRevocationAction.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.run.v2.EncryptionKeyRevocationAction - */ -class EncryptionKeyRevocationAction -{ - /** - * Unspecified - * - * Generated from protobuf enum ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED = 0; - */ - const ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED = 0; - /** - * Prevents the creation of new instances. - * - * Generated from protobuf enum PREVENT_NEW = 1; - */ - const PREVENT_NEW = 1; - /** - * Shuts down existing instances, and prevents creation of new ones. - * - * Generated from protobuf enum SHUTDOWN = 2; - */ - const SHUTDOWN = 2; - - private static $valueToName = [ - self::ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED => 'ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED', - self::PREVENT_NEW => 'PREVENT_NEW', - self::SHUTDOWN => 'SHUTDOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php deleted file mode 100644 index 2073c4252a57..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVar.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.run.v2.EnvVar - */ -class EnvVar extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the environment variable. Must not exceed 32768 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - protected $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the environment variable. Must not exceed 32768 - * characters. - * @type string $value - * Literal value of the environment variable. - * Defaults to "", and the maximum length is 32768 bytes. - * Variable references are not supported in Cloud Run. - * @type \Google\Cloud\Run\V2\EnvVarSource $value_source - * Source for the environment variable's value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the environment variable. Must not exceed 32768 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the environment variable. Must not exceed 32768 - * characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Literal value of the environment variable. - * Defaults to "", and the maximum length is 32768 bytes. - * Variable references are not supported in Cloud Run. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->readOneof(2); - } - - public function hasValue() - { - return $this->hasOneof(2); - } - - /** - * Literal value of the environment variable. - * Defaults to "", and the maximum length is 32768 bytes. - * Variable references are not supported in Cloud Run. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Source for the environment variable's value. - * - * Generated from protobuf field .google.cloud.run.v2.EnvVarSource value_source = 3; - * @return \Google\Cloud\Run\V2\EnvVarSource|null - */ - public function getValueSource() - { - return $this->readOneof(3); - } - - public function hasValueSource() - { - return $this->hasOneof(3); - } - - /** - * Source for the environment variable's value. - * - * Generated from protobuf field .google.cloud.run.v2.EnvVarSource value_source = 3; - * @param \Google\Cloud\Run\V2\EnvVarSource $var - * @return $this - */ - public function setValueSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\EnvVarSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getValues() - { - return $this->whichOneof("values"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php deleted file mode 100644 index 99ffb8e651c0..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/EnvVarSource.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.run.v2.EnvVarSource - */ -class EnvVarSource extends \Google\Protobuf\Internal\Message -{ - /** - * Selects a secret and a specific version from Cloud Secret Manager. - * - * Generated from protobuf field .google.cloud.run.v2.SecretKeySelector secret_key_ref = 1; - */ - protected $secret_key_ref = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Run\V2\SecretKeySelector $secret_key_ref - * Selects a secret and a specific version from Cloud Secret Manager. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Selects a secret and a specific version from Cloud Secret Manager. - * - * Generated from protobuf field .google.cloud.run.v2.SecretKeySelector secret_key_ref = 1; - * @return \Google\Cloud\Run\V2\SecretKeySelector|null - */ - public function getSecretKeyRef() - { - return $this->secret_key_ref; - } - - public function hasSecretKeyRef() - { - return isset($this->secret_key_ref); - } - - public function clearSecretKeyRef() - { - unset($this->secret_key_ref); - } - - /** - * Selects a secret and a specific version from Cloud Secret Manager. - * - * Generated from protobuf field .google.cloud.run.v2.SecretKeySelector secret_key_ref = 1; - * @param \Google\Cloud\Run\V2\SecretKeySelector $var - * @return $this - */ - public function setSecretKeyRef($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SecretKeySelector::class); - $this->secret_key_ref = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php deleted file mode 100644 index 2c4d599cde47..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Execution.php +++ /dev/null @@ -1,1217 +0,0 @@ -google.cloud.run.v2.Execution - */ -class Execution extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique name of this Execution. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generation = 0; - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $annotations; - /** - * Output only. Represents time when the execution was acknowledged by the - * execution controller. It is not guaranteed to be set in happens-before - * order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Represents time when the execution started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. Represents time when the execution was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $completion_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 11; - */ - protected $launch_stage = 0; - /** - * Output only. The name of the parent Job. - * - * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $job = ''; - /** - * Output only. Specifies the maximum desired number of tasks the execution - * should run at any given time. Must be <= task_count. The actual number of - * tasks running in steady state will be less than this number when - * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when - * the work left to do is less than max parallelism. - * - * Generated from protobuf field int32 parallelism = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parallelism = 0; - /** - * Output only. Specifies the desired number of tasks the execution should - * run. Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. - * - * Generated from protobuf field int32 task_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $task_count = 0; - /** - * Output only. The template used to create tasks for this execution. - * - * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $template = null; - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The Condition of this Execution, containing its readiness - * status, and detailed error information in case it did not reach the desired - * state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $conditions; - /** - * Output only. The generation of this Execution. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field int64 observed_generation = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $observed_generation = 0; - /** - * Output only. The number of actively running tasks. - * - * Generated from protobuf field int32 running_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $running_count = 0; - /** - * Output only. The number of tasks which reached phase Succeeded. - * - * Generated from protobuf field int32 succeeded_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $succeeded_count = 0; - /** - * Output only. The number of tasks which reached phase Failed. - * - * Generated from protobuf field int32 failed_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failed_count = 0; - /** - * Output only. The number of tasks which reached phase Cancelled. - * - * Generated from protobuf field int32 cancelled_count = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cancelled_count = 0; - /** - * Output only. The number of tasks which have retried at least once. - * - * Generated from protobuf field int32 retried_count = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $retried_count = 0; - /** - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * - * Generated from protobuf field string log_uri = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $log_uri = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique name of this Execution. - * @type string $uid - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * @type string $creator - * Output only. Email address of the authenticated creator. - * @type int|string $generation - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Represents time when the execution was acknowledged by the - * execution controller. It is not guaranteed to be set in happens-before - * order across separate operations. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. Represents time when the execution started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * @type \Google\Protobuf\Timestamp $completion_time - * Output only. Represents time when the execution was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * @type int $launch_stage - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * @type string $job - * Output only. The name of the parent Job. - * @type int $parallelism - * Output only. Specifies the maximum desired number of tasks the execution - * should run at any given time. Must be <= task_count. The actual number of - * tasks running in steady state will be less than this number when - * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when - * the work left to do is less than max parallelism. - * @type int $task_count - * Output only. Specifies the desired number of tasks the execution should - * run. Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. - * @type \Google\Cloud\Run\V2\TaskTemplate $template - * Output only. The template used to create tasks for this execution. - * @type bool $reconciling - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions - * Output only. The Condition of this Execution, containing its readiness - * status, and detailed error information in case it did not reach the desired - * state. - * @type int|string $observed_generation - * Output only. The generation of this Execution. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * @type int $running_count - * Output only. The number of actively running tasks. - * @type int $succeeded_count - * Output only. The number of tasks which reached phase Succeeded. - * @type int $failed_count - * Output only. The number of tasks which reached phase Failed. - * @type int $cancelled_count - * Output only. The number of tasks which reached phase Cancelled. - * @type int $retried_count - * Output only. The number of tasks which have retried at least once. - * @type string $log_uri - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type string $etag - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique name of this Execution. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique name of this Execution. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Represents time when the execution was acknowledged by the - * execution controller. It is not guaranteed to be set in happens-before - * order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Represents time when the execution was acknowledged by the - * execution controller. It is not guaranteed to be set in happens-before - * order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Represents time when the execution started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. Represents time when the execution started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. Represents time when the execution was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompletionTime() - { - return $this->completion_time; - } - - public function hasCompletionTime() - { - return isset($this->completion_time); - } - - public function clearCompletionTime() - { - unset($this->completion_time); - } - - /** - * Output only. Represents time when the execution was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompletionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->completion_time = $var; - - return $this; - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 11; - * @return int - */ - public function getLaunchStage() - { - return $this->launch_stage; - } - - /** - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 11; - * @param int $var - * @return $this - */ - public function setLaunchStage($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->launch_stage = $var; - - return $this; - } - - /** - * Output only. The name of the parent Job. - * - * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getJob() - { - return $this->job; - } - - /** - * Output only. The name of the parent Job. - * - * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkString($var, True); - $this->job = $var; - - return $this; - } - - /** - * Output only. Specifies the maximum desired number of tasks the execution - * should run at any given time. Must be <= task_count. The actual number of - * tasks running in steady state will be less than this number when - * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when - * the work left to do is less than max parallelism. - * - * Generated from protobuf field int32 parallelism = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getParallelism() - { - return $this->parallelism; - } - - /** - * Output only. Specifies the maximum desired number of tasks the execution - * should run at any given time. Must be <= task_count. The actual number of - * tasks running in steady state will be less than this number when - * ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when - * the work left to do is less than max parallelism. - * - * Generated from protobuf field int32 parallelism = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setParallelism($var) - { - GPBUtil::checkInt32($var); - $this->parallelism = $var; - - return $this; - } - - /** - * Output only. Specifies the desired number of tasks the execution should - * run. Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. - * - * Generated from protobuf field int32 task_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTaskCount() - { - return $this->task_count; - } - - /** - * Output only. Specifies the desired number of tasks the execution should - * run. Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. - * - * Generated from protobuf field int32 task_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTaskCount($var) - { - GPBUtil::checkInt32($var); - $this->task_count = $var; - - return $this; - } - - /** - * Output only. The template used to create tasks for this execution. - * - * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\TaskTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Output only. The template used to create tasks for this execution. - * - * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\TaskTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TaskTemplate::class); - $this->template = $var; - - return $this; - } - - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The Condition of this Execution, containing its readiness - * status, and detailed error information in case it did not reach the desired - * state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Output only. The Condition of this Execution, containing its readiness - * status, and detailed error information in case it did not reach the desired - * state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * Output only. The generation of this Execution. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field int64 observed_generation = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getObservedGeneration() - { - return $this->observed_generation; - } - - /** - * Output only. The generation of this Execution. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field int64 observed_generation = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setObservedGeneration($var) - { - GPBUtil::checkInt64($var); - $this->observed_generation = $var; - - return $this; - } - - /** - * Output only. The number of actively running tasks. - * - * Generated from protobuf field int32 running_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRunningCount() - { - return $this->running_count; - } - - /** - * Output only. The number of actively running tasks. - * - * Generated from protobuf field int32 running_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRunningCount($var) - { - GPBUtil::checkInt32($var); - $this->running_count = $var; - - return $this; - } - - /** - * Output only. The number of tasks which reached phase Succeeded. - * - * Generated from protobuf field int32 succeeded_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSucceededCount() - { - return $this->succeeded_count; - } - - /** - * Output only. The number of tasks which reached phase Succeeded. - * - * Generated from protobuf field int32 succeeded_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSucceededCount($var) - { - GPBUtil::checkInt32($var); - $this->succeeded_count = $var; - - return $this; - } - - /** - * Output only. The number of tasks which reached phase Failed. - * - * Generated from protobuf field int32 failed_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFailedCount() - { - return $this->failed_count; - } - - /** - * Output only. The number of tasks which reached phase Failed. - * - * Generated from protobuf field int32 failed_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFailedCount($var) - { - GPBUtil::checkInt32($var); - $this->failed_count = $var; - - return $this; - } - - /** - * Output only. The number of tasks which reached phase Cancelled. - * - * Generated from protobuf field int32 cancelled_count = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCancelledCount() - { - return $this->cancelled_count; - } - - /** - * Output only. The number of tasks which reached phase Cancelled. - * - * Generated from protobuf field int32 cancelled_count = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCancelledCount($var) - { - GPBUtil::checkInt32($var); - $this->cancelled_count = $var; - - return $this; - } - - /** - * Output only. The number of tasks which have retried at least once. - * - * Generated from protobuf field int32 retried_count = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRetriedCount() - { - return $this->retried_count; - } - - /** - * Output only. The number of tasks which have retried at least once. - * - * Generated from protobuf field int32 retried_count = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRetriedCount($var) - { - GPBUtil::checkInt32($var); - $this->retried_count = $var; - - return $this; - } - - /** - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * - * Generated from protobuf field string log_uri = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLogUri() - { - return $this->log_uri; - } - - /** - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * - * Generated from protobuf field string log_uri = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLogUri($var) - { - GPBUtil::checkString($var, True); - $this->log_uri = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php deleted file mode 100644 index da77efe77d8f..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionEnvironment.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.run.v2.ExecutionEnvironment - */ -class ExecutionEnvironment -{ - /** - * Unspecified - * - * Generated from protobuf enum EXECUTION_ENVIRONMENT_UNSPECIFIED = 0; - */ - const EXECUTION_ENVIRONMENT_UNSPECIFIED = 0; - /** - * Uses the First Generation environment. - * - * Generated from protobuf enum EXECUTION_ENVIRONMENT_GEN1 = 1; - */ - const EXECUTION_ENVIRONMENT_GEN1 = 1; - /** - * Uses Second Generation environment. - * - * Generated from protobuf enum EXECUTION_ENVIRONMENT_GEN2 = 2; - */ - const EXECUTION_ENVIRONMENT_GEN2 = 2; - - private static $valueToName = [ - self::EXECUTION_ENVIRONMENT_UNSPECIFIED => 'EXECUTION_ENVIRONMENT_UNSPECIFIED', - self::EXECUTION_ENVIRONMENT_GEN1 => 'EXECUTION_ENVIRONMENT_GEN1', - self::EXECUTION_ENVIRONMENT_GEN2 => 'EXECUTION_ENVIRONMENT_GEN2', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php deleted file mode 100644 index 4de3dd33ddee..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.run.v2.ExecutionReference - */ -class ExecutionReference extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the execution. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Creation timestamp of the execution. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * Creation timestamp of the execution. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 3; - */ - protected $completion_time = null; - /** - * The deletion time of the execution. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - */ - protected $delete_time = null; - /** - * Status for the execution completion. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionReference.CompletionStatus completion_status = 4; - */ - protected $completion_status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the execution. - * @type \Google\Protobuf\Timestamp $create_time - * Creation timestamp of the execution. - * @type \Google\Protobuf\Timestamp $completion_time - * Creation timestamp of the execution. - * @type \Google\Protobuf\Timestamp $delete_time - * The deletion time of the execution. It is only - * populated as a response to a Delete request. - * @type int $completion_status - * Status for the execution completion. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Name of the execution. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the execution. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Creation timestamp of the execution. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Creation timestamp of the execution. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Creation timestamp of the execution. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompletionTime() - { - return $this->completion_time; - } - - public function hasCompletionTime() - { - return isset($this->completion_time); - } - - public function clearCompletionTime() - { - unset($this->completion_time); - } - - /** - * Creation timestamp of the execution. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompletionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->completion_time = $var; - - return $this; - } - - /** - * The deletion time of the execution. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * The deletion time of the execution. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Status for the execution completion. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionReference.CompletionStatus completion_status = 4; - * @return int - */ - public function getCompletionStatus() - { - return $this->completion_status; - } - - /** - * Status for the execution completion. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionReference.CompletionStatus completion_status = 4; - * @param int $var - * @return $this - */ - public function setCompletionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionReference\CompletionStatus::class); - $this->completion_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php deleted file mode 100644 index 329e05e4330a..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionReference/CompletionStatus.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.run.v2.ExecutionReference.CompletionStatus - */ -class CompletionStatus -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum COMPLETION_STATUS_UNSPECIFIED = 0; - */ - const COMPLETION_STATUS_UNSPECIFIED = 0; - /** - * Job execution has succeeded. - * - * Generated from protobuf enum EXECUTION_SUCCEEDED = 1; - */ - const EXECUTION_SUCCEEDED = 1; - /** - * Job execution has failed. - * - * Generated from protobuf enum EXECUTION_FAILED = 2; - */ - const EXECUTION_FAILED = 2; - /** - * Job execution is running normally. - * - * Generated from protobuf enum EXECUTION_RUNNING = 3; - */ - const EXECUTION_RUNNING = 3; - /** - * Waiting for backing resources to be provisioned. - * - * Generated from protobuf enum EXECUTION_PENDING = 4; - */ - const EXECUTION_PENDING = 4; - /** - * Job execution has been cancelled by the user. - * - * Generated from protobuf enum EXECUTION_CANCELLED = 5; - */ - const EXECUTION_CANCELLED = 5; - - private static $valueToName = [ - self::COMPLETION_STATUS_UNSPECIFIED => 'COMPLETION_STATUS_UNSPECIFIED', - self::EXECUTION_SUCCEEDED => 'EXECUTION_SUCCEEDED', - self::EXECUTION_FAILED => 'EXECUTION_FAILED', - self::EXECUTION_RUNNING => 'EXECUTION_RUNNING', - self::EXECUTION_PENDING => 'EXECUTION_PENDING', - self::EXECUTION_CANCELLED => 'EXECUTION_CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompletionStatus::class, \Google\Cloud\Run\V2\ExecutionReference_CompletionStatus::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php deleted file mode 100644 index ebfae139e069..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ExecutionTemplate.php +++ /dev/null @@ -1,318 +0,0 @@ -google.cloud.run.v2.ExecutionTemplate - */ -class ExecutionTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 ExecutionTemplate. - * - * Generated from protobuf field map labels = 1; - */ - private $labels; - /** - * Unstructured key value map that may be set by external tools to store and - * arbitrary metadata. They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 ExecutionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 2; - */ - private $annotations; - /** - * Optional. Specifies the maximum desired number of tasks the execution - * should run at given time. When the job is run, if this field is 0 or unset, - * the maximum possible value will be used for that execution. The actual - * number of tasks running in steady state will be less than this number when - * there are fewer tasks waiting to be completed remaining, i.e. when the work - * left to do is less than max parallelism. - * - * Generated from protobuf field int32 parallelism = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $parallelism = 0; - /** - * Specifies the desired number of tasks the execution should run. - * Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. Defaults to 1. - * - * Generated from protobuf field int32 task_count = 4; - */ - protected $task_count = 0; - /** - * Required. Describes the task(s) that will be created when executing an - * execution. - * - * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $labels - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 ExecutionTemplate. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Unstructured key value map that may be set by external tools to store and - * arbitrary metadata. They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 ExecutionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * @type int $parallelism - * Optional. Specifies the maximum desired number of tasks the execution - * should run at given time. When the job is run, if this field is 0 or unset, - * the maximum possible value will be used for that execution. The actual - * number of tasks running in steady state will be less than this number when - * there are fewer tasks waiting to be completed remaining, i.e. when the work - * left to do is less than max parallelism. - * @type int $task_count - * Specifies the desired number of tasks the execution should run. - * Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. Defaults to 1. - * @type \Google\Cloud\Run\V2\TaskTemplate $template - * Required. Describes the task(s) that will be created when executing an - * execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\ExecutionTemplate::initOnce(); - parent::__construct($data); - } - - /** - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 ExecutionTemplate. - * - * Generated from protobuf field map labels = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 ExecutionTemplate. - * - * Generated from protobuf field map labels = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Unstructured key value map that may be set by external tools to store and - * arbitrary metadata. They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 ExecutionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Unstructured key value map that may be set by external tools to store and - * arbitrary metadata. They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 ExecutionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Optional. Specifies the maximum desired number of tasks the execution - * should run at given time. When the job is run, if this field is 0 or unset, - * the maximum possible value will be used for that execution. The actual - * number of tasks running in steady state will be less than this number when - * there are fewer tasks waiting to be completed remaining, i.e. when the work - * left to do is less than max parallelism. - * - * Generated from protobuf field int32 parallelism = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getParallelism() - { - return $this->parallelism; - } - - /** - * Optional. Specifies the maximum desired number of tasks the execution - * should run at given time. When the job is run, if this field is 0 or unset, - * the maximum possible value will be used for that execution. The actual - * number of tasks running in steady state will be less than this number when - * there are fewer tasks waiting to be completed remaining, i.e. when the work - * left to do is less than max parallelism. - * - * Generated from protobuf field int32 parallelism = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setParallelism($var) - { - GPBUtil::checkInt32($var); - $this->parallelism = $var; - - return $this; - } - - /** - * Specifies the desired number of tasks the execution should run. - * Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. Defaults to 1. - * - * Generated from protobuf field int32 task_count = 4; - * @return int - */ - public function getTaskCount() - { - return $this->task_count; - } - - /** - * Specifies the desired number of tasks the execution should run. - * Setting to 1 means that parallelism is limited to 1 and the success of - * that task signals the success of the execution. Defaults to 1. - * - * Generated from protobuf field int32 task_count = 4; - * @param int $var - * @return $this - */ - public function setTaskCount($var) - { - GPBUtil::checkInt32($var); - $this->task_count = $var; - - return $this; - } - - /** - * Required. Describes the task(s) that will be created when executing an - * execution. - * - * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\TaskTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Required. Describes the task(s) that will be created when executing an - * execution. - * - * Generated from protobuf field .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\TaskTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TaskTemplate::class); - $this->template = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php deleted file mode 100644 index 659846b4e6bd..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GCSVolumeSource.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.run.v2.GCSVolumeSource - */ -class GCSVolumeSource extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - */ - protected $bucket = ''; - /** - * If true, the volume will be mounted as read only for all mounts. - * - * Generated from protobuf field bool read_only = 2; - */ - protected $read_only = false; - /** - * A list of additional flags to pass to the gcsfuse CLI. - * Options should be specified without the leading "--". - * - * Generated from protobuf field repeated string mount_options = 3; - */ - private $mount_options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Cloud Storage Bucket name. - * @type bool $read_only - * If true, the volume will be mounted as read only for all mounts. - * @type array|\Google\Protobuf\Internal\RepeatedField $mount_options - * A list of additional flags to pass to the gcsfuse CLI. - * Options should be specified without the leading "--". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * If true, the volume will be mounted as read only for all mounts. - * - * Generated from protobuf field bool read_only = 2; - * @return bool - */ - public function getReadOnly() - { - return $this->read_only; - } - - /** - * If true, the volume will be mounted as read only for all mounts. - * - * Generated from protobuf field bool read_only = 2; - * @param bool $var - * @return $this - */ - public function setReadOnly($var) - { - GPBUtil::checkBool($var); - $this->read_only = $var; - - return $this; - } - - /** - * A list of additional flags to pass to the gcsfuse CLI. - * Options should be specified without the leading "--". - * - * Generated from protobuf field repeated string mount_options = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMountOptions() - { - return $this->mount_options; - } - - /** - * A list of additional flags to pass to the gcsfuse CLI. - * Options should be specified without the leading "--". - * - * Generated from protobuf field repeated string mount_options = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMountOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mount_options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php deleted file mode 100644 index 826f06cb4711..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GRPCAction.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.run.v2.GRPCAction - */ -class GRPCAction extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Port number of the gRPC service. Number must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $port = 0; - /** - * Optional. Service is the name of the service to place in the gRPC - * HealthCheckRequest (see - * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this - * is not specified, the default behavior is defined by gRPC. - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $port - * Optional. Port number of the gRPC service. Number must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * @type string $service - * Optional. Service is the name of the service to place in the gRPC - * HealthCheckRequest (see - * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this - * is not specified, the default behavior is defined by gRPC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Port number of the gRPC service. Number must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Optional. Port number of the gRPC service. Number must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Optional. Service is the name of the service to place in the gRPC - * HealthCheckRequest (see - * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this - * is not specified, the default behavior is defined by gRPC. - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Optional. Service is the name of the service to place in the gRPC - * HealthCheckRequest (see - * https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this - * is not specified, the default behavior is defined by gRPC. - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php deleted file mode 100644 index 8ecf98e5ef55..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetExecutionRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.run.v2.GetExecutionRequest - */ -class GetExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Execution. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the Execution. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. Please see - * {@see ExecutionsClient::executionName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\GetExecutionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Execution. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Execution. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Execution. - * Format: - * `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, - * where `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php deleted file mode 100644 index 8d43efd711f4..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetJobRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.run.v2.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. Please see - * {@see JobsClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\GetJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php deleted file mode 100644 index 23fa3012691d..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetRevisionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.run.v2.GetRevisionRequest - */ -class GetRevisionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Revision. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the Revision. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * Please see {@see RevisionsClient::revisionName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\GetRevisionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Revision. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Revision. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Revision. - * Format: - * projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php deleted file mode 100644 index 4a5aeb399c01..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetServiceRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.run.v2.GetServiceRequest - */ -class GetServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. Please see - * {@see ServicesClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\GetServiceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Service. - * Format: projects/{project}/locations/{location}/services/{service}, where - * {project} can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php deleted file mode 100644 index 925a9bb98395..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetTaskRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.run.v2.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Task. - * Format: - * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the Task. - * Format: - * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} - * Please see {@see TasksClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\GetTaskRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Task. - * Format: - * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Task. - * Format: - * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Task. - * Format: - * projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php deleted file mode 100644 index 2e28539a3c31..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/GetWorkerPoolRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.run.v2.GetWorkerPoolRequest - */ -class GetWorkerPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. Please see - * {@see WorkerPoolsClient::workerPoolName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\GetWorkerPoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the WorkerPool. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_pool}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php deleted file mode 100644 index 371a24d2a139..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPGetAction.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.run.v2.HTTPGetAction - */ -class HTTPGetAction extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Path to access on the HTTP server. Defaults to '/'. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - /** - * Optional. Custom headers to set in the request. HTTP allows repeated - * headers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.HTTPHeader http_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $http_headers; - /** - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Optional. Path to access on the HTTP server. Defaults to '/'. - * @type array<\Google\Cloud\Run\V2\HTTPHeader>|\Google\Protobuf\Internal\RepeatedField $http_headers - * Optional. Custom headers to set in the request. HTTP allows repeated - * headers. - * @type int $port - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Path to access on the HTTP server. Defaults to '/'. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. Path to access on the HTTP server. Defaults to '/'. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Optional. Custom headers to set in the request. HTTP allows repeated - * headers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.HTTPHeader http_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHttpHeaders() - { - return $this->http_headers; - } - - /** - * Optional. Custom headers to set in the request. HTTP allows repeated - * headers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.HTTPHeader http_headers = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Run\V2\HTTPHeader>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHttpHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\HTTPHeader::class); - $this->http_headers = $arr; - - return $this; - } - - /** - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php deleted file mode 100644 index 036332d24bb8..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/HTTPHeader.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.run.v2.HTTPHeader - */ -class HTTPHeader extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The header field name - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. The header field value - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The header field name - * @type string $value - * Optional. The header field value - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The header field name - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The header field name - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The header field value - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Optional. The header field value - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php deleted file mode 100644 index c9e391f2e464..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/IngressTraffic.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.run.v2.IngressTraffic - */ -class IngressTraffic -{ - /** - * Unspecified - * - * Generated from protobuf enum INGRESS_TRAFFIC_UNSPECIFIED = 0; - */ - const INGRESS_TRAFFIC_UNSPECIFIED = 0; - /** - * All inbound traffic is allowed. - * - * Generated from protobuf enum INGRESS_TRAFFIC_ALL = 1; - */ - const INGRESS_TRAFFIC_ALL = 1; - /** - * Only internal traffic is allowed. - * - * Generated from protobuf enum INGRESS_TRAFFIC_INTERNAL_ONLY = 2; - */ - const INGRESS_TRAFFIC_INTERNAL_ONLY = 2; - /** - * Both internal and Google Cloud Load Balancer traffic is allowed. - * - * Generated from protobuf enum INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER = 3; - */ - const INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER = 3; - /** - * No ingress traffic is allowed. - * - * Generated from protobuf enum INGRESS_TRAFFIC_NONE = 4; - */ - const INGRESS_TRAFFIC_NONE = 4; - - private static $valueToName = [ - self::INGRESS_TRAFFIC_UNSPECIFIED => 'INGRESS_TRAFFIC_UNSPECIFIED', - self::INGRESS_TRAFFIC_ALL => 'INGRESS_TRAFFIC_ALL', - self::INGRESS_TRAFFIC_INTERNAL_ONLY => 'INGRESS_TRAFFIC_INTERNAL_ONLY', - self::INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER => 'INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER', - self::INGRESS_TRAFFIC_NONE => 'INGRESS_TRAFFIC_NONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php deleted file mode 100644 index 70a53b9e4157..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplit.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.run.v2.InstanceSplit - */ -class InstanceSplit extends \Google\Protobuf\Internal\Message -{ - /** - * The allocation type for this instance split. - * - * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; - */ - protected $type = 0; - /** - * Revision to which to assign this portion of instances, if split allocation - * is by revision. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - */ - protected $revision = ''; - /** - * Specifies percent of the instance split to this Revision. - * This defaults to zero if unspecified. - * - * Generated from protobuf field int32 percent = 3; - */ - protected $percent = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The allocation type for this instance split. - * @type string $revision - * Revision to which to assign this portion of instances, if split allocation - * is by revision. - * @type int $percent - * Specifies percent of the instance split to this Revision. - * This defaults to zero if unspecified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\InstanceSplit::initOnce(); - parent::__construct($data); - } - - /** - * The allocation type for this instance split. - * - * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The allocation type for this instance split. - * - * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\InstanceSplitAllocationType::class); - $this->type = $var; - - return $this; - } - - /** - * Revision to which to assign this portion of instances, if split allocation - * is by revision. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Revision to which to assign this portion of instances, if split allocation - * is by revision. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Specifies percent of the instance split to this Revision. - * This defaults to zero if unspecified. - * - * Generated from protobuf field int32 percent = 3; - * @return int - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Specifies percent of the instance split to this Revision. - * This defaults to zero if unspecified. - * - * Generated from protobuf field int32 percent = 3; - * @param int $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkInt32($var); - $this->percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php deleted file mode 100644 index 39b29c52f47f..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitAllocationType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.run.v2.InstanceSplitAllocationType - */ -class InstanceSplitAllocationType -{ - /** - * Unspecified instance allocation type. - * - * Generated from protobuf enum INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED = 0; - */ - const INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED = 0; - /** - * Allocates instances to the Service's latest ready Revision. - * - * Generated from protobuf enum INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST = 1; - */ - const INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST = 1; - /** - * Allocates instances to a Revision by name. - * - * Generated from protobuf enum INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION = 2; - */ - const INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION = 2; - - private static $valueToName = [ - self::INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED => 'INSTANCE_SPLIT_ALLOCATION_TYPE_UNSPECIFIED', - self::INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST => 'INSTANCE_SPLIT_ALLOCATION_TYPE_LATEST', - self::INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION => 'INSTANCE_SPLIT_ALLOCATION_TYPE_REVISION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php deleted file mode 100644 index e938cdff39b3..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/InstanceSplitStatus.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.run.v2.InstanceSplitStatus - */ -class InstanceSplitStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The allocation type for this instance split. - * - * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; - */ - protected $type = 0; - /** - * Revision to which this instance split is assigned. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - */ - protected $revision = ''; - /** - * Specifies percent of the instance split to this Revision. - * - * Generated from protobuf field int32 percent = 3; - */ - protected $percent = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The allocation type for this instance split. - * @type string $revision - * Revision to which this instance split is assigned. - * @type int $percent - * Specifies percent of the instance split to this Revision. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\InstanceSplit::initOnce(); - parent::__construct($data); - } - - /** - * The allocation type for this instance split. - * - * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The allocation type for this instance split. - * - * Generated from protobuf field .google.cloud.run.v2.InstanceSplitAllocationType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\InstanceSplitAllocationType::class); - $this->type = $var; - - return $this; - } - - /** - * Revision to which this instance split is assigned. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Revision to which this instance split is assigned. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Specifies percent of the instance split to this Revision. - * - * Generated from protobuf field int32 percent = 3; - * @return int - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Specifies percent of the instance split to this Revision. - * - * Generated from protobuf field int32 percent = 3; - * @param int $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkInt32($var); - $this->percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php deleted file mode 100644 index 3a7f4ea5d25c..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Job.php +++ /dev/null @@ -1,1245 +0,0 @@ -google.cloud.run.v2.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * The fully qualified name of this Job. - * Format: - * projects/{project}/locations/{location}/jobs/{job} - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generation = 0; - /** - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Job. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected on new resources. All system - * annotations in v1 now have a corresponding field in v2 Job. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_modifier = ''; - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 12; - */ - protected $client = ''; - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 13; - */ - protected $client_version = ''; - /** - * The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 14; - */ - protected $launch_stage = 0; - /** - * Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 15; - */ - protected $binary_authorization = null; - /** - * Required. The template used to create executions for this Job. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionTemplate template = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = null; - /** - * Output only. The generation of this Job. See comments in `reconciling` for - * additional information on reconciliation process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $observed_generation = 0; - /** - * Output only. The Condition of this Job, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $terminal_condition = null; - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Job does not reach - * its desired state. See comments in `reconciling` for additional information - * on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $conditions; - /** - * Output only. Number of executions created for this job. - * - * Generated from protobuf field int32 execution_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_count = 0; - /** - * Output only. Name of the last created execution. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionReference latest_created_execution = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_created_execution = null; - /** - * Output only. Returns true if the Job is currently being acted upon by the - * system to bring it into the desired state. - * When a new Job is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Job to the - * desired state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation` and - * `latest_succeeded_execution`, will have transient values that might - * mismatch the intended state: Once reconciliation is over (and this field is - * false), there are two possible outcomes: reconciliation succeeded and the - * state matches the Job, or there was an error, and reconciliation failed. - * This state can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `observed_generation` and `generation`, `latest_succeeded_execution` and - * `latest_created_execution`. - * If reconciliation failed, `observed_generation` and - * `latest_succeeded_execution` will have the state of the last succeeded - * execution or empty for newly created Job. Additional information on the - * failure can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - protected $create_execution; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The fully qualified name of this Job. - * Format: - * projects/{project}/locations/{location}/jobs/{job} - * @type string $uid - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * @type int|string $generation - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Job. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected on new resources. All system - * annotations in v1 now have a corresponding field in v2 Job. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * @type string $creator - * Output only. Email address of the authenticated creator. - * @type string $last_modifier - * Output only. Email address of the last authenticated modifier. - * @type string $client - * Arbitrary identifier for the API client. - * @type string $client_version - * Arbitrary version identifier for the API client. - * @type int $launch_stage - * The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * @type \Google\Cloud\Run\V2\BinaryAuthorization $binary_authorization - * Settings for the Binary Authorization feature. - * @type \Google\Cloud\Run\V2\ExecutionTemplate $template - * Required. The template used to create executions for this Job. - * @type int|string $observed_generation - * Output only. The generation of this Job. See comments in `reconciling` for - * additional information on reconciliation process in Cloud Run. - * @type \Google\Cloud\Run\V2\Condition $terminal_condition - * Output only. The Condition of this Job, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Job does not reach - * its desired state. See comments in `reconciling` for additional information - * on reconciliation process in Cloud Run. - * @type int $execution_count - * Output only. Number of executions created for this job. - * @type \Google\Cloud\Run\V2\ExecutionReference $latest_created_execution - * Output only. Name of the last created execution. - * @type bool $reconciling - * Output only. Returns true if the Job is currently being acted upon by the - * system to bring it into the desired state. - * When a new Job is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Job to the - * desired state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation` and - * `latest_succeeded_execution`, will have transient values that might - * mismatch the intended state: Once reconciliation is over (and this field is - * false), there are two possible outcomes: reconciliation succeeded and the - * state matches the Job, or there was an error, and reconciliation failed. - * This state can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `observed_generation` and `generation`, `latest_succeeded_execution` and - * `latest_created_execution`. - * If reconciliation failed, `observed_generation` and - * `latest_succeeded_execution` will have the state of the last succeeded - * execution or empty for newly created Job. Additional information on the - * failure can be found in `terminal_condition` and `conditions`. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type string $start_execution_token - * A unique string used as a suffix creating a new execution. The Job will - * become ready when the execution is successfully started. - * The sum of job name and token length must be fewer than 63 characters. - * @type string $run_execution_token - * A unique string used as a suffix for creating a new execution. The Job - * will become ready when the execution is successfully completed. - * The sum of job name and token length must be fewer than 63 characters. - * @type string $etag - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * The fully qualified name of this Job. - * Format: - * projects/{project}/locations/{location}/jobs/{job} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The fully qualified name of this Job. - * Format: - * projects/{project}/locations/{location}/jobs/{job} - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned unique identifier for the Execution. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - - /** - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Job. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Unstructured key value map that can be used to organize and categorize - * objects. - * User-provided labels are shared with Google's billing system, so they can - * be used to filter, or break down billing charges by team, component, - * environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Job. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected on new resources. All system - * annotations in v1 now have a corresponding field in v2 Job. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected on new resources. All system - * annotations in v1 now have a corresponding field in v2 Job. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLastModifier() - { - return $this->last_modifier; - } - - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLastModifier($var) - { - GPBUtil::checkString($var, True); - $this->last_modifier = $var; - - return $this; - } - - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 12; - * @return string - */ - public function getClient() - { - return $this->client; - } - - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 12; - * @param string $var - * @return $this - */ - public function setClient($var) - { - GPBUtil::checkString($var, True); - $this->client = $var; - - return $this; - } - - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 13; - * @return string - */ - public function getClientVersion() - { - return $this->client_version; - } - - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 13; - * @param string $var - * @return $this - */ - public function setClientVersion($var) - { - GPBUtil::checkString($var, True); - $this->client_version = $var; - - return $this; - } - - /** - * The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 14; - * @return int - */ - public function getLaunchStage() - { - return $this->launch_stage; - } - - /** - * The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 14; - * @param int $var - * @return $this - */ - public function setLaunchStage($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->launch_stage = $var; - - return $this; - } - - /** - * Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 15; - * @return \Google\Cloud\Run\V2\BinaryAuthorization|null - */ - public function getBinaryAuthorization() - { - return $this->binary_authorization; - } - - public function hasBinaryAuthorization() - { - return isset($this->binary_authorization); - } - - public function clearBinaryAuthorization() - { - unset($this->binary_authorization); - } - - /** - * Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 15; - * @param \Google\Cloud\Run\V2\BinaryAuthorization $var - * @return $this - */ - public function setBinaryAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BinaryAuthorization::class); - $this->binary_authorization = $var; - - return $this; - } - - /** - * Required. The template used to create executions for this Job. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionTemplate template = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\ExecutionTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Required. The template used to create executions for this Job. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionTemplate template = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\ExecutionTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ExecutionTemplate::class); - $this->template = $var; - - return $this; - } - - /** - * Output only. The generation of this Job. See comments in `reconciling` for - * additional information on reconciliation process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getObservedGeneration() - { - return $this->observed_generation; - } - - /** - * Output only. The generation of this Job. See comments in `reconciling` for - * additional information on reconciliation process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setObservedGeneration($var) - { - GPBUtil::checkInt64($var); - $this->observed_generation = $var; - - return $this; - } - - /** - * Output only. The Condition of this Job, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\Condition|null - */ - public function getTerminalCondition() - { - return $this->terminal_condition; - } - - public function hasTerminalCondition() - { - return isset($this->terminal_condition); - } - - public function clearTerminalCondition() - { - unset($this->terminal_condition); - } - - /** - * Output only. The Condition of this Job, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\Condition $var - * @return $this - */ - public function setTerminalCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Condition::class); - $this->terminal_condition = $var; - - return $this; - } - - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Job does not reach - * its desired state. See comments in `reconciling` for additional information - * on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Job does not reach - * its desired state. See comments in `reconciling` for additional information - * on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * Output only. Number of executions created for this job. - * - * Generated from protobuf field int32 execution_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getExecutionCount() - { - return $this->execution_count; - } - - /** - * Output only. Number of executions created for this job. - * - * Generated from protobuf field int32 execution_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setExecutionCount($var) - { - GPBUtil::checkInt32($var); - $this->execution_count = $var; - - return $this; - } - - /** - * Output only. Name of the last created execution. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionReference latest_created_execution = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\ExecutionReference|null - */ - public function getLatestCreatedExecution() - { - return $this->latest_created_execution; - } - - public function hasLatestCreatedExecution() - { - return isset($this->latest_created_execution); - } - - public function clearLatestCreatedExecution() - { - unset($this->latest_created_execution); - } - - /** - * Output only. Name of the last created execution. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionReference latest_created_execution = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\ExecutionReference $var - * @return $this - */ - public function setLatestCreatedExecution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ExecutionReference::class); - $this->latest_created_execution = $var; - - return $this; - } - - /** - * Output only. Returns true if the Job is currently being acted upon by the - * system to bring it into the desired state. - * When a new Job is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Job to the - * desired state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation` and - * `latest_succeeded_execution`, will have transient values that might - * mismatch the intended state: Once reconciliation is over (and this field is - * false), there are two possible outcomes: reconciliation succeeded and the - * state matches the Job, or there was an error, and reconciliation failed. - * This state can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `observed_generation` and `generation`, `latest_succeeded_execution` and - * `latest_created_execution`. - * If reconciliation failed, `observed_generation` and - * `latest_succeeded_execution` will have the state of the last succeeded - * execution or empty for newly created Job. Additional information on the - * failure can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. Returns true if the Job is currently being acted upon by the - * system to bring it into the desired state. - * When a new Job is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Job to the - * desired state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation` and - * `latest_succeeded_execution`, will have transient values that might - * mismatch the intended state: Once reconciliation is over (and this field is - * false), there are two possible outcomes: reconciliation succeeded and the - * state matches the Job, or there was an error, and reconciliation failed. - * This state can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `observed_generation` and `generation`, `latest_succeeded_execution` and - * `latest_created_execution`. - * If reconciliation failed, `observed_generation` and - * `latest_succeeded_execution` will have the state of the last succeeded - * execution or empty for newly created Job. Additional information on the - * failure can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * A unique string used as a suffix creating a new execution. The Job will - * become ready when the execution is successfully started. - * The sum of job name and token length must be fewer than 63 characters. - * - * Generated from protobuf field string start_execution_token = 26; - * @return string - */ - public function getStartExecutionToken() - { - return $this->readOneof(26); - } - - public function hasStartExecutionToken() - { - return $this->hasOneof(26); - } - - /** - * A unique string used as a suffix creating a new execution. The Job will - * become ready when the execution is successfully started. - * The sum of job name and token length must be fewer than 63 characters. - * - * Generated from protobuf field string start_execution_token = 26; - * @param string $var - * @return $this - */ - public function setStartExecutionToken($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * A unique string used as a suffix for creating a new execution. The Job - * will become ready when the execution is successfully completed. - * The sum of job name and token length must be fewer than 63 characters. - * - * Generated from protobuf field string run_execution_token = 27; - * @return string - */ - public function getRunExecutionToken() - { - return $this->readOneof(27); - } - - public function hasRunExecutionToken() - { - return $this->hasOneof(27); - } - - /** - * A unique string used as a suffix for creating a new execution. The Job - * will become ready when the execution is successfully completed. - * The sum of job name and token length must be fewer than 63 characters. - * - * Generated from protobuf field string run_execution_token = 27; - * @param string $var - * @return $this - */ - public function setRunExecutionToken($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(27, $var); - - return $this; - } - - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * @return string - */ - public function getCreateExecution() - { - return $this->whichOneof("create_execution"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php deleted file mode 100644 index 909879ad84ea..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.run.v2.ListExecutionsRequest - */ -class ListExecutionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of Executions to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received from a previous call to ListExecutions. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $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}`, where - * `{project}` can be project id or number. Please see - * {@see ExecutionsClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\ListExecutionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $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}`, where - * `{project}` can be project id or number. - * @type int $page_size - * Maximum number of Executions to return in this call. - * @type string $page_token - * A page token received from a previous call to ListExecutions. - * All other parameters must match. - * @type bool $show_deleted - * If true, returns deleted (but unexpired) resources along with active ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); - parent::__construct($data); - } - - /** - * 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}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->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}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of Executions to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Executions to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous call to ListExecutions. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous call to ListExecutions. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php deleted file mode 100644 index 66ffa08a98f2..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListExecutionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.run.v2.ListExecutionsResponse - */ -class ListExecutionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resulting list of Executions. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Execution executions = 1; - */ - private $executions; - /** - * A token indicating there are more items than page_size. Use it in the next - * ListExecutions request to continue. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\Execution>|\Google\Protobuf\Internal\RepeatedField $executions - * The resulting list of Executions. - * @type string $next_page_token - * A token indicating there are more items than page_size. Use it in the next - * ListExecutions request to continue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Execution::initOnce(); - parent::__construct($data); - } - - /** - * The resulting list of Executions. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Execution executions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExecutions() - { - return $this->executions; - } - - /** - * The resulting list of Executions. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Execution executions = 1; - * @param array<\Google\Cloud\Run\V2\Execution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExecutions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Execution::class); - $this->executions = $arr; - - return $this; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListExecutions request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListExecutions request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php deleted file mode 100644 index 076ac55e2e82..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.run.v2.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location and project to list resources on. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of Jobs to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received from a previous call to ListJobs. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. The location and project to list resources on. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. Please see - * {@see JobsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\ListJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location and project to list resources on. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * @type int $page_size - * Maximum number of Jobs to return in this call. - * @type string $page_token - * A page token received from a previous call to ListJobs. - * All other parameters must match. - * @type bool $show_deleted - * If true, returns deleted (but unexpired) resources along with active ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location and project to list resources on. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location and project to list resources on. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of Jobs to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Jobs to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous call to ListJobs. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous call to ListJobs. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php deleted file mode 100644 index 1d0b4c4b6c6c..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListJobsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.run.v2.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resulting list of Jobs. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Job jobs = 1; - */ - private $jobs; - /** - * A token indicating there are more items than page_size. Use it in the next - * ListJobs request to continue. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * The resulting list of Jobs. - * @type string $next_page_token - * A token indicating there are more items than page_size. Use it in the next - * ListJobs request to continue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * The resulting list of Jobs. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * The resulting list of Jobs. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Job jobs = 1; - * @param array<\Google\Cloud\Run\V2\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListJobs request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListJobs request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php deleted file mode 100644 index 01cde2b85c98..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.run.v2.ListRevisionsRequest - */ -class ListRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Service from which the Revisions should be listed. - * To list all Revisions across Services, use "-" instead of Service name. - * Format: - * projects/{project}/locations/{location}/services/{service} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of revisions to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received from a previous call to ListRevisions. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. The Service from which the Revisions should be listed. - * To list all Revisions across Services, use "-" instead of Service name. - * Format: - * projects/{project}/locations/{location}/services/{service} - * Please see {@see RevisionsClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\ListRevisionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Service from which the Revisions should be listed. - * To list all Revisions across Services, use "-" instead of Service name. - * Format: - * projects/{project}/locations/{location}/services/{service} - * @type int $page_size - * Maximum number of revisions to return in this call. - * @type string $page_token - * A page token received from a previous call to ListRevisions. - * All other parameters must match. - * @type bool $show_deleted - * If true, returns deleted (but unexpired) resources along with active ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Service from which the Revisions should be listed. - * To list all Revisions across Services, use "-" instead of Service name. - * Format: - * projects/{project}/locations/{location}/services/{service} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Service from which the Revisions should be listed. - * To list all Revisions across Services, use "-" instead of Service name. - * Format: - * projects/{project}/locations/{location}/services/{service} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of revisions to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of revisions to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous call to ListRevisions. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous call to ListRevisions. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php deleted file mode 100644 index e4a2db90f4f3..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListRevisionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.run.v2.ListRevisionsResponse - */ -class ListRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resulting list of Revisions. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Revision revisions = 1; - */ - private $revisions; - /** - * A token indicating there are more items than page_size. Use it in the next - * ListRevisions request to continue. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\Revision>|\Google\Protobuf\Internal\RepeatedField $revisions - * The resulting list of Revisions. - * @type string $next_page_token - * A token indicating there are more items than page_size. Use it in the next - * ListRevisions request to continue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); - parent::__construct($data); - } - - /** - * The resulting list of Revisions. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Revision revisions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRevisions() - { - return $this->revisions; - } - - /** - * The resulting list of Revisions. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Revision revisions = 1; - * @param array<\Google\Cloud\Run\V2\Revision>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRevisions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Revision::class); - $this->revisions = $arr; - - return $this; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListRevisions request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListRevisions request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php deleted file mode 100644 index 1cd78b619338..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.run.v2.ListServicesRequest - */ -class ListServicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: projects/{project}/locations/{location}, where {project} - * can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of Services to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received from a previous call to ListServices. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: projects/{project}/locations/{location}, where {project} - * can be project id or number. Please see - * {@see ServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\ListServicesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: projects/{project}/locations/{location}, where {project} - * can be project id or number. - * @type int $page_size - * Maximum number of Services to return in this call. - * @type string $page_token - * A page token received from a previous call to ListServices. - * All other parameters must match. - * @type bool $show_deleted - * If true, returns deleted (but unexpired) resources along with active ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: projects/{project}/locations/{location}, where {project} - * can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: projects/{project}/locations/{location}, where {project} - * can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of Services to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Services to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous call to ListServices. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous call to ListServices. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php deleted file mode 100644 index 144d66072806..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListServicesResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.run.v2.ListServicesResponse - */ -class ListServicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resulting list of Services. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Service services = 1; - */ - private $services; - /** - * A token indicating there are more items than page_size. Use it in the next - * ListServices request to continue. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Output only. For global requests, returns the list of regions that could - * not be reached within the deadline. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\Service>|\Google\Protobuf\Internal\RepeatedField $services - * The resulting list of Services. - * @type string $next_page_token - * A token indicating there are more items than page_size. Use it in the next - * ListServices request to continue. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. For global requests, returns the list of regions that could - * not be reached within the deadline. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resulting list of Services. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Service services = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServices() - { - return $this->services; - } - - /** - * The resulting list of Services. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Service services = 1; - * @param array<\Google\Cloud\Run\V2\Service>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Service::class); - $this->services = $arr; - - return $this; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListServices request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListServices request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. For global requests, returns the list of regions that could - * not be reached within the deadline. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. For global requests, returns the list of regions that could - * not be reached within the deadline. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php deleted file mode 100644 index 421799f38195..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.run.v2.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of Tasks to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received from a previous call to ListTasks. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $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} - * Please see {@see TasksClient::executionName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\ListTasksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $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} - * @type int $page_size - * Maximum number of Tasks to return in this call. - * @type string $page_token - * A page token received from a previous call to ListTasks. - * All other parameters must match. - * @type bool $show_deleted - * If true, returns deleted (but unexpired) resources along with active ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); - parent::__construct($data); - } - - /** - * 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} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->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} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of Tasks to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Tasks to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous call to ListTasks. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous call to ListTasks. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php deleted file mode 100644 index 17804baa0f8d..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListTasksResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.run.v2.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resulting list of Tasks. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Task tasks = 1; - */ - private $tasks; - /** - * A token indicating there are more items than page_size. Use it in the next - * ListTasks request to continue. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * The resulting list of Tasks. - * @type string $next_page_token - * A token indicating there are more items than page_size. Use it in the next - * ListTasks request to continue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); - parent::__construct($data); - } - - /** - * The resulting list of Tasks. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The resulting list of Tasks. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Task tasks = 1; - * @param array<\Google\Cloud\Run\V2\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListTasks request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListTasks request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php deleted file mode 100644 index d08c31767c3f..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.run.v2.ListWorkerPoolsRequest - */ -class ListWorkerPoolsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of WorkerPools to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received from a previous call to ListWorkerPools. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. Please see - * {@see WorkerPoolsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\ListWorkerPoolsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. - * @type int $page_size - * Maximum number of WorkerPools to return in this call. - * @type string $page_token - * A page token received from a previous call to ListWorkerPools. - * All other parameters must match. - * @type bool $show_deleted - * If true, returns deleted (but unexpired) resources along with active ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location and project to list resources on. - * Location must be a valid Google Cloud region, and cannot be the "-" - * wildcard. Format: `projects/{project}/locations/{location}`, where - * `{project}` can be project id or number. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of WorkerPools to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of WorkerPools to return in this call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received from a previous call to ListWorkerPools. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received from a previous call to ListWorkerPools. - * All other parameters must match. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, returns deleted (but unexpired) resources along with active ones. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php deleted file mode 100644 index 7c7acb702afe..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ListWorkerPoolsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.run.v2.ListWorkerPoolsResponse - */ -class ListWorkerPoolsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resulting list of WorkerPools. - * - * Generated from protobuf field repeated .google.cloud.run.v2.WorkerPool worker_pools = 1; - */ - private $worker_pools; - /** - * A token indicating there are more items than page_size. Use it in the next - * ListWorkerPools request to continue. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\WorkerPool>|\Google\Protobuf\Internal\RepeatedField $worker_pools - * The resulting list of WorkerPools. - * @type string $next_page_token - * A token indicating there are more items than page_size. Use it in the next - * ListWorkerPools request to continue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); - parent::__construct($data); - } - - /** - * The resulting list of WorkerPools. - * - * Generated from protobuf field repeated .google.cloud.run.v2.WorkerPool worker_pools = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWorkerPools() - { - return $this->worker_pools; - } - - /** - * The resulting list of WorkerPools. - * - * Generated from protobuf field repeated .google.cloud.run.v2.WorkerPool worker_pools = 1; - * @param array<\Google\Cloud\Run\V2\WorkerPool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWorkerPools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\WorkerPool::class); - $this->worker_pools = $arr; - - return $this; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListWorkerPools request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token indicating there are more items than page_size. Use it in the next - * ListWorkerPools request to continue. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php deleted file mode 100644 index d77c34e73b2d..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NFSVolumeSource.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.run.v2.NFSVolumeSource - */ -class NFSVolumeSource extends \Google\Protobuf\Internal\Message -{ - /** - * Hostname or IP address of the NFS server - * - * Generated from protobuf field string server = 1; - */ - protected $server = ''; - /** - * Path that is exported by the NFS server. - * - * Generated from protobuf field string path = 2; - */ - protected $path = ''; - /** - * If true, the volume will be mounted as read only for all mounts. - * - * Generated from protobuf field bool read_only = 3; - */ - protected $read_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $server - * Hostname or IP address of the NFS server - * @type string $path - * Path that is exported by the NFS server. - * @type bool $read_only - * If true, the volume will be mounted as read only for all mounts. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Hostname or IP address of the NFS server - * - * Generated from protobuf field string server = 1; - * @return string - */ - public function getServer() - { - return $this->server; - } - - /** - * Hostname or IP address of the NFS server - * - * Generated from protobuf field string server = 1; - * @param string $var - * @return $this - */ - public function setServer($var) - { - GPBUtil::checkString($var, True); - $this->server = $var; - - return $this; - } - - /** - * Path that is exported by the NFS server. - * - * Generated from protobuf field string path = 2; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Path that is exported by the NFS server. - * - * Generated from protobuf field string path = 2; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * If true, the volume will be mounted as read only for all mounts. - * - * Generated from protobuf field bool read_only = 3; - * @return bool - */ - public function getReadOnly() - { - return $this->read_only; - } - - /** - * If true, the volume will be mounted as read only for all mounts. - * - * Generated from protobuf field bool read_only = 3; - * @param bool $var - * @return $this - */ - public function setReadOnly($var) - { - GPBUtil::checkBool($var); - $this->read_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php deleted file mode 100644 index 54fd94337d57..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/NodeSelector.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.run.v2.NodeSelector - */ -class NodeSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Required. GPU accelerator type to attach to an instance. - * - * Generated from protobuf field string accelerator = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $accelerator = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $accelerator - * Required. GPU accelerator type to attach to an instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * Required. GPU accelerator type to attach to an instance. - * - * Generated from protobuf field string accelerator = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAccelerator() - { - return $this->accelerator; - } - - /** - * Required. GPU accelerator type to attach to an instance. - * - * Generated from protobuf field string accelerator = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAccelerator($var) - { - GPBUtil::checkString($var, True); - $this->accelerator = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php deleted file mode 100644 index 07da4f964c37..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Probe.php +++ /dev/null @@ -1,319 +0,0 @@ -google.cloud.run.v2.Probe - */ -class Probe extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Number of seconds after the container has started before the - * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum - * value for liveness probe is 3600. Maximum value for startup probe is 240. - * - * Generated from protobuf field int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $initial_delay_seconds = 0; - /** - * Optional. Number of seconds after which the probe times out. - * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. - * Must be smaller than period_seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timeout_seconds = 0; - /** - * Optional. How often (in seconds) to perform the probe. - * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe - * is 3600. Maximum value for startup probe is 240. - * Must be greater or equal than timeout_seconds. - * - * Generated from protobuf field int32 period_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $period_seconds = 0; - /** - * Optional. Minimum consecutive failures for the probe to be considered - * failed after having succeeded. Defaults to 3. Minimum value is 1. - * - * Generated from protobuf field int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $failure_threshold = 0; - protected $probe_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $initial_delay_seconds - * Optional. Number of seconds after the container has started before the - * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum - * value for liveness probe is 3600. Maximum value for startup probe is 240. - * @type int $timeout_seconds - * Optional. Number of seconds after which the probe times out. - * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. - * Must be smaller than period_seconds. - * @type int $period_seconds - * Optional. How often (in seconds) to perform the probe. - * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe - * is 3600. Maximum value for startup probe is 240. - * Must be greater or equal than timeout_seconds. - * @type int $failure_threshold - * Optional. Minimum consecutive failures for the probe to be considered - * failed after having succeeded. Defaults to 3. Minimum value is 1. - * @type \Google\Cloud\Run\V2\HTTPGetAction $http_get - * Optional. HTTPGet specifies the http request to perform. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * @type \Google\Cloud\Run\V2\TCPSocketAction $tcp_socket - * Optional. TCPSocket specifies an action involving a TCP port. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * @type \Google\Cloud\Run\V2\GRPCAction $grpc - * Optional. GRPC specifies an action involving a gRPC port. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Number of seconds after the container has started before the - * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum - * value for liveness probe is 3600. Maximum value for startup probe is 240. - * - * Generated from protobuf field int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getInitialDelaySeconds() - { - return $this->initial_delay_seconds; - } - - /** - * Optional. Number of seconds after the container has started before the - * probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum - * value for liveness probe is 3600. Maximum value for startup probe is 240. - * - * Generated from protobuf field int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setInitialDelaySeconds($var) - { - GPBUtil::checkInt32($var); - $this->initial_delay_seconds = $var; - - return $this; - } - - /** - * Optional. Number of seconds after which the probe times out. - * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. - * Must be smaller than period_seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTimeoutSeconds() - { - return $this->timeout_seconds; - } - - /** - * Optional. Number of seconds after which the probe times out. - * Defaults to 1 second. Minimum value is 1. Maximum value is 3600. - * Must be smaller than period_seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTimeoutSeconds($var) - { - GPBUtil::checkInt32($var); - $this->timeout_seconds = $var; - - return $this; - } - - /** - * Optional. How often (in seconds) to perform the probe. - * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe - * is 3600. Maximum value for startup probe is 240. - * Must be greater or equal than timeout_seconds. - * - * Generated from protobuf field int32 period_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPeriodSeconds() - { - return $this->period_seconds; - } - - /** - * Optional. How often (in seconds) to perform the probe. - * Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe - * is 3600. Maximum value for startup probe is 240. - * Must be greater or equal than timeout_seconds. - * - * Generated from protobuf field int32 period_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPeriodSeconds($var) - { - GPBUtil::checkInt32($var); - $this->period_seconds = $var; - - return $this; - } - - /** - * Optional. Minimum consecutive failures for the probe to be considered - * failed after having succeeded. Defaults to 3. Minimum value is 1. - * - * Generated from protobuf field int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFailureThreshold() - { - return $this->failure_threshold; - } - - /** - * Optional. Minimum consecutive failures for the probe to be considered - * failed after having succeeded. Defaults to 3. Minimum value is 1. - * - * Generated from protobuf field int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFailureThreshold($var) - { - GPBUtil::checkInt32($var); - $this->failure_threshold = $var; - - return $this; - } - - /** - * Optional. HTTPGet specifies the http request to perform. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * - * Generated from protobuf field .google.cloud.run.v2.HTTPGetAction http_get = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\HTTPGetAction|null - */ - public function getHttpGet() - { - return $this->readOneof(5); - } - - public function hasHttpGet() - { - return $this->hasOneof(5); - } - - /** - * Optional. HTTPGet specifies the http request to perform. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * - * Generated from protobuf field .google.cloud.run.v2.HTTPGetAction http_get = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\HTTPGetAction $var - * @return $this - */ - public function setHttpGet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\HTTPGetAction::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. TCPSocket specifies an action involving a TCP port. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * - * Generated from protobuf field .google.cloud.run.v2.TCPSocketAction tcp_socket = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\TCPSocketAction|null - */ - public function getTcpSocket() - { - return $this->readOneof(6); - } - - public function hasTcpSocket() - { - return $this->hasOneof(6); - } - - /** - * Optional. TCPSocket specifies an action involving a TCP port. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * - * Generated from protobuf field .google.cloud.run.v2.TCPSocketAction tcp_socket = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\TCPSocketAction $var - * @return $this - */ - public function setTcpSocket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TCPSocketAction::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. GRPC specifies an action involving a gRPC port. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * - * Generated from protobuf field .google.cloud.run.v2.GRPCAction grpc = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\GRPCAction|null - */ - public function getGrpc() - { - return $this->readOneof(7); - } - - public function hasGrpc() - { - return $this->hasOneof(7); - } - - /** - * Optional. GRPC specifies an action involving a gRPC port. - * Exactly one of httpGet, tcpSocket, or grpc must be specified. - * - * Generated from protobuf field .google.cloud.run.v2.GRPCAction grpc = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\GRPCAction $var - * @return $this - */ - public function setGrpc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\GRPCAction::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getProbeType() - { - return $this->whichOneof("probe_type"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php deleted file mode 100644 index 318b8ee06931..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ResourceRequirements.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.run.v2.ResourceRequirements - */ -class ResourceRequirements extends \Google\Protobuf\Internal\Message -{ - /** - * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. - *

Notes: - * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 - * CPU requires at least 2Gi of memory. For more information, go to - * https://cloud.google.com/run/docs/configuring/cpu. - * * For supported 'memory' values and syntax, go to - * https://cloud.google.com/run/docs/configuring/memory-limits - * * The only supported 'nvidia.com/gpu' value is '1'. - * - * Generated from protobuf field map limits = 1; - */ - private $limits; - /** - * Determines whether CPU is only allocated during requests (true by default). - * However, if ResourceRequirements is set, the caller must explicitly - * set this field to true to preserve the default behavior. - * - * Generated from protobuf field bool cpu_idle = 2; - */ - protected $cpu_idle = false; - /** - * Determines whether CPU should be boosted on startup of a new container - * instance above the requested CPU threshold, this can help reduce cold-start - * latency. - * - * Generated from protobuf field bool startup_cpu_boost = 3; - */ - protected $startup_cpu_boost = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $limits - * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. - *

Notes: - * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 - * CPU requires at least 2Gi of memory. For more information, go to - * https://cloud.google.com/run/docs/configuring/cpu. - * * For supported 'memory' values and syntax, go to - * https://cloud.google.com/run/docs/configuring/memory-limits - * * The only supported 'nvidia.com/gpu' value is '1'. - * @type bool $cpu_idle - * Determines whether CPU is only allocated during requests (true by default). - * However, if ResourceRequirements is set, the caller must explicitly - * set this field to true to preserve the default behavior. - * @type bool $startup_cpu_boost - * Determines whether CPU should be boosted on startup of a new container - * instance above the requested CPU threshold, this can help reduce cold-start - * latency. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. - *

Notes: - * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 - * CPU requires at least 2Gi of memory. For more information, go to - * https://cloud.google.com/run/docs/configuring/cpu. - * * For supported 'memory' values and syntax, go to - * https://cloud.google.com/run/docs/configuring/memory-limits - * * The only supported 'nvidia.com/gpu' value is '1'. - * - * Generated from protobuf field map limits = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLimits() - { - return $this->limits; - } - - /** - * Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported. - *

Notes: - * * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 - * CPU requires at least 2Gi of memory. For more information, go to - * https://cloud.google.com/run/docs/configuring/cpu. - * * For supported 'memory' values and syntax, go to - * https://cloud.google.com/run/docs/configuring/memory-limits - * * The only supported 'nvidia.com/gpu' value is '1'. - * - * Generated from protobuf field map limits = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLimits($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->limits = $arr; - - return $this; - } - - /** - * Determines whether CPU is only allocated during requests (true by default). - * However, if ResourceRequirements is set, the caller must explicitly - * set this field to true to preserve the default behavior. - * - * Generated from protobuf field bool cpu_idle = 2; - * @return bool - */ - public function getCpuIdle() - { - return $this->cpu_idle; - } - - /** - * Determines whether CPU is only allocated during requests (true by default). - * However, if ResourceRequirements is set, the caller must explicitly - * set this field to true to preserve the default behavior. - * - * Generated from protobuf field bool cpu_idle = 2; - * @param bool $var - * @return $this - */ - public function setCpuIdle($var) - { - GPBUtil::checkBool($var); - $this->cpu_idle = $var; - - return $this; - } - - /** - * Determines whether CPU should be boosted on startup of a new container - * instance above the requested CPU threshold, this can help reduce cold-start - * latency. - * - * Generated from protobuf field bool startup_cpu_boost = 3; - * @return bool - */ - public function getStartupCpuBoost() - { - return $this->startup_cpu_boost; - } - - /** - * Determines whether CPU should be boosted on startup of a new container - * instance above the requested CPU threshold, this can help reduce cold-start - * latency. - * - * Generated from protobuf field bool startup_cpu_boost = 3; - * @param bool $var - * @return $this - */ - public function setStartupCpuBoost($var) - { - GPBUtil::checkBool($var); - $this->startup_cpu_boost = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php deleted file mode 100644 index 03a2fabd1cb7..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Revision.php +++ /dev/null @@ -1,1455 +0,0 @@ -google.cloud.run.v2.Revision - */ -class Revision extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique name of this Revision. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server assigned unique identifier for the Revision. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generation = 0; - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $annotations; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 10; - */ - protected $launch_stage = 0; - /** - * Output only. The name of the parent service. - * - * Generated from protobuf field string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $service = ''; - /** - * Scaling settings for this revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 12; - */ - protected $scaling = null; - /** - * VPC Access configuration for this Revision. For more information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 13; - */ - protected $vpc_access = null; - /** - * Sets the maximum number of requests that each serving instance can receive. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 34; - */ - protected $max_instance_request_concurrency = 0; - /** - * Max allowed time for an instance to respond to a request. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 15; - */ - protected $timeout = null; - /** - * Email address of the IAM service account associated with the revision of - * the service. The service account represents the identity of the running - * revision, and determines what permissions the revision has. - * - * Generated from protobuf field string service_account = 16; - */ - protected $service_account = ''; - /** - * Holds the single container that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 17; - */ - private $containers; - /** - * A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 18; - */ - private $volumes; - /** - * The execution environment being used to host this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; - */ - protected $execution_environment = 0; - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 21 [(.google.api.resource_reference) = { - */ - protected $encryption_key = ''; - /** - * Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 22; - */ - protected $service_mesh = null; - /** - * The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23; - */ - protected $encryption_key_revocation_action = 0; - /** - * If encryption_key_revocation_action is SHUTDOWN, the duration before - * shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 24; - */ - protected $encryption_key_shutdown_duration = null; - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Service.reconciling` for additional information - * on reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The Condition of this Revision, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $conditions; - /** - * Output only. The generation of this Revision currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $observed_generation = 0; - /** - * Output only. The Google Console URI to obtain logs for the Revision. - * - * Generated from protobuf field string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $log_uri = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Enable session affinity. - * - * Generated from protobuf field bool session_affinity = 38; - */ - protected $session_affinity = false; - /** - * Output only. The current effective scaling settings for the revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scaling_status = null; - /** - * The node selector for the revision. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 40; - */ - protected $node_selector = null; - /** - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * revision. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 48 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gpu_zonal_redundancy_disabled = null; - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique name of this Revision. - * @type string $uid - * Output only. Server assigned unique identifier for the Revision. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * @type int|string $generation - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * @type int $launch_stage - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * @type string $service - * Output only. The name of the parent service. - * @type \Google\Cloud\Run\V2\RevisionScaling $scaling - * Scaling settings for this revision. - * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access - * VPC Access configuration for this Revision. For more information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * @type int $max_instance_request_concurrency - * Sets the maximum number of requests that each serving instance can receive. - * @type \Google\Protobuf\Duration $timeout - * Max allowed time for an instance to respond to a request. - * @type string $service_account - * Email address of the IAM service account associated with the revision of - * the service. The service account represents the identity of the running - * revision, and determines what permissions the revision has. - * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers - * Holds the single container that defines the unit of execution for this - * Revision. - * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * A list of Volumes to make available to containers. - * @type int $execution_environment - * The execution environment being used to host this Revision. - * @type string $encryption_key - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * @type \Google\Cloud\Run\V2\ServiceMesh $service_mesh - * Enables service mesh connectivity. - * @type int $encryption_key_revocation_action - * The action to take if the encryption key is revoked. - * @type \Google\Protobuf\Duration $encryption_key_shutdown_duration - * If encryption_key_revocation_action is SHUTDOWN, the duration before - * shutting down all instances. The minimum increment is 1 hour. - * @type bool $reconciling - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Service.reconciling` for additional information - * on reconciliation process in Cloud Run. - * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions - * Output only. The Condition of this Revision, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. - * @type int|string $observed_generation - * Output only. The generation of this Revision currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * @type string $log_uri - * Output only. The Google Console URI to obtain logs for the Revision. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $session_affinity - * Enable session affinity. - * @type \Google\Cloud\Run\V2\RevisionScalingStatus $scaling_status - * Output only. The current effective scaling settings for the revision. - * @type \Google\Cloud\Run\V2\NodeSelector $node_selector - * The node selector for the revision. - * @type bool $gpu_zonal_redundancy_disabled - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * revision. - * @type string $creator - * Output only. Email address of the authenticated creator. - * @type string $etag - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique name of this Revision. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique name of this Revision. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server assigned unique identifier for the Revision. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned unique identifier for the Revision. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 10; - * @return int - */ - public function getLaunchStage() - { - return $this->launch_stage; - } - - /** - * The least stable launch stage needed to create this resource, as defined by - * [Google Cloud Platform Launch - * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports - * `ALPHA`, `BETA`, and `GA`. - * Note that this value might not be what was used - * as input. For example, if ALPHA was provided as input in the parent - * resource, but only BETA and GA-level features are were, this field will be - * BETA. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 10; - * @param int $var - * @return $this - */ - public function setLaunchStage($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->launch_stage = $var; - - return $this; - } - - /** - * Output only. The name of the parent service. - * - * Generated from protobuf field string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Output only. The name of the parent service. - * - * Generated from protobuf field string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Scaling settings for this revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 12; - * @return \Google\Cloud\Run\V2\RevisionScaling|null - */ - public function getScaling() - { - return $this->scaling; - } - - public function hasScaling() - { - return isset($this->scaling); - } - - public function clearScaling() - { - unset($this->scaling); - } - - /** - * Scaling settings for this revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 12; - * @param \Google\Cloud\Run\V2\RevisionScaling $var - * @return $this - */ - public function setScaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScaling::class); - $this->scaling = $var; - - return $this; - } - - /** - * VPC Access configuration for this Revision. For more information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 13; - * @return \Google\Cloud\Run\V2\VpcAccess|null - */ - public function getVpcAccess() - { - return $this->vpc_access; - } - - public function hasVpcAccess() - { - return isset($this->vpc_access); - } - - public function clearVpcAccess() - { - unset($this->vpc_access); - } - - /** - * VPC Access configuration for this Revision. For more information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 13; - * @param \Google\Cloud\Run\V2\VpcAccess $var - * @return $this - */ - public function setVpcAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); - $this->vpc_access = $var; - - return $this; - } - - /** - * Sets the maximum number of requests that each serving instance can receive. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 34; - * @return int - */ - public function getMaxInstanceRequestConcurrency() - { - return $this->max_instance_request_concurrency; - } - - /** - * Sets the maximum number of requests that each serving instance can receive. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 34; - * @param int $var - * @return $this - */ - public function setMaxInstanceRequestConcurrency($var) - { - GPBUtil::checkInt32($var); - $this->max_instance_request_concurrency = $var; - - return $this; - } - - /** - * Max allowed time for an instance to respond to a request. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 15; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Max allowed time for an instance to respond to a request. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 15; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Email address of the IAM service account associated with the revision of - * the service. The service account represents the identity of the running - * revision, and determines what permissions the revision has. - * - * Generated from protobuf field string service_account = 16; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Email address of the IAM service account associated with the revision of - * the service. The service account represents the identity of the running - * revision, and determines what permissions the revision has. - * - * Generated from protobuf field string service_account = 16; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Holds the single container that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainers() - { - return $this->containers; - } - - /** - * Holds the single container that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 17; - * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); - $this->containers = $arr; - - return $this; - } - - /** - * A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 18; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 18; - * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * The execution environment being used to host this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; - * @return int - */ - public function getExecutionEnvironment() - { - return $this->execution_environment; - } - - /** - * The execution environment being used to host this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; - * @param int $var - * @return $this - */ - public function setExecutionEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); - $this->execution_environment = $var; - - return $this; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 21 [(.google.api.resource_reference) = { - * @return string - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 21 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->encryption_key = $var; - - return $this; - } - - /** - * Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 22; - * @return \Google\Cloud\Run\V2\ServiceMesh|null - */ - public function getServiceMesh() - { - return $this->service_mesh; - } - - public function hasServiceMesh() - { - return isset($this->service_mesh); - } - - public function clearServiceMesh() - { - unset($this->service_mesh); - } - - /** - * Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 22; - * @param \Google\Cloud\Run\V2\ServiceMesh $var - * @return $this - */ - public function setServiceMesh($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceMesh::class); - $this->service_mesh = $var; - - return $this; - } - - /** - * The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23; - * @return int - */ - public function getEncryptionKeyRevocationAction() - { - return $this->encryption_key_revocation_action; - } - - /** - * The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23; - * @param int $var - * @return $this - */ - public function setEncryptionKeyRevocationAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class); - $this->encryption_key_revocation_action = $var; - - return $this; - } - - /** - * If encryption_key_revocation_action is SHUTDOWN, the duration before - * shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 24; - * @return \Google\Protobuf\Duration|null - */ - public function getEncryptionKeyShutdownDuration() - { - return $this->encryption_key_shutdown_duration; - } - - public function hasEncryptionKeyShutdownDuration() - { - return isset($this->encryption_key_shutdown_duration); - } - - public function clearEncryptionKeyShutdownDuration() - { - unset($this->encryption_key_shutdown_duration); - } - - /** - * If encryption_key_revocation_action is SHUTDOWN, the duration before - * shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 24; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEncryptionKeyShutdownDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->encryption_key_shutdown_duration = $var; - - return $this; - } - - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Service.reconciling` for additional information - * on reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Service.reconciling` for additional information - * on reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The Condition of this Revision, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Output only. The Condition of this Revision, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * Output only. The generation of this Revision currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getObservedGeneration() - { - return $this->observed_generation; - } - - /** - * Output only. The generation of this Revision currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setObservedGeneration($var) - { - GPBUtil::checkInt64($var); - $this->observed_generation = $var; - - return $this; - } - - /** - * Output only. The Google Console URI to obtain logs for the Revision. - * - * Generated from protobuf field string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLogUri() - { - return $this->log_uri; - } - - /** - * Output only. The Google Console URI to obtain logs for the Revision. - * - * Generated from protobuf field string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLogUri($var) - { - GPBUtil::checkString($var, True); - $this->log_uri = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Enable session affinity. - * - * Generated from protobuf field bool session_affinity = 38; - * @return bool - */ - public function getSessionAffinity() - { - return $this->session_affinity; - } - - /** - * Enable session affinity. - * - * Generated from protobuf field bool session_affinity = 38; - * @param bool $var - * @return $this - */ - public function setSessionAffinity($var) - { - GPBUtil::checkBool($var); - $this->session_affinity = $var; - - return $this; - } - - /** - * Output only. The current effective scaling settings for the revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\RevisionScalingStatus|null - */ - public function getScalingStatus() - { - return $this->scaling_status; - } - - public function hasScalingStatus() - { - return isset($this->scaling_status); - } - - public function clearScalingStatus() - { - unset($this->scaling_status); - } - - /** - * Output only. The current effective scaling settings for the revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\RevisionScalingStatus $var - * @return $this - */ - public function setScalingStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScalingStatus::class); - $this->scaling_status = $var; - - return $this; - } - - /** - * The node selector for the revision. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 40; - * @return \Google\Cloud\Run\V2\NodeSelector|null - */ - public function getNodeSelector() - { - return $this->node_selector; - } - - public function hasNodeSelector() - { - return isset($this->node_selector); - } - - public function clearNodeSelector() - { - unset($this->node_selector); - } - - /** - * The node selector for the revision. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 40; - * @param \Google\Cloud\Run\V2\NodeSelector $var - * @return $this - */ - public function setNodeSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); - $this->node_selector = $var; - - return $this; - } - - /** - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * revision. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 48 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; - } - - public function hasGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled); - } - - public function clearGpuZonalRedundancyDisabled() - { - unset($this->gpu_zonal_redundancy_disabled); - } - - /** - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * revision. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 48 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGpuZonalRedundancyDisabled($var) - { - GPBUtil::checkBool($var); - $this->gpu_zonal_redundancy_disabled = $var; - - return $this; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php deleted file mode 100644 index 5536c70fe0a4..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScaling.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.run.v2.RevisionScaling - */ -class RevisionScaling extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Minimum number of serving instances that this resource should - * have. - * - * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_instance_count = 0; - /** - * Optional. Maximum number of serving instances that this resource should - * have. When unspecified, the field is set to the server default value of - * 100. For more information see - * https://cloud.google.com/run/docs/configuring/max-instances - * - * Generated from protobuf field int32 max_instance_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_instance_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_instance_count - * Optional. Minimum number of serving instances that this resource should - * have. - * @type int $max_instance_count - * Optional. Maximum number of serving instances that this resource should - * have. When unspecified, the field is set to the server default value of - * 100. For more information see - * https://cloud.google.com/run/docs/configuring/max-instances - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Minimum number of serving instances that this resource should - * have. - * - * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinInstanceCount() - { - return $this->min_instance_count; - } - - /** - * Optional. Minimum number of serving instances that this resource should - * have. - * - * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->min_instance_count = $var; - - return $this; - } - - /** - * Optional. Maximum number of serving instances that this resource should - * have. When unspecified, the field is set to the server default value of - * 100. For more information see - * https://cloud.google.com/run/docs/configuring/max-instances - * - * Generated from protobuf field int32 max_instance_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxInstanceCount() - { - return $this->max_instance_count; - } - - /** - * Optional. Maximum number of serving instances that this resource should - * have. When unspecified, the field is set to the server default value of - * 100. For more information see - * https://cloud.google.com/run/docs/configuring/max-instances - * - * Generated from protobuf field int32 max_instance_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->max_instance_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php deleted file mode 100644 index fff365b91e71..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionScalingStatus.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.run.v2.RevisionScalingStatus - */ -class RevisionScalingStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The current number of min instances provisioned for this revision. - * - * Generated from protobuf field int32 desired_min_instance_count = 1; - */ - protected $desired_min_instance_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $desired_min_instance_count - * The current number of min instances provisioned for this revision. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Status::initOnce(); - parent::__construct($data); - } - - /** - * The current number of min instances provisioned for this revision. - * - * Generated from protobuf field int32 desired_min_instance_count = 1; - * @return int - */ - public function getDesiredMinInstanceCount() - { - return $this->desired_min_instance_count; - } - - /** - * The current number of min instances provisioned for this revision. - * - * Generated from protobuf field int32 desired_min_instance_count = 1; - * @param int $var - * @return $this - */ - public function setDesiredMinInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->desired_min_instance_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php deleted file mode 100644 index bf485c40eb51..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RevisionTemplate.php +++ /dev/null @@ -1,866 +0,0 @@ -google.cloud.run.v2.RevisionTemplate - */ -class RevisionTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the Service name. - * - * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $revision = ''; - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 RevisionTemplate. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 RevisionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Optional. Scaling settings for this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scaling = null; - /** - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vpc_access = null; - /** - * Optional. Max allowed time for an instance to respond to a request. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timeout = null; - /** - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - /** - * Holds the single container that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 10; - */ - private $containers; - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $volumes; - /** - * Optional. The sandbox environment to host this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $execution_environment = 0; - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 14 [(.google.api.resource_reference) = { - */ - protected $encryption_key = ''; - /** - * Optional. Sets the maximum number of requests that each serving instance - * can receive. If not specified or 0, concurrency defaults to 80 when - * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_instance_request_concurrency = 0; - /** - * Optional. Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_mesh = null; - /** - * Optional. The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_key_revocation_action = 0; - /** - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_key_shutdown_duration = null; - /** - * Optional. Enable session affinity. - * - * Generated from protobuf field bool session_affinity = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $session_affinity = false; - /** - * Optional. Disables health checking containers during deployment. - * - * Generated from protobuf field bool health_check_disabled = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $health_check_disabled = false; - /** - * Optional. The node selector for the revision template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_selector = null; - /** - * Optional. True if GPU zonal redundancy is disabled on this revision. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 24 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gpu_zonal_redundancy_disabled = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $revision - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the Service name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 RevisionTemplate. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 RevisionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * @type \Google\Cloud\Run\V2\RevisionScaling $scaling - * Optional. Scaling settings for this Revision. - * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * @type \Google\Protobuf\Duration $timeout - * Optional. Max allowed time for an instance to respond to a request. - * @type string $service_account - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers - * Holds the single container that defines the unit of execution for this - * Revision. - * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * Optional. A list of Volumes to make available to containers. - * @type int $execution_environment - * Optional. The sandbox environment to host this Revision. - * @type string $encryption_key - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * @type int $max_instance_request_concurrency - * Optional. Sets the maximum number of requests that each serving instance - * can receive. If not specified or 0, concurrency defaults to 80 when - * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. - * @type \Google\Cloud\Run\V2\ServiceMesh $service_mesh - * Optional. Enables service mesh connectivity. - * @type int $encryption_key_revocation_action - * Optional. The action to take if the encryption key is revoked. - * @type \Google\Protobuf\Duration $encryption_key_shutdown_duration - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * @type bool $session_affinity - * Optional. Enable session affinity. - * @type bool $health_check_disabled - * Optional. Disables health checking containers during deployment. - * @type \Google\Cloud\Run\V2\NodeSelector $node_selector - * Optional. The node selector for the revision template. - * @type bool $gpu_zonal_redundancy_disabled - * Optional. True if GPU zonal redundancy is disabled on this revision. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\RevisionTemplate::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the Service name. - * - * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the Service name. - * - * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 RevisionTemplate. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 RevisionTemplate. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 RevisionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 RevisionTemplate. - *

This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Optional. Scaling settings for this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\RevisionScaling|null - */ - public function getScaling() - { - return $this->scaling; - } - - public function hasScaling() - { - return isset($this->scaling); - } - - public function clearScaling() - { - unset($this->scaling); - } - - /** - * Optional. Scaling settings for this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionScaling scaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\RevisionScaling $var - * @return $this - */ - public function setScaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScaling::class); - $this->scaling = $var; - - return $this; - } - - /** - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\VpcAccess|null - */ - public function getVpcAccess() - { - return $this->vpc_access; - } - - public function hasVpcAccess() - { - return isset($this->vpc_access); - } - - public function clearVpcAccess() - { - unset($this->vpc_access); - } - - /** - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\VpcAccess $var - * @return $this - */ - public function setVpcAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); - $this->vpc_access = $var; - - return $this; - } - - /** - * Optional. Max allowed time for an instance to respond to a request. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Optional. Max allowed time for an instance to respond to a request. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Holds the single container that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainers() - { - return $this->containers; - } - - /** - * Holds the single container that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 10; - * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); - $this->containers = $arr; - - return $this; - } - - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * Optional. The sandbox environment to host this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getExecutionEnvironment() - { - return $this->execution_environment; - } - - /** - * Optional. The sandbox environment to host this Revision. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setExecutionEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); - $this->execution_environment = $var; - - return $this; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 14 [(.google.api.resource_reference) = { - * @return string - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 14 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->encryption_key = $var; - - return $this; - } - - /** - * Optional. Sets the maximum number of requests that each serving instance - * can receive. If not specified or 0, concurrency defaults to 80 when - * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxInstanceRequestConcurrency() - { - return $this->max_instance_request_concurrency; - } - - /** - * Optional. Sets the maximum number of requests that each serving instance - * can receive. If not specified or 0, concurrency defaults to 80 when - * requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxInstanceRequestConcurrency($var) - { - GPBUtil::checkInt32($var); - $this->max_instance_request_concurrency = $var; - - return $this; - } - - /** - * Optional. Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\ServiceMesh|null - */ - public function getServiceMesh() - { - return $this->service_mesh; - } - - public function hasServiceMesh() - { - return isset($this->service_mesh); - } - - public function clearServiceMesh() - { - unset($this->service_mesh); - } - - /** - * Optional. Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\ServiceMesh $var - * @return $this - */ - public function setServiceMesh($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceMesh::class); - $this->service_mesh = $var; - - return $this; - } - - /** - * Optional. The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEncryptionKeyRevocationAction() - { - return $this->encryption_key_revocation_action; - } - - /** - * Optional. The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEncryptionKeyRevocationAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class); - $this->encryption_key_revocation_action = $var; - - return $this; - } - - /** - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getEncryptionKeyShutdownDuration() - { - return $this->encryption_key_shutdown_duration; - } - - public function hasEncryptionKeyShutdownDuration() - { - return isset($this->encryption_key_shutdown_duration); - } - - public function clearEncryptionKeyShutdownDuration() - { - unset($this->encryption_key_shutdown_duration); - } - - /** - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEncryptionKeyShutdownDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->encryption_key_shutdown_duration = $var; - - return $this; - } - - /** - * Optional. Enable session affinity. - * - * Generated from protobuf field bool session_affinity = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSessionAffinity() - { - return $this->session_affinity; - } - - /** - * Optional. Enable session affinity. - * - * Generated from protobuf field bool session_affinity = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSessionAffinity($var) - { - GPBUtil::checkBool($var); - $this->session_affinity = $var; - - return $this; - } - - /** - * Optional. Disables health checking containers during deployment. - * - * Generated from protobuf field bool health_check_disabled = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getHealthCheckDisabled() - { - return $this->health_check_disabled; - } - - /** - * Optional. Disables health checking containers during deployment. - * - * Generated from protobuf field bool health_check_disabled = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setHealthCheckDisabled($var) - { - GPBUtil::checkBool($var); - $this->health_check_disabled = $var; - - return $this; - } - - /** - * Optional. The node selector for the revision template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\NodeSelector|null - */ - public function getNodeSelector() - { - return $this->node_selector; - } - - public function hasNodeSelector() - { - return isset($this->node_selector); - } - - public function clearNodeSelector() - { - unset($this->node_selector); - } - - /** - * Optional. The node selector for the revision template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\NodeSelector $var - * @return $this - */ - public function setNodeSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); - $this->node_selector = $var; - - return $this; - } - - /** - * Optional. True if GPU zonal redundancy is disabled on this revision. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; - } - - public function hasGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled); - } - - public function clearGpuZonalRedundancyDisabled() - { - unset($this->gpu_zonal_redundancy_disabled); - } - - /** - * Optional. True if GPU zonal redundancy is disabled on this revision. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setGpuZonalRedundancyDisabled($var) - { - GPBUtil::checkBool($var); - $this->gpu_zonal_redundancy_disabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php deleted file mode 100644 index bf51806e3bcb..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.run.v2.RunJobRequest - */ -class RunJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - /** - * Overrides specification for a given execution of a job. If provided, - * overrides will be applied to update the execution or task spec. - * - * Generated from protobuf field .google.cloud.run.v2.RunJobRequest.Overrides overrides = 4; - */ - protected $overrides = null; - - /** - * @param string $name Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. Please see - * {@see JobsClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Run\V2\RunJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * @type bool $validate_only - * Indicates that the request should be validated without actually - * deleting any resources. - * @type string $etag - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * @type \Google\Cloud\Run\V2\RunJobRequest\Overrides $overrides - * Overrides specification for a given execution of a job. If provided, - * overrides will be applied to update the execution or task spec. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full name of the Job. - * Format: projects/{project}/locations/{location}/jobs/{job}, where {project} - * can be project id or number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated without actually - * deleting any resources. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Overrides specification for a given execution of a job. If provided, - * overrides will be applied to update the execution or task spec. - * - * Generated from protobuf field .google.cloud.run.v2.RunJobRequest.Overrides overrides = 4; - * @return \Google\Cloud\Run\V2\RunJobRequest\Overrides|null - */ - public function getOverrides() - { - return $this->overrides; - } - - public function hasOverrides() - { - return isset($this->overrides); - } - - public function clearOverrides() - { - unset($this->overrides); - } - - /** - * Overrides specification for a given execution of a job. If provided, - * overrides will be applied to update the execution or task spec. - * - * Generated from protobuf field .google.cloud.run.v2.RunJobRequest.Overrides overrides = 4; - * @param \Google\Cloud\Run\V2\RunJobRequest\Overrides $var - * @return $this - */ - public function setOverrides($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RunJobRequest\Overrides::class); - $this->overrides = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php deleted file mode 100644 index 60098e2ce07b..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.run.v2.RunJobRequest.Overrides - */ -class Overrides extends \Google\Protobuf\Internal\Message -{ - /** - * Per container override specification. - * - * Generated from protobuf field repeated .google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride container_overrides = 1; - */ - private $container_overrides; - /** - * Optional. The desired number of tasks the execution should run. Will - * replace existing task_count value. - * - * Generated from protobuf field int32 task_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $task_count = 0; - /** - * Duration in seconds the task may be active before the system will - * actively try to mark it failed and kill associated containers. Will - * replace existing timeout_seconds value. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4; - */ - protected $timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\RunJobRequest\Overrides\ContainerOverride>|\Google\Protobuf\Internal\RepeatedField $container_overrides - * Per container override specification. - * @type int $task_count - * Optional. The desired number of tasks the execution should run. Will - * replace existing task_count value. - * @type \Google\Protobuf\Duration $timeout - * Duration in seconds the task may be active before the system will - * actively try to mark it failed and kill associated containers. Will - * replace existing timeout_seconds value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Per container override specification. - * - * Generated from protobuf field repeated .google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride container_overrides = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainerOverrides() - { - return $this->container_overrides; - } - - /** - * Per container override specification. - * - * Generated from protobuf field repeated .google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride container_overrides = 1; - * @param array<\Google\Cloud\Run\V2\RunJobRequest\Overrides\ContainerOverride>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainerOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\RunJobRequest\Overrides\ContainerOverride::class); - $this->container_overrides = $arr; - - return $this; - } - - /** - * Optional. The desired number of tasks the execution should run. Will - * replace existing task_count value. - * - * Generated from protobuf field int32 task_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTaskCount() - { - return $this->task_count; - } - - /** - * Optional. The desired number of tasks the execution should run. Will - * replace existing task_count value. - * - * Generated from protobuf field int32 task_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTaskCount($var) - { - GPBUtil::checkInt32($var); - $this->task_count = $var; - - return $this; - } - - /** - * Duration in seconds the task may be active before the system will - * actively try to mark it failed and kill associated containers. Will - * replace existing timeout_seconds value. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Duration in seconds the task may be active before the system will - * actively try to mark it failed and kill associated containers. Will - * replace existing timeout_seconds value. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Overrides::class, \Google\Cloud\Run\V2\RunJobRequest_Overrides::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php deleted file mode 100644 index 9d002dff8c09..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/RunJobRequest/Overrides/ContainerOverride.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride - */ -class ContainerOverride extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the container specified as a DNS_LABEL. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. Arguments to the entrypoint. Will replace existing args for - * override. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * List of environment variables to set in the container. Will be merged - * with existing env for override. - * - * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 3; - */ - private $env; - /** - * Optional. True if the intention is to clear out existing args list. - * - * Generated from protobuf field bool clear_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $clear_args = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the container specified as a DNS_LABEL. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. Arguments to the entrypoint. Will replace existing args for - * override. - * @type array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $env - * List of environment variables to set in the container. Will be merged - * with existing env for override. - * @type bool $clear_args - * Optional. True if the intention is to clear out existing args list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * The name of the container specified as a DNS_LABEL. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the container specified as a DNS_LABEL. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Arguments to the entrypoint. Will replace existing args for - * override. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. Arguments to the entrypoint. Will replace existing args for - * override. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * List of environment variables to set in the container. Will be merged - * with existing env for override. - * - * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnv() - { - return $this->env; - } - - /** - * List of environment variables to set in the container. Will be merged - * with existing env for override. - * - * Generated from protobuf field repeated .google.cloud.run.v2.EnvVar env = 3; - * @param array<\Google\Cloud\Run\V2\EnvVar>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnv($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\EnvVar::class); - $this->env = $arr; - - return $this; - } - - /** - * Optional. True if the intention is to clear out existing args list. - * - * Generated from protobuf field bool clear_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getClearArgs() - { - return $this->clear_args; - } - - /** - * Optional. True if the intention is to clear out existing args list. - * - * Generated from protobuf field bool clear_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setClearArgs($var) - { - GPBUtil::checkBool($var); - $this->clear_args = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContainerOverride::class, \Google\Cloud\Run\V2\RunJobRequest_Overrides_ContainerOverride::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php deleted file mode 100644 index 060822bb2454..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretKeySelector.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.run.v2.SecretKeySelector - */ -class SecretKeySelector extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret_name} if the secret is in the same project. - * projects/{project}/secrets/{secret_name} if the secret is - * in a different project. - * - * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $secret = ''; - /** - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest version, an integer for a specific version, - * or a version alias. - * - * Generated from protobuf field string version = 2 [(.google.api.resource_reference) = { - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $secret - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret_name} if the secret is in the same project. - * projects/{project}/secrets/{secret_name} if the secret is - * in a different project. - * @type string $version - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest version, an integer for a specific version, - * or a version alias. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret_name} if the secret is in the same project. - * projects/{project}/secrets/{secret_name} if the secret is - * in a different project. - * - * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret_name} if the secret is in the same project. - * projects/{project}/secrets/{secret_name} if the secret is - * in a different project. - * - * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest version, an integer for a specific version, - * or a version alias. - * - * Generated from protobuf field string version = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest version, an integer for a specific version, - * or a version alias. - * - * Generated from protobuf field string version = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php deleted file mode 100644 index a34c83cf18ec..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SecretVolumeSource.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.run.v2.SecretVolumeSource - */ -class SecretVolumeSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret} if the secret is in the same project. - * projects/{project}/secrets/{secret} if the secret is - * in a different project. - * - * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $secret = ''; - /** - * If unspecified, the volume will expose a file whose name is the - * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. - * If specified, the key will be used as the version to fetch from Cloud - * Secret Manager and the path will be the name of the file exposed in the - * volume. When items are defined, they must specify a path and a version. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VersionToPath items = 2; - */ - private $items; - /** - * Integer representation of mode bits to use on created files by default. - * Must be a value between 0000 and 0777 (octal), defaulting to 0444. - * Directories within the path are not affected by this setting. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * This might be in conflict with other options that affect the - * file mode, like fsGroup, and as a result, other mode bits could be set. - * - * Generated from protobuf field int32 default_mode = 3; - */ - protected $default_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $secret - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret} if the secret is in the same project. - * projects/{project}/secrets/{secret} if the secret is - * in a different project. - * @type array<\Google\Cloud\Run\V2\VersionToPath>|\Google\Protobuf\Internal\RepeatedField $items - * If unspecified, the volume will expose a file whose name is the - * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. - * If specified, the key will be used as the version to fetch from Cloud - * Secret Manager and the path will be the name of the file exposed in the - * volume. When items are defined, they must specify a path and a version. - * @type int $default_mode - * Integer representation of mode bits to use on created files by default. - * Must be a value between 0000 and 0777 (octal), defaulting to 0444. - * Directories within the path are not affected by this setting. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * This might be in conflict with other options that affect the - * file mode, like fsGroup, and as a result, other mode bits could be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret} if the secret is in the same project. - * projects/{project}/secrets/{secret} if the secret is - * in a different project. - * - * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Required. The name of the secret in Cloud Secret Manager. - * Format: {secret} if the secret is in the same project. - * projects/{project}/secrets/{secret} if the secret is - * in a different project. - * - * Generated from protobuf field string secret = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * If unspecified, the volume will expose a file whose name is the - * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. - * If specified, the key will be used as the version to fetch from Cloud - * Secret Manager and the path will be the name of the file exposed in the - * volume. When items are defined, they must specify a path and a version. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VersionToPath items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * If unspecified, the volume will expose a file whose name is the - * secret, relative to VolumeMount.mount_path + VolumeMount.sub_path. - * If specified, the key will be used as the version to fetch from Cloud - * Secret Manager and the path will be the name of the file exposed in the - * volume. When items are defined, they must specify a path and a version. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VersionToPath items = 2; - * @param array<\Google\Cloud\Run\V2\VersionToPath>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\VersionToPath::class); - $this->items = $arr; - - return $this; - } - - /** - * Integer representation of mode bits to use on created files by default. - * Must be a value between 0000 and 0777 (octal), defaulting to 0444. - * Directories within the path are not affected by this setting. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * This might be in conflict with other options that affect the - * file mode, like fsGroup, and as a result, other mode bits could be set. - * - * Generated from protobuf field int32 default_mode = 3; - * @return int - */ - public function getDefaultMode() - { - return $this->default_mode; - } - - /** - * Integer representation of mode bits to use on created files by default. - * Must be a value between 0000 and 0777 (octal), defaulting to 0444. - * Directories within the path are not affected by this setting. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * This might be in conflict with other options that affect the - * file mode, like fsGroup, and as a result, other mode bits could be set. - * - * Generated from protobuf field int32 default_mode = 3; - * @param int $var - * @return $this - */ - public function setDefaultMode($var) - { - GPBUtil::checkInt32($var); - $this->default_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php deleted file mode 100644 index 20dac1100ee6..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service.php +++ /dev/null @@ -1,1761 +0,0 @@ -google.cloud.run.v2.Service - */ -class Service extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The fully qualified name of this Service. In - * CreateServiceRequest, this field is ignored, and instead composed from - * CreateServiceRequest.parent and CreateServiceRequest.service_id. - * Format: - * projects/{project}/locations/{location}/services/{service_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * User-provided description of the Service. This field currently has a - * 512-character limit. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * - * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generation = 0; - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Service. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 Service. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * - * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. For a deleted resource, the time after which it will be - * permanently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_modifier = ''; - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 13; - */ - protected $client = ''; - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 14; - */ - protected $client_version = ''; - /** - * Optional. Provides the ingress settings for this Service. On output, - * returns the currently observed ingress settings, or - * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. - * - * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ingress = 0; - /** - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $launch_stage = 0; - /** - * Optional. Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization = null; - /** - * Required. The template used to create revisions for this Service. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = null; - /** - * Optional. Specifies how to distribute traffic over a collection of - * Revisions belonging to the Service. If traffic is empty or not provided, - * defaults to 100% traffic to the latest `Ready` Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTarget traffic = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $traffic; - /** - * Optional. Specifies service-level scaling settings - * - * Generated from protobuf field .google.cloud.run.v2.ServiceScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scaling = null; - /** - * Optional. Disables IAM permission check for run.routes.invoke for callers - * of this service. For more information, visit - * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. - * - * Generated from protobuf field bool invoker_iam_disabled = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $invoker_iam_disabled = false; - /** - * Optional. Disables public resolution of the default URI of this service. - * - * Generated from protobuf field bool default_uri_disabled = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_uri_disabled = false; - /** - * Output only. All URLs serving traffic for this Service. - * - * Generated from protobuf field repeated string urls = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $urls; - /** - * Optional. IAP settings on the Service. - * - * Generated from protobuf field bool iap_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $iap_enabled = false; - /** - * Optional. Settings for multi-region deployment. - * - * Generated from protobuf field .google.cloud.run.v2.Service.MultiRegionSettings multi_region_settings = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $multi_region_settings = null; - /** - * One or more custom audiences that you want this service to support. Specify - * each custom audience as the full URL in a string. The custom audiences are - * encoded in the token and used to authenticate requests. For more - * information, see - * https://cloud.google.com/run/docs/configuring/custom-audiences. - * - * Generated from protobuf field repeated string custom_audiences = 37; - */ - private $custom_audiences; - /** - * Output only. The generation of this Service currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * - * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $observed_generation = 0; - /** - * Output only. The Condition of this Service, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $terminal_condition = null; - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Service does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $conditions; - /** - * Output only. Name of the latest revision that is serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $latest_ready_revision = ''; - /** - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $latest_created_revision = ''; - /** - * Output only. Detailed status information for corresponding traffic targets. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $traffic_statuses; - /** - * Output only. The main URI in which this Service is serving traffic. - * - * Generated from protobuf field string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. True if Cloud Run Threat Detection monitoring is enabled for - * the parent project of this Service. - * - * Generated from protobuf field bool threat_detection_enabled = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $threat_detection_enabled = false; - /** - * Optional. Configuration for building a Cloud Run function. - * - * Generated from protobuf field .google.cloud.run.v2.BuildConfig build_config = 41 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $build_config = null; - /** - * Output only. Returns true if the Service is currently being acted upon by - * the system to bring it into the desired state. - * When a new Service is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Service to the - * desired serving state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation`, - * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient - * values that might mismatch the intended state: Once reconciliation is over - * (and this field is false), there are two possible outcomes: reconciliation - * succeeded and the serving state matches the Service, or there was an error, - * and reconciliation failed. This state can be found in - * `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: `traffic` and - * `traffic_statuses`, `observed_generation` and `generation`, - * `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `traffic_statuses`, `observed_generation`, and - * `latest_ready_revision` will have the state of the last serving revision, - * or empty for newly created Services. Additional information on the failure - * can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The fully qualified name of this Service. In - * CreateServiceRequest, this field is ignored, and instead composed from - * CreateServiceRequest.parent and CreateServiceRequest.service_id. - * Format: - * projects/{project}/locations/{location}/services/{service_id} - * @type string $description - * User-provided description of the Service. This field currently has a - * 512-character limit. - * @type string $uid - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * @type int|string $generation - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Service. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 Service. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. For a deleted resource, the time after which it will be - * permanently deleted. - * @type string $creator - * Output only. Email address of the authenticated creator. - * @type string $last_modifier - * Output only. Email address of the last authenticated modifier. - * @type string $client - * Arbitrary identifier for the API client. - * @type string $client_version - * Arbitrary version identifier for the API client. - * @type int $ingress - * Optional. Provides the ingress settings for this Service. On output, - * returns the currently observed ingress settings, or - * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. - * @type int $launch_stage - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * @type \Google\Cloud\Run\V2\BinaryAuthorization $binary_authorization - * Optional. Settings for the Binary Authorization feature. - * @type \Google\Cloud\Run\V2\RevisionTemplate $template - * Required. The template used to create revisions for this Service. - * @type array<\Google\Cloud\Run\V2\TrafficTarget>|\Google\Protobuf\Internal\RepeatedField $traffic - * Optional. Specifies how to distribute traffic over a collection of - * Revisions belonging to the Service. If traffic is empty or not provided, - * defaults to 100% traffic to the latest `Ready` Revision. - * @type \Google\Cloud\Run\V2\ServiceScaling $scaling - * Optional. Specifies service-level scaling settings - * @type bool $invoker_iam_disabled - * Optional. Disables IAM permission check for run.routes.invoke for callers - * of this service. For more information, visit - * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. - * @type bool $default_uri_disabled - * Optional. Disables public resolution of the default URI of this service. - * @type array|\Google\Protobuf\Internal\RepeatedField $urls - * Output only. All URLs serving traffic for this Service. - * @type bool $iap_enabled - * Optional. IAP settings on the Service. - * @type \Google\Cloud\Run\V2\Service\MultiRegionSettings $multi_region_settings - * Optional. Settings for multi-region deployment. - * @type array|\Google\Protobuf\Internal\RepeatedField $custom_audiences - * One or more custom audiences that you want this service to support. Specify - * each custom audience as the full URL in a string. The custom audiences are - * encoded in the token and used to authenticate requests. For more - * information, see - * https://cloud.google.com/run/docs/configuring/custom-audiences. - * @type int|string $observed_generation - * Output only. The generation of this Service currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * @type \Google\Cloud\Run\V2\Condition $terminal_condition - * Output only. The Condition of this Service, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Service does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * @type string $latest_ready_revision - * Output only. Name of the latest revision that is serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * @type string $latest_created_revision - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * @type array<\Google\Cloud\Run\V2\TrafficTargetStatus>|\Google\Protobuf\Internal\RepeatedField $traffic_statuses - * Output only. Detailed status information for corresponding traffic targets. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * @type string $uri - * Output only. The main URI in which this Service is serving traffic. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $threat_detection_enabled - * Output only. True if Cloud Run Threat Detection monitoring is enabled for - * the parent project of this Service. - * @type \Google\Cloud\Run\V2\BuildConfig $build_config - * Optional. Configuration for building a Cloud Run function. - * @type bool $reconciling - * Output only. Returns true if the Service is currently being acted upon by - * the system to bring it into the desired state. - * When a new Service is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Service to the - * desired serving state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation`, - * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient - * values that might mismatch the intended state: Once reconciliation is over - * (and this field is false), there are two possible outcomes: reconciliation - * succeeded and the serving state matches the Service, or there was an error, - * and reconciliation failed. This state can be found in - * `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: `traffic` and - * `traffic_statuses`, `observed_generation` and `generation`, - * `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `traffic_statuses`, `observed_generation`, and - * `latest_ready_revision` will have the state of the last serving revision, - * or empty for newly created Services. Additional information on the failure - * can be found in `terminal_condition` and `conditions`. - * @type string $etag - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The fully qualified name of this Service. In - * CreateServiceRequest, this field is ignored, and instead composed from - * CreateServiceRequest.parent and CreateServiceRequest.service_id. - * Format: - * projects/{project}/locations/{location}/services/{service_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The fully qualified name of this Service. In - * CreateServiceRequest, this field is ignored, and instead composed from - * CreateServiceRequest.parent and CreateServiceRequest.service_id. - * Format: - * projects/{project}/locations/{location}/services/{service_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * User-provided description of the Service. This field currently has a - * 512-character limit. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the Service. This field currently has a - * 512-character limit. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * - * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * - * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Service. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - *

Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 Service. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 Service. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * - * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - *

Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 Service. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * - * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permanently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permanently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLastModifier() - { - return $this->last_modifier; - } - - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLastModifier($var) - { - GPBUtil::checkString($var, True); - $this->last_modifier = $var; - - return $this; - } - - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 13; - * @return string - */ - public function getClient() - { - return $this->client; - } - - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 13; - * @param string $var - * @return $this - */ - public function setClient($var) - { - GPBUtil::checkString($var, True); - $this->client = $var; - - return $this; - } - - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 14; - * @return string - */ - public function getClientVersion() - { - return $this->client_version; - } - - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 14; - * @param string $var - * @return $this - */ - public function setClientVersion($var) - { - GPBUtil::checkString($var, True); - $this->client_version = $var; - - return $this; - } - - /** - * Optional. Provides the ingress settings for this Service. On output, - * returns the currently observed ingress settings, or - * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. - * - * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIngress() - { - return $this->ingress; - } - - /** - * Optional. Provides the ingress settings for this Service. On output, - * returns the currently observed ingress settings, or - * INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. - * - * Generated from protobuf field .google.cloud.run.v2.IngressTraffic ingress = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIngress($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\IngressTraffic::class); - $this->ingress = $var; - - return $this; - } - - /** - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getLaunchStage() - { - return $this->launch_stage; - } - - /** - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the resource - * uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setLaunchStage($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->launch_stage = $var; - - return $this; - } - - /** - * Optional. Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\BinaryAuthorization|null - */ - public function getBinaryAuthorization() - { - return $this->binary_authorization; - } - - public function hasBinaryAuthorization() - { - return isset($this->binary_authorization); - } - - public function clearBinaryAuthorization() - { - unset($this->binary_authorization); - } - - /** - * Optional. Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\BinaryAuthorization $var - * @return $this - */ - public function setBinaryAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BinaryAuthorization::class); - $this->binary_authorization = $var; - - return $this; - } - - /** - * Required. The template used to create revisions for this Service. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\RevisionTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Required. The template used to create revisions for this Service. - * - * Generated from protobuf field .google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\RevisionTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionTemplate::class); - $this->template = $var; - - return $this; - } - - /** - * Optional. Specifies how to distribute traffic over a collection of - * Revisions belonging to the Service. If traffic is empty or not provided, - * defaults to 100% traffic to the latest `Ready` Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTarget traffic = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTraffic() - { - return $this->traffic; - } - - /** - * Optional. Specifies how to distribute traffic over a collection of - * Revisions belonging to the Service. If traffic is empty or not provided, - * defaults to 100% traffic to the latest `Ready` Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTarget traffic = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Run\V2\TrafficTarget>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTraffic($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\TrafficTarget::class); - $this->traffic = $arr; - - return $this; - } - - /** - * Optional. Specifies service-level scaling settings - * - * Generated from protobuf field .google.cloud.run.v2.ServiceScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\ServiceScaling|null - */ - public function getScaling() - { - return $this->scaling; - } - - public function hasScaling() - { - return isset($this->scaling); - } - - public function clearScaling() - { - unset($this->scaling); - } - - /** - * Optional. Specifies service-level scaling settings - * - * Generated from protobuf field .google.cloud.run.v2.ServiceScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\ServiceScaling $var - * @return $this - */ - public function setScaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceScaling::class); - $this->scaling = $var; - - return $this; - } - - /** - * Optional. Disables IAM permission check for run.routes.invoke for callers - * of this service. For more information, visit - * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. - * - * Generated from protobuf field bool invoker_iam_disabled = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getInvokerIamDisabled() - { - return $this->invoker_iam_disabled; - } - - /** - * Optional. Disables IAM permission check for run.routes.invoke for callers - * of this service. For more information, visit - * https://cloud.google.com/run/docs/securing/managing-access#invoker_check. - * - * Generated from protobuf field bool invoker_iam_disabled = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setInvokerIamDisabled($var) - { - GPBUtil::checkBool($var); - $this->invoker_iam_disabled = $var; - - return $this; - } - - /** - * Optional. Disables public resolution of the default URI of this service. - * - * Generated from protobuf field bool default_uri_disabled = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDefaultUriDisabled() - { - return $this->default_uri_disabled; - } - - /** - * Optional. Disables public resolution of the default URI of this service. - * - * Generated from protobuf field bool default_uri_disabled = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDefaultUriDisabled($var) - { - GPBUtil::checkBool($var); - $this->default_uri_disabled = $var; - - return $this; - } - - /** - * Output only. All URLs serving traffic for this Service. - * - * Generated from protobuf field repeated string urls = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUrls() - { - return $this->urls; - } - - /** - * Output only. All URLs serving traffic for this Service. - * - * Generated from protobuf field repeated string urls = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUrls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->urls = $arr; - - return $this; - } - - /** - * Optional. IAP settings on the Service. - * - * Generated from protobuf field bool iap_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIapEnabled() - { - return $this->iap_enabled; - } - - /** - * Optional. IAP settings on the Service. - * - * Generated from protobuf field bool iap_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIapEnabled($var) - { - GPBUtil::checkBool($var); - $this->iap_enabled = $var; - - return $this; - } - - /** - * Optional. Settings for multi-region deployment. - * - * Generated from protobuf field .google.cloud.run.v2.Service.MultiRegionSettings multi_region_settings = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\Service\MultiRegionSettings|null - */ - public function getMultiRegionSettings() - { - return $this->multi_region_settings; - } - - public function hasMultiRegionSettings() - { - return isset($this->multi_region_settings); - } - - public function clearMultiRegionSettings() - { - unset($this->multi_region_settings); - } - - /** - * Optional. Settings for multi-region deployment. - * - * Generated from protobuf field .google.cloud.run.v2.Service.MultiRegionSettings multi_region_settings = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\Service\MultiRegionSettings $var - * @return $this - */ - public function setMultiRegionSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Service\MultiRegionSettings::class); - $this->multi_region_settings = $var; - - return $this; - } - - /** - * One or more custom audiences that you want this service to support. Specify - * each custom audience as the full URL in a string. The custom audiences are - * encoded in the token and used to authenticate requests. For more - * information, see - * https://cloud.google.com/run/docs/configuring/custom-audiences. - * - * Generated from protobuf field repeated string custom_audiences = 37; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCustomAudiences() - { - return $this->custom_audiences; - } - - /** - * One or more custom audiences that you want this service to support. Specify - * each custom audience as the full URL in a string. The custom audiences are - * encoded in the token and used to authenticate requests. For more - * information, see - * https://cloud.google.com/run/docs/configuring/custom-audiences. - * - * Generated from protobuf field repeated string custom_audiences = 37; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCustomAudiences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->custom_audiences = $arr; - - return $this; - } - - /** - * Output only. The generation of this Service currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * - * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getObservedGeneration() - { - return $this->observed_generation; - } - - /** - * Output only. The generation of this Service currently serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * - * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setObservedGeneration($var) - { - GPBUtil::checkInt64($var); - $this->observed_generation = $var; - - return $this; - } - - /** - * Output only. The Condition of this Service, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\Condition|null - */ - public function getTerminalCondition() - { - return $this->terminal_condition; - } - - public function hasTerminalCondition() - { - return isset($this->terminal_condition); - } - - public function clearTerminalCondition() - { - unset($this->terminal_condition); - } - - /** - * Output only. The Condition of this Service, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\Condition $var - * @return $this - */ - public function setTerminalCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Condition::class); - $this->terminal_condition = $var; - - return $this; - } - - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Service does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the Service does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * Output only. Name of the latest revision that is serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getLatestReadyRevision() - { - return $this->latest_ready_revision; - } - - /** - * Output only. Name of the latest revision that is serving traffic. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestReadyRevision($var) - { - GPBUtil::checkString($var, True); - $this->latest_ready_revision = $var; - - return $this; - } - - /** - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getLatestCreatedRevision() - { - return $this->latest_created_revision; - } - - /** - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestCreatedRevision($var) - { - GPBUtil::checkString($var, True); - $this->latest_created_revision = $var; - - return $this; - } - - /** - * Output only. Detailed status information for corresponding traffic targets. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrafficStatuses() - { - return $this->traffic_statuses; - } - - /** - * Output only. Detailed status information for corresponding traffic targets. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\TrafficTargetStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrafficStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\TrafficTargetStatus::class); - $this->traffic_statuses = $arr; - - return $this; - } - - /** - * Output only. The main URI in which this Service is serving traffic. - * - * Generated from protobuf field string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. The main URI in which this Service is serving traffic. - * - * Generated from protobuf field string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. True if Cloud Run Threat Detection monitoring is enabled for - * the parent project of this Service. - * - * Generated from protobuf field bool threat_detection_enabled = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getThreatDetectionEnabled() - { - return $this->threat_detection_enabled; - } - - /** - * Output only. True if Cloud Run Threat Detection monitoring is enabled for - * the parent project of this Service. - * - * Generated from protobuf field bool threat_detection_enabled = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setThreatDetectionEnabled($var) - { - GPBUtil::checkBool($var); - $this->threat_detection_enabled = $var; - - return $this; - } - - /** - * Optional. Configuration for building a Cloud Run function. - * - * Generated from protobuf field .google.cloud.run.v2.BuildConfig build_config = 41 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\BuildConfig|null - */ - public function getBuildConfig() - { - return $this->build_config; - } - - public function hasBuildConfig() - { - return isset($this->build_config); - } - - public function clearBuildConfig() - { - unset($this->build_config); - } - - /** - * Optional. Configuration for building a Cloud Run function. - * - * Generated from protobuf field .google.cloud.run.v2.BuildConfig build_config = 41 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\BuildConfig $var - * @return $this - */ - public function setBuildConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BuildConfig::class); - $this->build_config = $var; - - return $this; - } - - /** - * Output only. Returns true if the Service is currently being acted upon by - * the system to bring it into the desired state. - * When a new Service is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Service to the - * desired serving state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation`, - * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient - * values that might mismatch the intended state: Once reconciliation is over - * (and this field is false), there are two possible outcomes: reconciliation - * succeeded and the serving state matches the Service, or there was an error, - * and reconciliation failed. This state can be found in - * `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: `traffic` and - * `traffic_statuses`, `observed_generation` and `generation`, - * `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `traffic_statuses`, `observed_generation`, and - * `latest_ready_revision` will have the state of the last serving revision, - * or empty for newly created Services. Additional information on the failure - * can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. Returns true if the Service is currently being acted upon by - * the system to bring it into the desired state. - * When a new Service is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the Service to the - * desired serving state. This process is called reconciliation. - * While reconciliation is in process, `observed_generation`, - * `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient - * values that might mismatch the intended state: Once reconciliation is over - * (and this field is false), there are two possible outcomes: reconciliation - * succeeded and the serving state matches the Service, or there was an error, - * and reconciliation failed. This state can be found in - * `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: `traffic` and - * `traffic_statuses`, `observed_generation` and `generation`, - * `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `traffic_statuses`, `observed_generation`, and - * `latest_ready_revision` will have the state of the last serving revision, - * or empty for newly created Services. Additional information on the failure - * can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php deleted file mode 100644 index de8e29d1209a..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Service/MultiRegionSettings.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.run.v2.Service.MultiRegionSettings - */ -class MultiRegionSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List of regions to deploy to, including primary region. - * - * Generated from protobuf field repeated string regions = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $regions; - /** - * Optional. System-generated unique id for the multi-region Service. - * - * Generated from protobuf field string multi_region_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $multi_region_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $regions - * Required. List of regions to deploy to, including primary region. - * @type string $multi_region_id - * Optional. System-generated unique id for the multi-region Service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. List of regions to deploy to, including primary region. - * - * Generated from protobuf field repeated string regions = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegions() - { - return $this->regions; - } - - /** - * Required. List of regions to deploy to, including primary region. - * - * Generated from protobuf field repeated string regions = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->regions = $arr; - - return $this; - } - - /** - * Optional. System-generated unique id for the multi-region Service. - * - * Generated from protobuf field string multi_region_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMultiRegionId() - { - return $this->multi_region_id; - } - - /** - * Optional. System-generated unique id for the multi-region Service. - * - * Generated from protobuf field string multi_region_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMultiRegionId($var) - { - GPBUtil::checkString($var, True); - $this->multi_region_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MultiRegionSettings::class, \Google\Cloud\Run\V2\Service_MultiRegionSettings::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php deleted file mode 100644 index 19cd1b0263c1..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceMesh.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.run.v2.ServiceMesh - */ -class ServiceMesh extends \Google\Protobuf\Internal\Message -{ - /** - * The Mesh resource name. Format: - * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can - * be project id or number. - * - * Generated from protobuf field string mesh = 1 [(.google.api.resource_reference) = { - */ - protected $mesh = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mesh - * The Mesh resource name. Format: - * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can - * be project id or number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * The Mesh resource name. Format: - * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can - * be project id or number. - * - * Generated from protobuf field string mesh = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getMesh() - { - return $this->mesh; - } - - /** - * The Mesh resource name. Format: - * `projects/{project}/locations/global/meshes/{mesh}`, where `{project}` can - * be project id or number. - * - * Generated from protobuf field string mesh = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMesh($var) - { - GPBUtil::checkString($var, True); - $this->mesh = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php deleted file mode 100644 index 2d0ada7f2f49..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.run.v2.ServiceScaling - */ -class ServiceScaling extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. total min instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * - * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_instance_count = 0; - /** - * Optional. The scaling mode for the service. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scaling_mode = 0; - /** - * Optional. total max instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * - * Generated from protobuf field int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_instance_count = 0; - /** - * Optional. total instance count for the service in manual scaling mode. This - * number of instances is divided among all revisions with specified traffic - * based on the percent of traffic they are receiving. - * - * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $manual_instance_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_instance_count - * Optional. total min instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * @type int $scaling_mode - * Optional. The scaling mode for the service. - * @type int $max_instance_count - * Optional. total max instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * @type int $manual_instance_count - * Optional. total instance count for the service in manual scaling mode. This - * number of instances is divided among all revisions with specified traffic - * based on the percent of traffic they are receiving. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * Optional. total min instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * - * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinInstanceCount() - { - return $this->min_instance_count; - } - - /** - * Optional. total min instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * - * Generated from protobuf field int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->min_instance_count = $var; - - return $this; - } - - /** - * Optional. The scaling mode for the service. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getScalingMode() - { - return $this->scaling_mode; - } - - /** - * Optional. The scaling mode for the service. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setScalingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ServiceScaling\ScalingMode::class); - $this->scaling_mode = $var; - - return $this; - } - - /** - * Optional. total max instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * - * Generated from protobuf field int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxInstanceCount() - { - return $this->max_instance_count; - } - - /** - * Optional. total max instances for the service. This number of instances is - * divided among all revisions with specified traffic based on the percent - * of traffic they are receiving. - * - * Generated from protobuf field int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->max_instance_count = $var; - - return $this; - } - - /** - * Optional. total instance count for the service in manual scaling mode. This - * number of instances is divided among all revisions with specified traffic - * based on the percent of traffic they are receiving. - * - * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getManualInstanceCount() - { - return isset($this->manual_instance_count) ? $this->manual_instance_count : 0; - } - - public function hasManualInstanceCount() - { - return isset($this->manual_instance_count); - } - - public function clearManualInstanceCount() - { - unset($this->manual_instance_count); - } - - /** - * Optional. total instance count for the service in manual scaling mode. This - * number of instances is divided among all revisions with specified traffic - * based on the percent of traffic they are receiving. - * - * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setManualInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->manual_instance_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php deleted file mode 100644 index 58d181ecc828..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/ServiceScaling/ScalingMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.run.v2.ServiceScaling.ScalingMode - */ -class ScalingMode -{ - /** - * Unspecified. - * - * Generated from protobuf enum SCALING_MODE_UNSPECIFIED = 0; - */ - const SCALING_MODE_UNSPECIFIED = 0; - /** - * Scale based on traffic between min and max instances. - * - * Generated from protobuf enum AUTOMATIC = 1; - */ - const AUTOMATIC = 1; - /** - * Scale to exactly min instances and ignore max instances. - * - * Generated from protobuf enum MANUAL = 2; - */ - const MANUAL = 2; - - private static $valueToName = [ - self::SCALING_MODE_UNSPECIFIED => 'SCALING_MODE_UNSPECIFIED', - self::AUTOMATIC => 'AUTOMATIC', - self::MANUAL => 'MANUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ScalingMode::class, \Google\Cloud\Run\V2\ServiceScaling_ScalingMode::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php deleted file mode 100644 index a2e37ac307b6..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.run.v2.SourceCode - */ -class SourceCode extends \Google\Protobuf\Internal\Message -{ - protected $source_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Run\V2\SourceCode\CloudStorageSource $cloud_storage_source - * The source is a Cloud Storage bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * The source is a Cloud Storage bucket. - * - * Generated from protobuf field .google.cloud.run.v2.SourceCode.CloudStorageSource cloud_storage_source = 1; - * @return \Google\Cloud\Run\V2\SourceCode\CloudStorageSource|null - */ - public function getCloudStorageSource() - { - return $this->readOneof(1); - } - - public function hasCloudStorageSource() - { - return $this->hasOneof(1); - } - - /** - * The source is a Cloud Storage bucket. - * - * Generated from protobuf field .google.cloud.run.v2.SourceCode.CloudStorageSource cloud_storage_source = 1; - * @param \Google\Cloud\Run\V2\SourceCode\CloudStorageSource $var - * @return $this - */ - public function setCloudStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SourceCode\CloudStorageSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceType() - { - return $this->whichOneof("source_type"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php deleted file mode 100644 index a5a8cfce3e31..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SourceCode/CloudStorageSource.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.run.v2.SourceCode.CloudStorageSource - */ -class CloudStorageSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cloud Storage bucket name. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = ''; - /** - * Required. The Cloud Storage object name. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $object = ''; - /** - * Optional. The Cloud Storage object generation. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $generation = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Required. The Cloud Storage bucket name. - * @type string $object - * Required. The Cloud Storage object name. - * @type int|string $generation - * Optional. The Cloud Storage object generation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cloud Storage bucket name. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Required. The Cloud Storage bucket name. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Required. The Cloud Storage object name. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Required. The Cloud Storage object name. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage object generation. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Optional. The Cloud Storage object generation. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudStorageSource::class, \Google\Cloud\Run\V2\SourceCode_CloudStorageSource::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php deleted file mode 100644 index a577d719f1a5..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/StorageSource.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.run.v2.StorageSource - */ -class StorageSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = ''; - /** - * Required. Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $object = ''; - /** - * Optional. Google Cloud Storage generation for the object. If the generation - * is omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $generation = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Required. Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * @type string $object - * Required. Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * @type int|string $generation - * Optional. Google Cloud Storage generation for the object. If the generation - * is omitted, the latest generation will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Required. Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Required. Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Required. Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - - /** - * Optional. Google Cloud Storage generation for the object. If the generation - * is omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Optional. Google Cloud Storage generation for the object. If the generation - * is omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php deleted file mode 100644 index 2190590b2a85..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest.php +++ /dev/null @@ -1,466 +0,0 @@ -google.cloud.run.v2.SubmitBuildRequest - */ -class SubmitBuildRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location to build in. Location must be a region, - * e.g., 'us-central1' or 'global' if the global builder is to be used. - * Format: - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. Artifact Registry URI to store the built image. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $image_uri = ''; - /** - * Optional. The service account to use for the build. If not set, the default - * Cloud Build service account for the project will be used. - * - * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - /** - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * - * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $worker_pool = ''; - /** - * Optional. Additional tags to annotate the build. - * - * Generated from protobuf field repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Optional. The machine type from default pool to use for the build. If left - * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 - * is supported. If worker_pool is set, this field will be ignored. - * - * Generated from protobuf field string machine_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $machine_type = ''; - /** - * Optional. The release track of the client that initiated the build request. - * - * Generated from protobuf field .google.api.LaunchStage release_track = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $release_track = 0; - /** - * Optional. The client that initiated the build request. - * - * Generated from protobuf field string client = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client = ''; - protected $source; - protected $build_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location to build in. Location must be a region, - * e.g., 'us-central1' or 'global' if the global builder is to be used. - * Format: - * `projects/{project}/locations/{location}` - * @type \Google\Cloud\Run\V2\StorageSource $storage_source - * Required. Source for the build. - * @type string $image_uri - * Required. Artifact Registry URI to store the built image. - * @type \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild $buildpack_build - * Build the source using Buildpacks. - * @type \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild $docker_build - * Build the source using Docker. This means the source has a Dockerfile. - * @type string $service_account - * Optional. The service account to use for the build. If not set, the default - * Cloud Build service account for the project will be used. - * @type string $worker_pool - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. Additional tags to annotate the build. - * @type string $machine_type - * Optional. The machine type from default pool to use for the build. If left - * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 - * is supported. If worker_pool is set, this field will be ignored. - * @type int $release_track - * Optional. The release track of the client that initiated the build request. - * @type string $client - * Optional. The client that initiated the build request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location to build in. Location must be a region, - * e.g., 'us-central1' or 'global' if the global builder is to be used. - * Format: - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location to build in. Location must be a region, - * e.g., 'us-central1' or 'global' if the global builder is to be used. - * Format: - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Source for the build. - * - * Generated from protobuf field .google.cloud.run.v2.StorageSource storage_source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\StorageSource|null - */ - public function getStorageSource() - { - return $this->readOneof(2); - } - - public function hasStorageSource() - { - return $this->hasOneof(2); - } - - /** - * Required. Source for the build. - * - * Generated from protobuf field .google.cloud.run.v2.StorageSource storage_source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\StorageSource $var - * @return $this - */ - public function setStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\StorageSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. Artifact Registry URI to store the built image. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * Required. Artifact Registry URI to store the built image. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * Build the source using Buildpacks. - * - * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild buildpack_build = 4; - * @return \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild|null - */ - public function getBuildpackBuild() - { - return $this->readOneof(4); - } - - public function hasBuildpackBuild() - { - return $this->hasOneof(4); - } - - /** - * Build the source using Buildpacks. - * - * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild buildpack_build = 4; - * @param \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild $var - * @return $this - */ - public function setBuildpackBuild($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SubmitBuildRequest\BuildpacksBuild::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Build the source using Docker. This means the source has a Dockerfile. - * - * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.DockerBuild docker_build = 5; - * @return \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild|null - */ - public function getDockerBuild() - { - return $this->readOneof(5); - } - - public function hasDockerBuild() - { - return $this->hasOneof(5); - } - - /** - * Build the source using Docker. This means the source has a Dockerfile. - * - * Generated from protobuf field .google.cloud.run.v2.SubmitBuildRequest.DockerBuild docker_build = 5; - * @param \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild $var - * @return $this - */ - public function setDockerBuild($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SubmitBuildRequest\DockerBuild::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. The service account to use for the build. If not set, the default - * Cloud Build service account for the project will be used. - * - * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. The service account to use for the build. If not set, the default - * Cloud Build service account for the project will be used. - * - * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * - * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getWorkerPool() - { - return $this->worker_pool; - } - - /** - * Optional. Name of the Cloud Build Custom Worker Pool that should be used to - * build the function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * - * Generated from protobuf field string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool = $var; - - return $this; - } - - /** - * Optional. Additional tags to annotate the build. - * - * Generated from protobuf field repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Additional tags to annotate the build. - * - * Generated from protobuf field repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. The machine type from default pool to use for the build. If left - * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 - * is supported. If worker_pool is set, this field will be ignored. - * - * Generated from protobuf field string machine_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Optional. The machine type from default pool to use for the build. If left - * blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 - * is supported. If worker_pool is set, this field will be ignored. - * - * Generated from protobuf field string machine_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Optional. The release track of the client that initiated the build request. - * - * Generated from protobuf field .google.api.LaunchStage release_track = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getReleaseTrack() - { - return $this->release_track; - } - - /** - * Optional. The release track of the client that initiated the build request. - * - * Generated from protobuf field .google.api.LaunchStage release_track = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setReleaseTrack($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->release_track = $var; - - return $this; - } - - /** - * Optional. The client that initiated the build request. - * - * Generated from protobuf field string client = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClient() - { - return $this->client; - } - - /** - * Optional. The client that initiated the build request. - * - * Generated from protobuf field string client = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClient($var) - { - GPBUtil::checkString($var, True); - $this->client = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getBuildType() - { - return $this->whichOneof("build_type"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php deleted file mode 100644 index 464ca48abd5d..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/BuildpacksBuild.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild - */ -class BuildpacksBuild extends \Google\Protobuf\Internal\Message -{ - /** - * The runtime name, e.g. 'go113'. Leave blank for generic builds. - * - * Generated from protobuf field string runtime = 1 [deprecated = true]; - * @deprecated - */ - protected $runtime = ''; - /** - * Optional. Name of the function target if the source is a function source. - * Required for function builds. - * - * Generated from protobuf field string function_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $function_target = ''; - /** - * Optional. cache_image_uri is the GCR/AR URL where the cache image will be - * stored. cache_image_uri is optional and omitting it will disable caching. - * This URL must be stable across builds. It is used to derive a - * build-specific temporary URL by substituting the tag with the build ID. - * The build will clean up the temporary image on a best-effort basis. - * - * Generated from protobuf field string cache_image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cache_image_uri = ''; - /** - * Optional. The base image to use for the build. - * - * Generated from protobuf field string base_image = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $base_image = ''; - /** - * Optional. User-provided build-time environment variables. - * - * Generated from protobuf field map environment_variables = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $environment_variables; - /** - * Optional. Whether or not the application container will be enrolled in - * automatic base image updates. When true, the application will be built on - * a scratch base image, so the base layers can be appended at run time. - * - * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_automatic_updates = false; - /** - * Optional. project_descriptor stores the path to the project descriptor - * file. When empty, it means that there is no project descriptor file in - * the source. - * - * Generated from protobuf field string project_descriptor = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $project_descriptor = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $runtime - * The runtime name, e.g. 'go113'. Leave blank for generic builds. - * @type string $function_target - * Optional. Name of the function target if the source is a function source. - * Required for function builds. - * @type string $cache_image_uri - * Optional. cache_image_uri is the GCR/AR URL where the cache image will be - * stored. cache_image_uri is optional and omitting it will disable caching. - * This URL must be stable across builds. It is used to derive a - * build-specific temporary URL by substituting the tag with the build ID. - * The build will clean up the temporary image on a best-effort basis. - * @type string $base_image - * Optional. The base image to use for the build. - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * Optional. User-provided build-time environment variables. - * @type bool $enable_automatic_updates - * Optional. Whether or not the application container will be enrolled in - * automatic base image updates. When true, the application will be built on - * a scratch base image, so the base layers can be appended at run time. - * @type string $project_descriptor - * Optional. project_descriptor stores the path to the project descriptor - * file. When empty, it means that there is no project descriptor file in - * the source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); - parent::__construct($data); - } - - /** - * The runtime name, e.g. 'go113'. Leave blank for generic builds. - * - * Generated from protobuf field string runtime = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getRuntime() - { - if ($this->runtime !== '') { - @trigger_error('runtime is deprecated.', E_USER_DEPRECATED); - } - return $this->runtime; - } - - /** - * The runtime name, e.g. 'go113'. Leave blank for generic builds. - * - * Generated from protobuf field string runtime = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setRuntime($var) - { - @trigger_error('runtime is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->runtime = $var; - - return $this; - } - - /** - * Optional. Name of the function target if the source is a function source. - * Required for function builds. - * - * Generated from protobuf field string function_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFunctionTarget() - { - return $this->function_target; - } - - /** - * Optional. Name of the function target if the source is a function source. - * Required for function builds. - * - * Generated from protobuf field string function_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFunctionTarget($var) - { - GPBUtil::checkString($var, True); - $this->function_target = $var; - - return $this; - } - - /** - * Optional. cache_image_uri is the GCR/AR URL where the cache image will be - * stored. cache_image_uri is optional and omitting it will disable caching. - * This URL must be stable across builds. It is used to derive a - * build-specific temporary URL by substituting the tag with the build ID. - * The build will clean up the temporary image on a best-effort basis. - * - * Generated from protobuf field string cache_image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCacheImageUri() - { - return $this->cache_image_uri; - } - - /** - * Optional. cache_image_uri is the GCR/AR URL where the cache image will be - * stored. cache_image_uri is optional and omitting it will disable caching. - * This URL must be stable across builds. It is used to derive a - * build-specific temporary URL by substituting the tag with the build ID. - * The build will clean up the temporary image on a best-effort basis. - * - * Generated from protobuf field string cache_image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCacheImageUri($var) - { - GPBUtil::checkString($var, True); - $this->cache_image_uri = $var; - - return $this; - } - - /** - * Optional. The base image to use for the build. - * - * Generated from protobuf field string base_image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBaseImage() - { - return $this->base_image; - } - - /** - * Optional. The base image to use for the build. - * - * Generated from protobuf field string base_image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBaseImage($var) - { - GPBUtil::checkString($var, True); - $this->base_image = $var; - - return $this; - } - - /** - * Optional. User-provided build-time environment variables. - * - * Generated from protobuf field map environment_variables = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * Optional. User-provided build-time environment variables. - * - * Generated from protobuf field map environment_variables = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - - /** - * Optional. Whether or not the application container will be enrolled in - * automatic base image updates. When true, the application will be built on - * a scratch base image, so the base layers can be appended at run time. - * - * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableAutomaticUpdates() - { - return $this->enable_automatic_updates; - } - - /** - * Optional. Whether or not the application container will be enrolled in - * automatic base image updates. When true, the application will be built on - * a scratch base image, so the base layers can be appended at run time. - * - * Generated from protobuf field bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableAutomaticUpdates($var) - { - GPBUtil::checkBool($var); - $this->enable_automatic_updates = $var; - - return $this; - } - - /** - * Optional. project_descriptor stores the path to the project descriptor - * file. When empty, it means that there is no project descriptor file in - * the source. - * - * Generated from protobuf field string project_descriptor = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProjectDescriptor() - { - return $this->project_descriptor; - } - - /** - * Optional. project_descriptor stores the path to the project descriptor - * file. When empty, it means that there is no project descriptor file in - * the source. - * - * Generated from protobuf field string project_descriptor = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProjectDescriptor($var) - { - GPBUtil::checkString($var, True); - $this->project_descriptor = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BuildpacksBuild::class, \Google\Cloud\Run\V2\SubmitBuildRequest_BuildpacksBuild::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php deleted file mode 100644 index 9089c3fd5f03..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildRequest/DockerBuild.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.run.v2.SubmitBuildRequest.DockerBuild - */ -class DockerBuild extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DockerBuild::class, \Google\Cloud\Run\V2\SubmitBuildRequest_DockerBuild::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php deleted file mode 100644 index 42440dbfebd4..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/SubmitBuildResponse.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.run.v2.SubmitBuildResponse - */ -class SubmitBuildResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Build operation to be polled via CloudBuild API. - * - * Generated from protobuf field .google.longrunning.Operation build_operation = 1; - */ - protected $build_operation = null; - /** - * URI of the base builder image in Artifact Registry being used in the build. - * Used to opt into automatic base image updates. - * - * Generated from protobuf field string base_image_uri = 2; - */ - protected $base_image_uri = ''; - /** - * Warning message for the base image. - * - * Generated from protobuf field string base_image_warning = 3; - */ - protected $base_image_warning = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\LongRunning\Operation $build_operation - * Cloud Build operation to be polled via CloudBuild API. - * @type string $base_image_uri - * URI of the base builder image in Artifact Registry being used in the build. - * Used to opt into automatic base image updates. - * @type string $base_image_warning - * Warning message for the base image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Build::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Build operation to be polled via CloudBuild API. - * - * Generated from protobuf field .google.longrunning.Operation build_operation = 1; - * @return \Google\LongRunning\Operation|null - */ - public function getBuildOperation() - { - return $this->build_operation; - } - - public function hasBuildOperation() - { - return isset($this->build_operation); - } - - public function clearBuildOperation() - { - unset($this->build_operation); - } - - /** - * Cloud Build operation to be polled via CloudBuild API. - * - * Generated from protobuf field .google.longrunning.Operation build_operation = 1; - * @param \Google\LongRunning\Operation $var - * @return $this - */ - public function setBuildOperation($var) - { - GPBUtil::checkMessage($var, \Google\LongRunning\Operation::class); - $this->build_operation = $var; - - return $this; - } - - /** - * URI of the base builder image in Artifact Registry being used in the build. - * Used to opt into automatic base image updates. - * - * Generated from protobuf field string base_image_uri = 2; - * @return string - */ - public function getBaseImageUri() - { - return $this->base_image_uri; - } - - /** - * URI of the base builder image in Artifact Registry being used in the build. - * Used to opt into automatic base image updates. - * - * Generated from protobuf field string base_image_uri = 2; - * @param string $var - * @return $this - */ - public function setBaseImageUri($var) - { - GPBUtil::checkString($var, True); - $this->base_image_uri = $var; - - return $this; - } - - /** - * Warning message for the base image. - * - * Generated from protobuf field string base_image_warning = 3; - * @return string - */ - public function getBaseImageWarning() - { - return $this->base_image_warning; - } - - /** - * Warning message for the base image. - * - * Generated from protobuf field string base_image_warning = 3; - * @param string $var - * @return $this - */ - public function setBaseImageWarning($var) - { - GPBUtil::checkString($var, True); - $this->base_image_warning = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php deleted file mode 100644 index 52828310dc64..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TCPSocketAction.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.run.v2.TCPSocketAction - */ -class TCPSocketAction extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $port - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Optional. Port number to access on the container. Must be in the range 1 to - * 65535. If not specified, defaults to the exposed port of the container, - * which is the value of container.ports[0].containerPort. - * - * Generated from protobuf field int32 port = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php deleted file mode 100644 index eb006f18ad6d..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Task.php +++ /dev/null @@ -1,1431 +0,0 @@ -google.cloud.run.v2.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique name of this Task. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server assigned unique identifier for the Task. The value is a - * UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generation = 0; - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $annotations; - /** - * Output only. Represents time when the task was created by the system. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Represents time when the task was scheduled to run by the - * system. It is not guaranteed to be set in happens-before order across - * separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scheduled_time = null; - /** - * Output only. Represents time when the task started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. Represents time when the Task was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $completion_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. The name of the parent Job. - * - * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $job = ''; - /** - * Output only. The name of the parent Execution. - * - * Generated from protobuf field string execution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $execution = ''; - /** - * Holds the single container that defines the unit of execution for this - * task. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 14; - */ - private $containers; - /** - * A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 15; - */ - private $volumes; - /** - * Number of retries allowed per Task, before marking this Task failed. - * - * Generated from protobuf field int32 max_retries = 16; - */ - protected $max_retries = 0; - /** - * Max allowed time duration the Task may be active before the system will - * actively try to mark it failed and kill associated containers. This applies - * per attempt of a task, meaning each retry can run for the full timeout. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 17; - */ - protected $timeout = null; - /** - * Email address of the IAM service account associated with the Task of a - * Job. The service account represents the identity of the - * running task, and determines what permissions the task has. If - * not provided, the task will use the project's default service account. - * - * Generated from protobuf field string service_account = 18; - */ - protected $service_account = ''; - /** - * The execution environment being used to host this Task. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; - */ - protected $execution_environment = 0; - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The Condition of this Task, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $conditions; - /** - * Output only. The generation of this Task. See comments in `Job.reconciling` - * for additional information on reconciliation process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $observed_generation = 0; - /** - * Output only. Index of the Task, unique per execution, and beginning at 0. - * - * Generated from protobuf field int32 index = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index = 0; - /** - * Output only. The number of times this Task was retried. - * Tasks are retried when they fail up to the maxRetries limit. - * - * Generated from protobuf field int32 retried = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $retried = 0; - /** - * Output only. Result of the last attempt of this Task. - * - * Generated from protobuf field .google.cloud.run.v2.TaskAttemptResult last_attempt_result = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_attempt_result = null; - /** - * Output only. A reference to a customer managed encryption key (CMEK) to use - * to encrypt this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $encryption_key = ''; - /** - * Output only. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vpc_access = null; - /** - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * - * Generated from protobuf field string log_uri = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $log_uri = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. The node selector for the task. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_selector = null; - /** - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * task. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 37 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gpu_zonal_redundancy_disabled = null; - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique name of this Task. - * @type string $uid - * Output only. Server assigned unique identifier for the Task. The value is a - * UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * @type int|string $generation - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Represents time when the task was created by the system. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * @type \Google\Protobuf\Timestamp $scheduled_time - * Output only. Represents time when the task was scheduled to run by the - * system. It is not guaranteed to be set in happens-before order across - * separate operations. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. Represents time when the task started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * @type \Google\Protobuf\Timestamp $completion_time - * Output only. Represents time when the Task was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * @type string $job - * Output only. The name of the parent Job. - * @type string $execution - * Output only. The name of the parent Execution. - * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers - * Holds the single container that defines the unit of execution for this - * task. - * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * A list of Volumes to make available to containers. - * @type int $max_retries - * Number of retries allowed per Task, before marking this Task failed. - * @type \Google\Protobuf\Duration $timeout - * Max allowed time duration the Task may be active before the system will - * actively try to mark it failed and kill associated containers. This applies - * per attempt of a task, meaning each retry can run for the full timeout. - * @type string $service_account - * Email address of the IAM service account associated with the Task of a - * Job. The service account represents the identity of the - * running task, and determines what permissions the task has. If - * not provided, the task will use the project's default service account. - * @type int $execution_environment - * The execution environment being used to host this Task. - * @type bool $reconciling - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions - * Output only. The Condition of this Task, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * @type int|string $observed_generation - * Output only. The generation of this Task. See comments in `Job.reconciling` - * for additional information on reconciliation process in Cloud Run. - * @type int $index - * Output only. Index of the Task, unique per execution, and beginning at 0. - * @type int $retried - * Output only. The number of times this Task was retried. - * Tasks are retried when they fail up to the maxRetries limit. - * @type \Google\Cloud\Run\V2\TaskAttemptResult $last_attempt_result - * Output only. Result of the last attempt of this Task. - * @type string $encryption_key - * Output only. A reference to a customer managed encryption key (CMEK) to use - * to encrypt this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access - * Output only. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * @type string $log_uri - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type \Google\Cloud\Run\V2\NodeSelector $node_selector - * Output only. The node selector for the task. - * @type bool $gpu_zonal_redundancy_disabled - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * task. - * @type string $etag - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique name of this Task. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique name of this Task. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server assigned unique identifier for the Task. The value is a - * UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned unique identifier for the Task. The value is a - * UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * - * Generated from protobuf field int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Output only. Unstructured key value map that may - * be set by external tools to store and arbitrary metadata. - * They are not queryable and should be preserved - * when modifying objects. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Represents time when the task was created by the system. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Represents time when the task was created by the system. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Represents time when the task was scheduled to run by the - * system. It is not guaranteed to be set in happens-before order across - * separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduledTime() - { - return $this->scheduled_time; - } - - public function hasScheduledTime() - { - return isset($this->scheduled_time); - } - - public function clearScheduledTime() - { - unset($this->scheduled_time); - } - - /** - * Output only. Represents time when the task was scheduled to run by the - * system. It is not guaranteed to be set in happens-before order across - * separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduledTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->scheduled_time = $var; - - return $this; - } - - /** - * Output only. Represents time when the task started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. Represents time when the task started to run. - * It is not guaranteed to be set in happens-before order across separate - * operations. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. Represents time when the Task was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompletionTime() - { - return $this->completion_time; - } - - public function hasCompletionTime() - { - return isset($this->completion_time); - } - - public function clearCompletionTime() - { - unset($this->completion_time); - } - - /** - * Output only. Represents time when the Task was completed. It is not - * guaranteed to be set in happens-before order across separate operations. - * - * Generated from protobuf field .google.protobuf.Timestamp completion_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompletionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->completion_time = $var; - - return $this; - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. For a deleted resource, the deletion time. It is only - * populated as a response to a Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. It is only populated as a response to a Delete - * request. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. The name of the parent Job. - * - * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getJob() - { - return $this->job; - } - - /** - * Output only. The name of the parent Job. - * - * Generated from protobuf field string job = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkString($var, True); - $this->job = $var; - - return $this; - } - - /** - * Output only. The name of the parent Execution. - * - * Generated from protobuf field string execution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getExecution() - { - return $this->execution; - } - - /** - * Output only. The name of the parent Execution. - * - * Generated from protobuf field string execution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setExecution($var) - { - GPBUtil::checkString($var, True); - $this->execution = $var; - - return $this; - } - - /** - * Holds the single container that defines the unit of execution for this - * task. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainers() - { - return $this->containers; - } - - /** - * Holds the single container that defines the unit of execution for this - * task. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 14; - * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); - $this->containers = $arr; - - return $this; - } - - /** - * A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 15; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 15; - * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * Number of retries allowed per Task, before marking this Task failed. - * - * Generated from protobuf field int32 max_retries = 16; - * @return int - */ - public function getMaxRetries() - { - return $this->max_retries; - } - - /** - * Number of retries allowed per Task, before marking this Task failed. - * - * Generated from protobuf field int32 max_retries = 16; - * @param int $var - * @return $this - */ - public function setMaxRetries($var) - { - GPBUtil::checkInt32($var); - $this->max_retries = $var; - - return $this; - } - - /** - * Max allowed time duration the Task may be active before the system will - * actively try to mark it failed and kill associated containers. This applies - * per attempt of a task, meaning each retry can run for the full timeout. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 17; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Max allowed time duration the Task may be active before the system will - * actively try to mark it failed and kill associated containers. This applies - * per attempt of a task, meaning each retry can run for the full timeout. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 17; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Email address of the IAM service account associated with the Task of a - * Job. The service account represents the identity of the - * running task, and determines what permissions the task has. If - * not provided, the task will use the project's default service account. - * - * Generated from protobuf field string service_account = 18; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Email address of the IAM service account associated with the Task of a - * Job. The service account represents the identity of the - * running task, and determines what permissions the task has. If - * not provided, the task will use the project's default service account. - * - * Generated from protobuf field string service_account = 18; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The execution environment being used to host this Task. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; - * @return int - */ - public function getExecutionEnvironment() - { - return $this->execution_environment; - } - - /** - * The execution environment being used to host this Task. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 20; - * @param int $var - * @return $this - */ - public function setExecutionEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); - $this->execution_environment = $var; - - return $this; - } - - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. Indicates whether the resource's reconciliation is still in - * progress. See comments in `Job.reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field bool reconciling = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The Condition of this Task, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Output only. The Condition of this Task, containing its readiness status, - * and detailed error information in case it did not reach the desired state. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * Output only. The generation of this Task. See comments in `Job.reconciling` - * for additional information on reconciliation process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getObservedGeneration() - { - return $this->observed_generation; - } - - /** - * Output only. The generation of this Task. See comments in `Job.reconciling` - * for additional information on reconciliation process in Cloud Run. - * - * Generated from protobuf field int64 observed_generation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setObservedGeneration($var) - { - GPBUtil::checkInt64($var); - $this->observed_generation = $var; - - return $this; - } - - /** - * Output only. Index of the Task, unique per execution, and beginning at 0. - * - * Generated from protobuf field int32 index = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Output only. Index of the Task, unique per execution, and beginning at 0. - * - * Generated from protobuf field int32 index = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Output only. The number of times this Task was retried. - * Tasks are retried when they fail up to the maxRetries limit. - * - * Generated from protobuf field int32 retried = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRetried() - { - return $this->retried; - } - - /** - * Output only. The number of times this Task was retried. - * Tasks are retried when they fail up to the maxRetries limit. - * - * Generated from protobuf field int32 retried = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRetried($var) - { - GPBUtil::checkInt32($var); - $this->retried = $var; - - return $this; - } - - /** - * Output only. Result of the last attempt of this Task. - * - * Generated from protobuf field .google.cloud.run.v2.TaskAttemptResult last_attempt_result = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\TaskAttemptResult|null - */ - public function getLastAttemptResult() - { - return $this->last_attempt_result; - } - - public function hasLastAttemptResult() - { - return isset($this->last_attempt_result); - } - - public function clearLastAttemptResult() - { - unset($this->last_attempt_result); - } - - /** - * Output only. Result of the last attempt of this Task. - * - * Generated from protobuf field .google.cloud.run.v2.TaskAttemptResult last_attempt_result = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\TaskAttemptResult $var - * @return $this - */ - public function setLastAttemptResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\TaskAttemptResult::class); - $this->last_attempt_result = $var; - - return $this; - } - - /** - * Output only. A reference to a customer managed encryption key (CMEK) to use - * to encrypt this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - /** - * Output only. A reference to a customer managed encryption key (CMEK) to use - * to encrypt this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->encryption_key = $var; - - return $this; - } - - /** - * Output only. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\VpcAccess|null - */ - public function getVpcAccess() - { - return $this->vpc_access; - } - - public function hasVpcAccess() - { - return isset($this->vpc_access); - } - - public function clearVpcAccess() - { - unset($this->vpc_access); - } - - /** - * Output only. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\VpcAccess $var - * @return $this - */ - public function setVpcAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); - $this->vpc_access = $var; - - return $this; - } - - /** - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * - * Generated from protobuf field string log_uri = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLogUri() - { - return $this->log_uri; - } - - /** - * Output only. URI where logs for this execution can be found in Cloud - * Console. - * - * Generated from protobuf field string log_uri = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLogUri($var) - { - GPBUtil::checkString($var, True); - $this->log_uri = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. The node selector for the task. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\NodeSelector|null - */ - public function getNodeSelector() - { - return $this->node_selector; - } - - public function hasNodeSelector() - { - return isset($this->node_selector); - } - - public function clearNodeSelector() - { - unset($this->node_selector); - } - - /** - * Output only. The node selector for the task. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\NodeSelector $var - * @return $this - */ - public function setNodeSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); - $this->node_selector = $var; - - return $this; - } - - /** - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * task. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 37 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; - } - - public function hasGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled); - } - - public function clearGpuZonalRedundancyDisabled() - { - unset($this->gpu_zonal_redundancy_disabled); - } - - /** - * Optional. Output only. True if GPU zonal redundancy is disabled on this - * task. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 37 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGpuZonalRedundancyDisabled($var) - { - GPBUtil::checkBool($var); - $this->gpu_zonal_redundancy_disabled = $var; - - return $this; - } - - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php deleted file mode 100644 index a4bb1b09e428..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskAttemptResult.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.run.v2.TaskAttemptResult - */ -class TaskAttemptResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The status of this attempt. - * If the status code is OK, then the attempt succeeded. - * - * Generated from protobuf field .google.rpc.Status status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. The exit code of this attempt. - * This may be unset if the container was unable to exit cleanly with a code - * due to some other failure. - * See status field for possible failure details. - * At most one of exit_code or term_signal will be set. - * - * Generated from protobuf field int32 exit_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $exit_code = 0; - /** - * Output only. Termination signal of the container. This is set to non-zero - * if the container is terminated by the system. - * At most one of exit_code or term_signal will be set. - * - * Generated from protobuf field int32 term_signal = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $term_signal = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $status - * Output only. The status of this attempt. - * If the status code is OK, then the attempt succeeded. - * @type int $exit_code - * Output only. The exit code of this attempt. - * This may be unset if the container was unable to exit cleanly with a code - * due to some other failure. - * See status field for possible failure details. - * At most one of exit_code or term_signal will be set. - * @type int $term_signal - * Output only. Termination signal of the container. This is set to non-zero - * if the container is terminated by the system. - * At most one of exit_code or term_signal will be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The status of this attempt. - * If the status code is OK, then the attempt succeeded. - * - * Generated from protobuf field .google.rpc.Status status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. The status of this attempt. - * If the status code is OK, then the attempt succeeded. - * - * Generated from protobuf field .google.rpc.Status status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. The exit code of this attempt. - * This may be unset if the container was unable to exit cleanly with a code - * due to some other failure. - * See status field for possible failure details. - * At most one of exit_code or term_signal will be set. - * - * Generated from protobuf field int32 exit_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getExitCode() - { - return $this->exit_code; - } - - /** - * Output only. The exit code of this attempt. - * This may be unset if the container was unable to exit cleanly with a code - * due to some other failure. - * See status field for possible failure details. - * At most one of exit_code or term_signal will be set. - * - * Generated from protobuf field int32 exit_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setExitCode($var) - { - GPBUtil::checkInt32($var); - $this->exit_code = $var; - - return $this; - } - - /** - * Output only. Termination signal of the container. This is set to non-zero - * if the container is terminated by the system. - * At most one of exit_code or term_signal will be set. - * - * Generated from protobuf field int32 term_signal = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTermSignal() - { - return $this->term_signal; - } - - /** - * Output only. Termination signal of the container. This is set to non-zero - * if the container is terminated by the system. - * At most one of exit_code or term_signal will be set. - * - * Generated from protobuf field int32 term_signal = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTermSignal($var) - { - GPBUtil::checkInt32($var); - $this->term_signal = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php deleted file mode 100644 index a6d1b8dcd4a4..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TaskTemplate.php +++ /dev/null @@ -1,469 +0,0 @@ -google.cloud.run.v2.TaskTemplate - */ -class TaskTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Holds the single container that defines the unit of execution for this - * task. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 1; - */ - private $containers; - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $volumes; - /** - * Optional. Max allowed time duration the Task may be active before the - * system will actively try to mark it failed and kill associated containers. - * This applies per attempt of a task, meaning each retry can run for the full - * timeout. Defaults to 600 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timeout = null; - /** - * Optional. Email address of the IAM service account associated with the Task - * of a Job. The service account represents the identity of the running task, - * and determines what permissions the task has. If not provided, the task - * will use the project's default service account. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - /** - * Optional. The execution environment being used to host this Task. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $execution_environment = 0; - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 7 [(.google.api.resource_reference) = { - */ - protected $encryption_key = ''; - /** - * Optional. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vpc_access = null; - /** - * Optional. The node selector for the task template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_selector = null; - /** - * Optional. True if GPU zonal redundancy is disabled on this task template. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gpu_zonal_redundancy_disabled = null; - protected $retries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers - * Holds the single container that defines the unit of execution for this - * task. - * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * Optional. A list of Volumes to make available to containers. - * @type int $max_retries - * Number of retries allowed per Task, before marking this Task failed. - * Defaults to 3. - * @type \Google\Protobuf\Duration $timeout - * Optional. Max allowed time duration the Task may be active before the - * system will actively try to mark it failed and kill associated containers. - * This applies per attempt of a task, meaning each retry can run for the full - * timeout. Defaults to 600 seconds. - * @type string $service_account - * Optional. Email address of the IAM service account associated with the Task - * of a Job. The service account represents the identity of the running task, - * and determines what permissions the task has. If not provided, the task - * will use the project's default service account. - * @type int $execution_environment - * Optional. The execution environment being used to host this Task. - * @type string $encryption_key - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access - * Optional. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * @type \Google\Cloud\Run\V2\NodeSelector $node_selector - * Optional. The node selector for the task template. - * @type bool $gpu_zonal_redundancy_disabled - * Optional. True if GPU zonal redundancy is disabled on this task template. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\TaskTemplate::initOnce(); - parent::__construct($data); - } - - /** - * Holds the single container that defines the unit of execution for this - * task. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainers() - { - return $this->containers; - } - - /** - * Holds the single container that defines the unit of execution for this - * task. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 1; - * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); - $this->containers = $arr; - - return $this; - } - - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * Number of retries allowed per Task, before marking this Task failed. - * Defaults to 3. - * - * Generated from protobuf field int32 max_retries = 3; - * @return int - */ - public function getMaxRetries() - { - return $this->readOneof(3); - } - - public function hasMaxRetries() - { - return $this->hasOneof(3); - } - - /** - * Number of retries allowed per Task, before marking this Task failed. - * Defaults to 3. - * - * Generated from protobuf field int32 max_retries = 3; - * @param int $var - * @return $this - */ - public function setMaxRetries($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Max allowed time duration the Task may be active before the - * system will actively try to mark it failed and kill associated containers. - * This applies per attempt of a task, meaning each retry can run for the full - * timeout. Defaults to 600 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Optional. Max allowed time duration the Task may be active before the - * system will actively try to mark it failed and kill associated containers. - * This applies per attempt of a task, meaning each retry can run for the full - * timeout. Defaults to 600 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Optional. Email address of the IAM service account associated with the Task - * of a Job. The service account represents the identity of the running task, - * and determines what permissions the task has. If not provided, the task - * will use the project's default service account. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. Email address of the IAM service account associated with the Task - * of a Job. The service account represents the identity of the running task, - * and determines what permissions the task has. If not provided, the task - * will use the project's default service account. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. The execution environment being used to host this Task. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getExecutionEnvironment() - { - return $this->execution_environment; - } - - /** - * Optional. The execution environment being used to host this Task. - * - * Generated from protobuf field .google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setExecutionEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class); - $this->execution_environment = $var; - - return $this; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 7 [(.google.api.resource_reference) = { - * @return string - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 7 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->encryption_key = $var; - - return $this; - } - - /** - * Optional. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\VpcAccess|null - */ - public function getVpcAccess() - { - return $this->vpc_access; - } - - public function hasVpcAccess() - { - return isset($this->vpc_access); - } - - public function clearVpcAccess() - { - unset($this->vpc_access); - } - - /** - * Optional. VPC Access configuration to use for this Task. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\VpcAccess $var - * @return $this - */ - public function setVpcAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); - $this->vpc_access = $var; - - return $this; - } - - /** - * Optional. The node selector for the task template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\NodeSelector|null - */ - public function getNodeSelector() - { - return $this->node_selector; - } - - public function hasNodeSelector() - { - return isset($this->node_selector); - } - - public function clearNodeSelector() - { - unset($this->node_selector); - } - - /** - * Optional. The node selector for the task template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\NodeSelector $var - * @return $this - */ - public function setNodeSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); - $this->node_selector = $var; - - return $this; - } - - /** - * Optional. True if GPU zonal redundancy is disabled on this task template. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; - } - - public function hasGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled); - } - - public function clearGpuZonalRedundancyDisabled() - { - unset($this->gpu_zonal_redundancy_disabled); - } - - /** - * Optional. True if GPU zonal redundancy is disabled on this task template. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setGpuZonalRedundancyDisabled($var) - { - GPBUtil::checkBool($var); - $this->gpu_zonal_redundancy_disabled = $var; - - return $this; - } - - /** - * @return string - */ - public function getRetries() - { - return $this->whichOneof("retries"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php deleted file mode 100644 index b4264dd3a661..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTarget.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.run.v2.TrafficTarget - */ -class TrafficTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The allocation type for this traffic target. - * - * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; - */ - protected $type = 0; - /** - * Revision to which to send this portion of traffic, if traffic allocation is - * by revision. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - */ - protected $revision = ''; - /** - * Specifies percent of the traffic to this Revision. - * This defaults to zero if unspecified. - * - * Generated from protobuf field int32 percent = 3; - */ - protected $percent = 0; - /** - * Indicates a string to be part of the URI to exclusively reference this - * target. - * - * Generated from protobuf field string tag = 4; - */ - protected $tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The allocation type for this traffic target. - * @type string $revision - * Revision to which to send this portion of traffic, if traffic allocation is - * by revision. - * @type int $percent - * Specifies percent of the traffic to this Revision. - * This defaults to zero if unspecified. - * @type string $tag - * Indicates a string to be part of the URI to exclusively reference this - * target. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\TrafficTarget::initOnce(); - parent::__construct($data); - } - - /** - * The allocation type for this traffic target. - * - * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The allocation type for this traffic target. - * - * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\TrafficTargetAllocationType::class); - $this->type = $var; - - return $this; - } - - /** - * Revision to which to send this portion of traffic, if traffic allocation is - * by revision. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Revision to which to send this portion of traffic, if traffic allocation is - * by revision. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Specifies percent of the traffic to this Revision. - * This defaults to zero if unspecified. - * - * Generated from protobuf field int32 percent = 3; - * @return int - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Specifies percent of the traffic to this Revision. - * This defaults to zero if unspecified. - * - * Generated from protobuf field int32 percent = 3; - * @param int $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkInt32($var); - $this->percent = $var; - - return $this; - } - - /** - * Indicates a string to be part of the URI to exclusively reference this - * target. - * - * Generated from protobuf field string tag = 4; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * Indicates a string to be part of the URI to exclusively reference this - * target. - * - * Generated from protobuf field string tag = 4; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php deleted file mode 100644 index f8b35045a421..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetAllocationType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.run.v2.TrafficTargetAllocationType - */ -class TrafficTargetAllocationType -{ - /** - * Unspecified instance allocation type. - * - * Generated from protobuf enum TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED = 0; - */ - const TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED = 0; - /** - * Allocates instances to the Service's latest ready Revision. - * - * Generated from protobuf enum TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST = 1; - */ - const TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST = 1; - /** - * Allocates instances to a Revision by name. - * - * Generated from protobuf enum TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION = 2; - */ - const TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION = 2; - - private static $valueToName = [ - self::TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED => 'TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED', - self::TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST => 'TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST', - self::TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION => 'TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php deleted file mode 100644 index b03251c15e89..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/TrafficTargetStatus.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.run.v2.TrafficTargetStatus - */ -class TrafficTargetStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The allocation type for this traffic target. - * - * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; - */ - protected $type = 0; - /** - * Revision to which this traffic is sent. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - */ - protected $revision = ''; - /** - * Specifies percent of the traffic to this Revision. - * - * Generated from protobuf field int32 percent = 3; - */ - protected $percent = 0; - /** - * Indicates the string used in the URI to exclusively reference this target. - * - * Generated from protobuf field string tag = 4; - */ - protected $tag = ''; - /** - * Displays the target URI. - * - * Generated from protobuf field string uri = 5; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The allocation type for this traffic target. - * @type string $revision - * Revision to which this traffic is sent. - * @type int $percent - * Specifies percent of the traffic to this Revision. - * @type string $tag - * Indicates the string used in the URI to exclusively reference this target. - * @type string $uri - * Displays the target URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\TrafficTarget::initOnce(); - parent::__construct($data); - } - - /** - * The allocation type for this traffic target. - * - * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The allocation type for this traffic target. - * - * Generated from protobuf field .google.cloud.run.v2.TrafficTargetAllocationType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\TrafficTargetAllocationType::class); - $this->type = $var; - - return $this; - } - - /** - * Revision to which this traffic is sent. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Revision to which this traffic is sent. - * - * Generated from protobuf field string revision = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Specifies percent of the traffic to this Revision. - * - * Generated from protobuf field int32 percent = 3; - * @return int - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Specifies percent of the traffic to this Revision. - * - * Generated from protobuf field int32 percent = 3; - * @param int $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkInt32($var); - $this->percent = $var; - - return $this; - } - - /** - * Indicates the string used in the URI to exclusively reference this target. - * - * Generated from protobuf field string tag = 4; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * Indicates the string used in the URI to exclusively reference this target. - * - * Generated from protobuf field string tag = 4; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - - /** - * Displays the target URI. - * - * Generated from protobuf field string uri = 5; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Displays the target URI. - * - * Generated from protobuf field string uri = 5; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php deleted file mode 100644 index 69d8b8afba13..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateJobRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.run.v2.UpdateJobRequest - */ -class UpdateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Job to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - /** - * Optional. If set to true, and if the Job does not exist, it will create a - * new one. Caller must have both create and update permissions for this call - * if this is set to true. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param \Google\Cloud\Run\V2\Job $job Required. The Job to be updated. - * - * @return \Google\Cloud\Run\V2\UpdateJobRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Run\V2\Job $job): self - { - return (new self()) - ->setJob($job); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Run\V2\Job $job - * Required. The Job to be updated. - * @type bool $validate_only - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * @type bool $allow_missing - * Optional. If set to true, and if the Job does not exist, it will create a - * new one. Caller must have both create and update permissions for this call - * if this is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Job::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Job to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. The Job to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Job::class); - $this->job = $var; - - return $this; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. If set to true, and if the Job does not exist, it will create a - * new one. Caller must have both create and update permissions for this call - * if this is set to true. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set to true, and if the Job does not exist, it will create a - * new one. Caller must have both create and update permissions for this call - * if this is set to true. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php deleted file mode 100644 index 0aa1548695fa..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateServiceRequest.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.run.v2.UpdateServiceRequest - */ -class UpdateServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The Service to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = null; - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - /** - * Optional. If set to true, and if the Service does not exist, it will create - * a new one. The caller must have 'run.services.create' permissions if this - * is set to true and the Service does not exist. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param \Google\Cloud\Run\V2\Service $service Required. The Service to be updated. - * - * @return \Google\Cloud\Run\V2\UpdateServiceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Run\V2\Service $service): self - { - return (new self()) - ->setService($service); - } - - /** - * @param \Google\Cloud\Run\V2\Service $service Required. The Service to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated. - * - * @return \Google\Cloud\Run\V2\UpdateServiceRequest - * - * @experimental - */ - public static function buildFromServiceUpdateMask(\Google\Cloud\Run\V2\Service $service, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setService($service) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to be updated. - * @type \Google\Cloud\Run\V2\Service $service - * Required. The Service to be updated. - * @type bool $validate_only - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * @type bool $allow_missing - * Optional. If set to true, and if the Service does not exist, it will create - * a new one. The caller must have 'run.services.create' permissions if this - * is set to true and the Service does not exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The Service to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Required. The Service to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Service::class); - $this->service = $var; - - return $this; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. If set to true, and if the Service does not exist, it will create - * a new one. The caller must have 'run.services.create' permissions if this - * is set to true and the Service does not exist. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set to true, and if the Service does not exist, it will create - * a new one. The caller must have 'run.services.create' permissions if this - * is set to true and the Service does not exist. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php deleted file mode 100644 index e617968ab3cd..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/UpdateWorkerPoolRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.run.v2.UpdateWorkerPoolRequest - */ -class UpdateWorkerPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The WorkerPool to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $worker_pool = null; - /** - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. If set to true, and if the WorkerPool does not exist, it will - * create a new one. The caller must have 'run.workerpools.create' permissions - * if this is set to true and the WorkerPool does not exist. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - /** - * Optional. If set to true, a new revision will be created from the template - * even if the system doesn't detect any changes from the previously deployed - * revision. - * This may be useful for cases where the underlying resources need to be - * recreated or reinitialized. For example if the image is specified by label, - * but the underlying image digest has changed) or if the container performs - * deployment initialization work that needs to be performed again. - * - * Generated from protobuf field bool force_new_revision = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force_new_revision = false; - - /** - * @param \Google\Cloud\Run\V2\WorkerPool $workerPool Required. The WorkerPool to be updated. - * - * @return \Google\Cloud\Run\V2\UpdateWorkerPoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Run\V2\WorkerPool $workerPool): self - { - return (new self()) - ->setWorkerPool($workerPool); - } - - /** - * @param \Google\Cloud\Run\V2\WorkerPool $workerPool Required. The WorkerPool to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated. - * - * @return \Google\Cloud\Run\V2\UpdateWorkerPoolRequest - * - * @experimental - */ - public static function buildFromWorkerPoolUpdateMask(\Google\Cloud\Run\V2\WorkerPool $workerPool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setWorkerPool($workerPool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to be updated. - * @type \Google\Cloud\Run\V2\WorkerPool $worker_pool - * Required. The WorkerPool to be updated. - * @type bool $validate_only - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * @type bool $allow_missing - * Optional. If set to true, and if the WorkerPool does not exist, it will - * create a new one. The caller must have 'run.workerpools.create' permissions - * if this is set to true and the WorkerPool does not exist. - * @type bool $force_new_revision - * Optional. If set to true, a new revision will be created from the template - * even if the system doesn't detect any changes from the previously deployed - * revision. - * This may be useful for cases where the underlying resources need to be - * recreated or reinitialized. For example if the image is specified by label, - * but the underlying image digest has changed) or if the container performs - * deployment initialization work that needs to be performed again. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The WorkerPool to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\WorkerPool|null - */ - public function getWorkerPool() - { - return $this->worker_pool; - } - - public function hasWorkerPool() - { - return isset($this->worker_pool); - } - - public function clearWorkerPool() - { - unset($this->worker_pool); - } - - /** - * Required. The WorkerPool to be updated. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPool worker_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\WorkerPool $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPool::class); - $this->worker_pool = $var; - - return $this; - } - - /** - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Indicates that the request should be validated and default values - * populated, without persisting the request or updating any resources. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. If set to true, and if the WorkerPool does not exist, it will - * create a new one. The caller must have 'run.workerpools.create' permissions - * if this is set to true and the WorkerPool does not exist. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set to true, and if the WorkerPool does not exist, it will - * create a new one. The caller must have 'run.workerpools.create' permissions - * if this is set to true and the WorkerPool does not exist. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Optional. If set to true, a new revision will be created from the template - * even if the system doesn't detect any changes from the previously deployed - * revision. - * This may be useful for cases where the underlying resources need to be - * recreated or reinitialized. For example if the image is specified by label, - * but the underlying image digest has changed) or if the container performs - * deployment initialization work that needs to be performed again. - * - * Generated from protobuf field bool force_new_revision = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForceNewRevision() - { - return $this->force_new_revision; - } - - /** - * Optional. If set to true, a new revision will be created from the template - * even if the system doesn't detect any changes from the previously deployed - * revision. - * This may be useful for cases where the underlying resources need to be - * recreated or reinitialized. For example if the image is specified by label, - * but the underlying image digest has changed) or if the container performs - * deployment initialization work that needs to be performed again. - * - * Generated from protobuf field bool force_new_revision = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForceNewRevision($var) - { - GPBUtil::checkBool($var); - $this->force_new_revision = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php deleted file mode 100644 index 0bb46774d607..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VersionToPath.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.run.v2.VersionToPath - */ -class VersionToPath extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The relative path of the secret in the container. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $path = ''; - /** - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest value, or an integer or a secret alias for a - * specific version. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * Integer octal mode bits to use on this file, must be a value between - * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be - * used. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * - * Generated from protobuf field int32 mode = 3; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Required. The relative path of the secret in the container. - * @type string $version - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest value, or an integer or a secret alias for a - * specific version. - * @type int $mode - * Integer octal mode bits to use on this file, must be a value between - * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be - * used. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The relative path of the secret in the container. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Required. The relative path of the secret in the container. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest value, or an integer or a secret alias for a - * specific version. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The Cloud Secret Manager secret version. - * Can be 'latest' for the latest value, or an integer or a secret alias for a - * specific version. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Integer octal mode bits to use on this file, must be a value between - * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be - * used. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * - * Generated from protobuf field int32 mode = 3; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Integer octal mode bits to use on this file, must be a value between - * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be - * used. - * Notes - * * Internally, a umask of 0222 will be applied to any non-zero value. - * * This is an integer representation of the mode bits. So, the octal - * integer value should look exactly as the chmod numeric notation with a - * leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) - * or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or - * 493 (base-10). - * * This might be in conflict with other options that affect the - * file mode, like fsGroup, and the result can be other mode bits set. - * - * Generated from protobuf field int32 mode = 3; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkInt32($var); - $this->mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php deleted file mode 100644 index 0614cda4f015..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/Volume.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.run.v2.Volume - */ -class Volume extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Volume's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - protected $volume_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Volume's name. - * @type \Google\Cloud\Run\V2\SecretVolumeSource $secret - * Secret represents a secret that should populate this volume. - * @type \Google\Cloud\Run\V2\CloudSqlInstance $cloud_sql_instance - * For Cloud SQL volumes, contains the specific instances that should be - * mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for - * more information on how to connect Cloud SQL and Cloud Run. - * @type \Google\Cloud\Run\V2\EmptyDirVolumeSource $empty_dir - * Ephemeral storage used as a shared volume. - * @type \Google\Cloud\Run\V2\NFSVolumeSource $nfs - * For NFS Voumes, contains the path to the nfs Volume - * @type \Google\Cloud\Run\V2\GCSVolumeSource $gcs - * Persistent storage backed by a Google Cloud Storage bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Volume's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Volume's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Secret represents a secret that should populate this volume. - * - * Generated from protobuf field .google.cloud.run.v2.SecretVolumeSource secret = 2; - * @return \Google\Cloud\Run\V2\SecretVolumeSource|null - */ - public function getSecret() - { - return $this->readOneof(2); - } - - public function hasSecret() - { - return $this->hasOneof(2); - } - - /** - * Secret represents a secret that should populate this volume. - * - * Generated from protobuf field .google.cloud.run.v2.SecretVolumeSource secret = 2; - * @param \Google\Cloud\Run\V2\SecretVolumeSource $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\SecretVolumeSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * For Cloud SQL volumes, contains the specific instances that should be - * mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for - * more information on how to connect Cloud SQL and Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.CloudSqlInstance cloud_sql_instance = 3; - * @return \Google\Cloud\Run\V2\CloudSqlInstance|null - */ - public function getCloudSqlInstance() - { - return $this->readOneof(3); - } - - public function hasCloudSqlInstance() - { - return $this->hasOneof(3); - } - - /** - * For Cloud SQL volumes, contains the specific instances that should be - * mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for - * more information on how to connect Cloud SQL and Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.CloudSqlInstance cloud_sql_instance = 3; - * @param \Google\Cloud\Run\V2\CloudSqlInstance $var - * @return $this - */ - public function setCloudSqlInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\CloudSqlInstance::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Ephemeral storage used as a shared volume. - * - * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource empty_dir = 4; - * @return \Google\Cloud\Run\V2\EmptyDirVolumeSource|null - */ - public function getEmptyDir() - { - return $this->readOneof(4); - } - - public function hasEmptyDir() - { - return $this->hasOneof(4); - } - - /** - * Ephemeral storage used as a shared volume. - * - * Generated from protobuf field .google.cloud.run.v2.EmptyDirVolumeSource empty_dir = 4; - * @param \Google\Cloud\Run\V2\EmptyDirVolumeSource $var - * @return $this - */ - public function setEmptyDir($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\EmptyDirVolumeSource::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * For NFS Voumes, contains the path to the nfs Volume - * - * Generated from protobuf field .google.cloud.run.v2.NFSVolumeSource nfs = 5; - * @return \Google\Cloud\Run\V2\NFSVolumeSource|null - */ - public function getNfs() - { - return $this->readOneof(5); - } - - public function hasNfs() - { - return $this->hasOneof(5); - } - - /** - * For NFS Voumes, contains the path to the nfs Volume - * - * Generated from protobuf field .google.cloud.run.v2.NFSVolumeSource nfs = 5; - * @param \Google\Cloud\Run\V2\NFSVolumeSource $var - * @return $this - */ - public function setNfs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NFSVolumeSource::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Persistent storage backed by a Google Cloud Storage bucket. - * - * Generated from protobuf field .google.cloud.run.v2.GCSVolumeSource gcs = 6; - * @return \Google\Cloud\Run\V2\GCSVolumeSource|null - */ - public function getGcs() - { - return $this->readOneof(6); - } - - public function hasGcs() - { - return $this->hasOneof(6); - } - - /** - * Persistent storage backed by a Google Cloud Storage bucket. - * - * Generated from protobuf field .google.cloud.run.v2.GCSVolumeSource gcs = 6; - * @param \Google\Cloud\Run\V2\GCSVolumeSource $var - * @return $this - */ - public function setGcs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\GCSVolumeSource::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getVolumeType() - { - return $this->whichOneof("volume_type"); - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php deleted file mode 100644 index 20caf8cdfe86..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VolumeMount.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.run.v2.VolumeMount - */ -class VolumeMount extends \Google\Protobuf\Internal\Message -{ - /** - * Required. This must match the Name of a Volume. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Path within the container at which the volume should be mounted. - * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must - * otherwise be `/cloudsql`. All instances defined in the Volume will be - * available as `/cloudsql/[instance]`. For more information on Cloud SQL - * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run - * - * Generated from protobuf field string mount_path = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mount_path = ''; - /** - * Optional. Path within the volume from which the container's volume should - * be mounted. Defaults to "" (volume's root). - * - * Generated from protobuf field string sub_path = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sub_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. This must match the Name of a Volume. - * @type string $mount_path - * Required. Path within the container at which the volume should be mounted. - * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must - * otherwise be `/cloudsql`. All instances defined in the Volume will be - * available as `/cloudsql/[instance]`. For more information on Cloud SQL - * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run - * @type string $sub_path - * Optional. Path within the volume from which the container's volume should - * be mounted. Defaults to "" (volume's root). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce(); - parent::__construct($data); - } - - /** - * Required. This must match the Name of a Volume. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. This must match the Name of a Volume. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Path within the container at which the volume should be mounted. - * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must - * otherwise be `/cloudsql`. All instances defined in the Volume will be - * available as `/cloudsql/[instance]`. For more information on Cloud SQL - * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run - * - * Generated from protobuf field string mount_path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMountPath() - { - return $this->mount_path; - } - - /** - * Required. Path within the container at which the volume should be mounted. - * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must - * otherwise be `/cloudsql`. All instances defined in the Volume will be - * available as `/cloudsql/[instance]`. For more information on Cloud SQL - * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run - * - * Generated from protobuf field string mount_path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMountPath($var) - { - GPBUtil::checkString($var, True); - $this->mount_path = $var; - - return $this; - } - - /** - * Optional. Path within the volume from which the container's volume should - * be mounted. Defaults to "" (volume's root). - * - * Generated from protobuf field string sub_path = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubPath() - { - return $this->sub_path; - } - - /** - * Optional. Path within the volume from which the container's volume should - * be mounted. Defaults to "" (volume's root). - * - * Generated from protobuf field string sub_path = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubPath($var) - { - GPBUtil::checkString($var, True); - $this->sub_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php deleted file mode 100644 index 2edc5d9e89bc..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.run.v2.VpcAccess - */ -class VpcAccess extends \Google\Protobuf\Internal\Message -{ - /** - * VPC Access connector name. - * Format: `projects/{project}/locations/{location}/connectors/{connector}`, - * where `{project}` can be project id or number. - * For more information on sending traffic to a VPC network via a connector, - * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. - * - * Generated from protobuf field string connector = 1 [(.google.api.resource_reference) = { - */ - protected $connector = ''; - /** - * Optional. Traffic VPC egress settings. If not provided, it defaults to - * PRIVATE_RANGES_ONLY. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess.VpcEgress egress = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $egress = 0; - /** - * Optional. Direct VPC egress settings. Currently only single network - * interface is supported. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VpcAccess.NetworkInterface network_interfaces = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $network_interfaces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $connector - * VPC Access connector name. - * Format: `projects/{project}/locations/{location}/connectors/{connector}`, - * where `{project}` can be project id or number. - * For more information on sending traffic to a VPC network via a connector, - * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. - * @type int $egress - * Optional. Traffic VPC egress settings. If not provided, it defaults to - * PRIVATE_RANGES_ONLY. - * @type array<\Google\Cloud\Run\V2\VpcAccess\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * Optional. Direct VPC egress settings. Currently only single network - * interface is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * VPC Access connector name. - * Format: `projects/{project}/locations/{location}/connectors/{connector}`, - * where `{project}` can be project id or number. - * For more information on sending traffic to a VPC network via a connector, - * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. - * - * Generated from protobuf field string connector = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getConnector() - { - return $this->connector; - } - - /** - * VPC Access connector name. - * Format: `projects/{project}/locations/{location}/connectors/{connector}`, - * where `{project}` can be project id or number. - * For more information on sending traffic to a VPC network via a connector, - * visit https://cloud.google.com/run/docs/configuring/vpc-connectors. - * - * Generated from protobuf field string connector = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setConnector($var) - { - GPBUtil::checkString($var, True); - $this->connector = $var; - - return $this; - } - - /** - * Optional. Traffic VPC egress settings. If not provided, it defaults to - * PRIVATE_RANGES_ONLY. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess.VpcEgress egress = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEgress() - { - return $this->egress; - } - - /** - * Optional. Traffic VPC egress settings. If not provided, it defaults to - * PRIVATE_RANGES_ONLY. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess.VpcEgress egress = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEgress($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\VpcAccess\VpcEgress::class); - $this->egress = $var; - - return $this; - } - - /** - * Optional. Direct VPC egress settings. Currently only single network - * interface is supported. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VpcAccess.NetworkInterface network_interfaces = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * Optional. Direct VPC egress settings. Currently only single network - * interface is supported. - * - * Generated from protobuf field repeated .google.cloud.run.v2.VpcAccess.NetworkInterface network_interfaces = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Run\V2\VpcAccess\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\VpcAccess\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php deleted file mode 100644 index 41428271a60d..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/NetworkInterface.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.run.v2.VpcAccess.NetworkInterface - */ -class NetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The VPC network that the Cloud Run resource will be able to - * send traffic to. At least one of network or subnetwork must be specified. - * If both network and subnetwork are specified, the given VPC subnetwork - * must belong to the given VPC network. If network is not specified, it - * will be looked up from the subnetwork. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network = ''; - /** - * Optional. The VPC subnetwork that the Cloud Run resource will get IPs - * from. At least one of network or subnetwork must be specified. If both - * network and subnetwork are specified, the given VPC subnetwork must - * belong to the given VPC network. If subnetwork is not specified, the - * subnetwork with the same name with the network will be used. - * - * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnetwork = ''; - /** - * Optional. Network tags applied to this Cloud Run resource. - * - * Generated from protobuf field repeated string tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Optional. The VPC network that the Cloud Run resource will be able to - * send traffic to. At least one of network or subnetwork must be specified. - * If both network and subnetwork are specified, the given VPC subnetwork - * must belong to the given VPC network. If network is not specified, it - * will be looked up from the subnetwork. - * @type string $subnetwork - * Optional. The VPC subnetwork that the Cloud Run resource will get IPs - * from. At least one of network or subnetwork must be specified. If both - * network and subnetwork are specified, the given VPC subnetwork must - * belong to the given VPC network. If subnetwork is not specified, the - * subnetwork with the same name with the network will be used. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. Network tags applied to this Cloud Run resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The VPC network that the Cloud Run resource will be able to - * send traffic to. At least one of network or subnetwork must be specified. - * If both network and subnetwork are specified, the given VPC subnetwork - * must belong to the given VPC network. If network is not specified, it - * will be looked up from the subnetwork. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. The VPC network that the Cloud Run resource will be able to - * send traffic to. At least one of network or subnetwork must be specified. - * If both network and subnetwork are specified, the given VPC subnetwork - * must belong to the given VPC network. If network is not specified, it - * will be looked up from the subnetwork. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. The VPC subnetwork that the Cloud Run resource will get IPs - * from. At least one of network or subnetwork must be specified. If both - * network and subnetwork are specified, the given VPC subnetwork must - * belong to the given VPC network. If subnetwork is not specified, the - * subnetwork with the same name with the network will be used. - * - * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * Optional. The VPC subnetwork that the Cloud Run resource will get IPs - * from. At least one of network or subnetwork must be specified. If both - * network and subnetwork are specified, the given VPC subnetwork must - * belong to the given VPC network. If subnetwork is not specified, the - * subnetwork with the same name with the network will be used. - * - * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * Optional. Network tags applied to this Cloud Run resource. - * - * Generated from protobuf field repeated string tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Network tags applied to this Cloud Run resource. - * - * Generated from protobuf field repeated string tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkInterface::class, \Google\Cloud\Run\V2\VpcAccess_NetworkInterface::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php deleted file mode 100644 index b6178c267b92..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/VpcAccess/VpcEgress.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.run.v2.VpcAccess.VpcEgress - */ -class VpcEgress -{ - /** - * Unspecified - * - * Generated from protobuf enum VPC_EGRESS_UNSPECIFIED = 0; - */ - const VPC_EGRESS_UNSPECIFIED = 0; - /** - * All outbound traffic is routed through the VPC connector. - * - * Generated from protobuf enum ALL_TRAFFIC = 1; - */ - const ALL_TRAFFIC = 1; - /** - * Only private IP ranges are routed through the VPC connector. - * - * Generated from protobuf enum PRIVATE_RANGES_ONLY = 2; - */ - const PRIVATE_RANGES_ONLY = 2; - - private static $valueToName = [ - self::VPC_EGRESS_UNSPECIFIED => 'VPC_EGRESS_UNSPECIFIED', - self::ALL_TRAFFIC => 'ALL_TRAFFIC', - self::PRIVATE_RANGES_ONLY => 'PRIVATE_RANGES_ONLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VpcEgress::class, \Google\Cloud\Run\V2\VpcAccess_VpcEgress::class); - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php deleted file mode 100644 index f76dea2197e1..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPool.php +++ /dev/null @@ -1,1441 +0,0 @@ -google.cloud.run.v2.WorkerPool - */ -class WorkerPool extends \Google\Protobuf\Internal\Message -{ - /** - * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, - * this field is ignored, and instead composed from - * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_id}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * User-provided description of the WorkerPool. This field currently has a - * 512-character limit. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * - * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generation = 0; - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPool. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 WorkerPool. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * - * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_modifier = ''; - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 13; - */ - protected $client = ''; - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 14; - */ - protected $client_version = ''; - /** - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the - * resource uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $launch_stage = 0; - /** - * Optional. Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization = null; - /** - * Required. The template used to create revisions for this WorkerPool. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPoolRevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = null; - /** - * Optional. Specifies how to distribute instances over a collection of - * Revisions belonging to the WorkerPool. If instance split is empty or not - * provided, defaults to 100% instances assigned to the latest `Ready` - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplit instance_splits = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $instance_splits; - /** - * Optional. Specifies worker-pool-level scaling settings - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPoolScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scaling = null; - /** - * Output only. The generation of this WorkerPool currently serving workloads. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * - * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $observed_generation = 0; - /** - * Output only. The Condition of this WorkerPool, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $terminal_condition = null; - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the WorkerPool does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $conditions; - /** - * Output only. Name of the latest revision that is serving workloads. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $latest_ready_revision = ''; - /** - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $latest_created_revision = ''; - /** - * Output only. Detailed status information for corresponding instance splits. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplitStatus instance_split_statuses = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $instance_split_statuses; - /** - * Output only. Indicates whether Cloud Run Threat Detection monitoring is - * enabled for the parent project of this worker pool. - * - * Generated from protobuf field bool threat_detection_enabled = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $threat_detection_enabled = false; - /** - * Not supported, and ignored by Cloud Run. - * - * Generated from protobuf field repeated string custom_audiences = 37; - */ - private $custom_audiences; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. Returns true if the WorkerPool is currently being acted upon - * by the system to bring it into the desired state. - * When a new WorkerPool is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the WorkerPool to - * the desired serving state. This process is called reconciliation. While - * reconciliation is in process, `observed_generation`, - * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have - * transient values that might mismatch the intended state: Once - * reconciliation is over (and this field is false), there are two possible - * outcomes: reconciliation succeeded and the serving state matches the - * WorkerPool, or there was an error, and reconciliation failed. This state - * can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `instance_splits` and `instance_split_statuses`, `observed_generation` and - * `generation`, `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `instance_split_statuses`, `observed_generation`, - * and `latest_ready_revision` will have the state of the last serving - * revision, or empty for newly created WorkerPools. Additional information on - * the failure can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, - * this field is ignored, and instead composed from - * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_id}` - * @type string $description - * User-provided description of the WorkerPool. This field currently has a - * 512-character limit. - * @type string $uid - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * @type int|string $generation - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPool. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 WorkerPool. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * @type string $creator - * Output only. Email address of the authenticated creator. - * @type string $last_modifier - * Output only. Email address of the last authenticated modifier. - * @type string $client - * Arbitrary identifier for the API client. - * @type string $client_version - * Arbitrary version identifier for the API client. - * @type int $launch_stage - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the - * resource uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * @type \Google\Cloud\Run\V2\BinaryAuthorization $binary_authorization - * Optional. Settings for the Binary Authorization feature. - * @type \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate $template - * Required. The template used to create revisions for this WorkerPool. - * @type array<\Google\Cloud\Run\V2\InstanceSplit>|\Google\Protobuf\Internal\RepeatedField $instance_splits - * Optional. Specifies how to distribute instances over a collection of - * Revisions belonging to the WorkerPool. If instance split is empty or not - * provided, defaults to 100% instances assigned to the latest `Ready` - * Revision. - * @type \Google\Cloud\Run\V2\WorkerPoolScaling $scaling - * Optional. Specifies worker-pool-level scaling settings - * @type int|string $observed_generation - * Output only. The generation of this WorkerPool currently serving workloads. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * @type \Google\Cloud\Run\V2\Condition $terminal_condition - * Output only. The Condition of this WorkerPool, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the WorkerPool does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * @type string $latest_ready_revision - * Output only. Name of the latest revision that is serving workloads. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * @type string $latest_created_revision - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * @type array<\Google\Cloud\Run\V2\InstanceSplitStatus>|\Google\Protobuf\Internal\RepeatedField $instance_split_statuses - * Output only. Detailed status information for corresponding instance splits. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * @type bool $threat_detection_enabled - * Output only. Indicates whether Cloud Run Threat Detection monitoring is - * enabled for the parent project of this worker pool. - * @type array|\Google\Protobuf\Internal\RepeatedField $custom_audiences - * Not supported, and ignored by Cloud Run. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $reconciling - * Output only. Returns true if the WorkerPool is currently being acted upon - * by the system to bring it into the desired state. - * When a new WorkerPool is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the WorkerPool to - * the desired serving state. This process is called reconciliation. While - * reconciliation is in process, `observed_generation`, - * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have - * transient values that might mismatch the intended state: Once - * reconciliation is over (and this field is false), there are two possible - * outcomes: reconciliation succeeded and the serving state matches the - * WorkerPool, or there was an error, and reconciliation failed. This state - * can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `instance_splits` and `instance_split_statuses`, `observed_generation` and - * `generation`, `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `instance_split_statuses`, `observed_generation`, - * and `latest_ready_revision` will have the state of the last serving - * revision, or empty for newly created WorkerPools. Additional information on - * the failure can be found in `terminal_condition` and `conditions`. - * @type string $etag - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPool::initOnce(); - parent::__construct($data); - } - - /** - * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, - * this field is ignored, and instead composed from - * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_id}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The fully qualified name of this WorkerPool. In CreateWorkerPoolRequest, - * this field is ignored, and instead composed from - * CreateWorkerPoolRequest.parent and CreateWorkerPoolRequest.worker_id. - * Format: - * `projects/{project}/locations/{location}/workerPools/{worker_id}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * User-provided description of the WorkerPool. This field currently has a - * 512-character limit. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the WorkerPool. This field currently has a - * 512-character limit. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned unique identifier for the trigger. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * - * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Output only. A number that monotonically increases every time the user - * modifies the desired state. - * Please note that unlike v1, this is an int64 value. As with most Google - * APIs, its JSON representation will be a `string` instead of an `integer`. - * - * Generated from protobuf field int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPool. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPool. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 WorkerPool. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * - * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected in new resources. All system - * annotations in v1 now have a corresponding field in v2 WorkerPool. - *

This field follows Kubernetes - * annotations' namespacing, limits, and rules. - * - * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The deletion time. It is only populated as a response to a - * Delete request. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. For a deleted resource, the time after which it will be - * permamently deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. Email address of the authenticated creator. - * - * Generated from protobuf field string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLastModifier() - { - return $this->last_modifier; - } - - /** - * Output only. Email address of the last authenticated modifier. - * - * Generated from protobuf field string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLastModifier($var) - { - GPBUtil::checkString($var, True); - $this->last_modifier = $var; - - return $this; - } - - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 13; - * @return string - */ - public function getClient() - { - return $this->client; - } - - /** - * Arbitrary identifier for the API client. - * - * Generated from protobuf field string client = 13; - * @param string $var - * @return $this - */ - public function setClient($var) - { - GPBUtil::checkString($var, True); - $this->client = $var; - - return $this; - } - - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 14; - * @return string - */ - public function getClientVersion() - { - return $this->client_version; - } - - /** - * Arbitrary version identifier for the API client. - * - * Generated from protobuf field string client_version = 14; - * @param string $var - * @return $this - */ - public function setClientVersion($var) - { - GPBUtil::checkString($var, True); - $this->client_version = $var; - - return $this; - } - - /** - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the - * resource uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getLaunchStage() - { - return $this->launch_stage; - } - - /** - * Optional. The launch stage as defined by [Google Cloud Platform - * Launch Stages](https://cloud.google.com/terms/launch-stages). - * Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA - * is assumed. - * Set the launch stage to a preview stage on input to allow use of preview - * features in that stage. On read (or output), describes whether the - * resource uses preview features. - * For example, if ALPHA is provided as input, but only BETA and GA-level - * features are used, this field will be BETA on output. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setLaunchStage($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->launch_stage = $var; - - return $this; - } - - /** - * Optional. Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\BinaryAuthorization|null - */ - public function getBinaryAuthorization() - { - return $this->binary_authorization; - } - - public function hasBinaryAuthorization() - { - return isset($this->binary_authorization); - } - - public function clearBinaryAuthorization() - { - unset($this->binary_authorization); - } - - /** - * Optional. Settings for the Binary Authorization feature. - * - * Generated from protobuf field .google.cloud.run.v2.BinaryAuthorization binary_authorization = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\BinaryAuthorization $var - * @return $this - */ - public function setBinaryAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\BinaryAuthorization::class); - $this->binary_authorization = $var; - - return $this; - } - - /** - * Required. The template used to create revisions for this WorkerPool. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPoolRevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Required. The template used to create revisions for this WorkerPool. - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPoolRevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPoolRevisionTemplate::class); - $this->template = $var; - - return $this; - } - - /** - * Optional. Specifies how to distribute instances over a collection of - * Revisions belonging to the WorkerPool. If instance split is empty or not - * provided, defaults to 100% instances assigned to the latest `Ready` - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplit instance_splits = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceSplits() - { - return $this->instance_splits; - } - - /** - * Optional. Specifies how to distribute instances over a collection of - * Revisions belonging to the WorkerPool. If instance split is empty or not - * provided, defaults to 100% instances assigned to the latest `Ready` - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplit instance_splits = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Run\V2\InstanceSplit>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceSplits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\InstanceSplit::class); - $this->instance_splits = $arr; - - return $this; - } - - /** - * Optional. Specifies worker-pool-level scaling settings - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPoolScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\WorkerPoolScaling|null - */ - public function getScaling() - { - return $this->scaling; - } - - public function hasScaling() - { - return isset($this->scaling); - } - - public function clearScaling() - { - unset($this->scaling); - } - - /** - * Optional. Specifies worker-pool-level scaling settings - * - * Generated from protobuf field .google.cloud.run.v2.WorkerPoolScaling scaling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\WorkerPoolScaling $var - * @return $this - */ - public function setScaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\WorkerPoolScaling::class); - $this->scaling = $var; - - return $this; - } - - /** - * Output only. The generation of this WorkerPool currently serving workloads. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * - * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getObservedGeneration() - { - return $this->observed_generation; - } - - /** - * Output only. The generation of this WorkerPool currently serving workloads. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. Please note that unlike v1, this is an int64 value. - * As with most Google APIs, its JSON representation will be a `string` - * instead of an `integer`. - * - * Generated from protobuf field int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setObservedGeneration($var) - { - GPBUtil::checkInt64($var); - $this->observed_generation = $var; - - return $this; - } - - /** - * Output only. The Condition of this WorkerPool, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Run\V2\Condition|null - */ - public function getTerminalCondition() - { - return $this->terminal_condition; - } - - public function hasTerminalCondition() - { - return isset($this->terminal_condition); - } - - public function clearTerminalCondition() - { - unset($this->terminal_condition); - } - - /** - * Output only. The Condition of this WorkerPool, containing its readiness - * status, and detailed error information in case it did not reach a serving - * state. See comments in `reconciling` for additional information on - * reconciliation process in Cloud Run. - * - * Generated from protobuf field .google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Run\V2\Condition $var - * @return $this - */ - public function setTerminalCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\Condition::class); - $this->terminal_condition = $var; - - return $this; - } - - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the WorkerPool does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Output only. The Conditions of all other associated sub-resources. They - * contain additional diagnostics information in case the WorkerPool does not - * reach its Serving state. See comments in `reconciling` for additional - * information on reconciliation process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * Output only. Name of the latest revision that is serving workloads. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getLatestReadyRevision() - { - return $this->latest_ready_revision; - } - - /** - * Output only. Name of the latest revision that is serving workloads. See - * comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestReadyRevision($var) - { - GPBUtil::checkString($var, True); - $this->latest_ready_revision = $var; - - return $this; - } - - /** - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getLatestCreatedRevision() - { - return $this->latest_created_revision; - } - - /** - * Output only. Name of the last created revision. See comments in - * `reconciling` for additional information on reconciliation process in Cloud - * Run. - * - * Generated from protobuf field string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLatestCreatedRevision($var) - { - GPBUtil::checkString($var, True); - $this->latest_created_revision = $var; - - return $this; - } - - /** - * Output only. Detailed status information for corresponding instance splits. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplitStatus instance_split_statuses = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceSplitStatuses() - { - return $this->instance_split_statuses; - } - - /** - * Output only. Detailed status information for corresponding instance splits. - * See comments in `reconciling` for additional information on reconciliation - * process in Cloud Run. - * - * Generated from protobuf field repeated .google.cloud.run.v2.InstanceSplitStatus instance_split_statuses = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Run\V2\InstanceSplitStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceSplitStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\InstanceSplitStatus::class); - $this->instance_split_statuses = $arr; - - return $this; - } - - /** - * Output only. Indicates whether Cloud Run Threat Detection monitoring is - * enabled for the parent project of this worker pool. - * - * Generated from protobuf field bool threat_detection_enabled = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getThreatDetectionEnabled() - { - return $this->threat_detection_enabled; - } - - /** - * Output only. Indicates whether Cloud Run Threat Detection monitoring is - * enabled for the parent project of this worker pool. - * - * Generated from protobuf field bool threat_detection_enabled = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setThreatDetectionEnabled($var) - { - GPBUtil::checkBool($var); - $this->threat_detection_enabled = $var; - - return $this; - } - - /** - * Not supported, and ignored by Cloud Run. - * - * Generated from protobuf field repeated string custom_audiences = 37; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCustomAudiences() - { - return $this->custom_audiences; - } - - /** - * Not supported, and ignored by Cloud Run. - * - * Generated from protobuf field repeated string custom_audiences = 37; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCustomAudiences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->custom_audiences = $arr; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. Returns true if the WorkerPool is currently being acted upon - * by the system to bring it into the desired state. - * When a new WorkerPool is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the WorkerPool to - * the desired serving state. This process is called reconciliation. While - * reconciliation is in process, `observed_generation`, - * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have - * transient values that might mismatch the intended state: Once - * reconciliation is over (and this field is false), there are two possible - * outcomes: reconciliation succeeded and the serving state matches the - * WorkerPool, or there was an error, and reconciliation failed. This state - * can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `instance_splits` and `instance_split_statuses`, `observed_generation` and - * `generation`, `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `instance_split_statuses`, `observed_generation`, - * and `latest_ready_revision` will have the state of the last serving - * revision, or empty for newly created WorkerPools. Additional information on - * the failure can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. Returns true if the WorkerPool is currently being acted upon - * by the system to bring it into the desired state. - * When a new WorkerPool is created, or an existing one is updated, Cloud Run - * will asynchronously perform all necessary steps to bring the WorkerPool to - * the desired serving state. This process is called reconciliation. While - * reconciliation is in process, `observed_generation`, - * `latest_ready_revison`, `instance_split_statuses`, and `uri` will have - * transient values that might mismatch the intended state: Once - * reconciliation is over (and this field is false), there are two possible - * outcomes: reconciliation succeeded and the serving state matches the - * WorkerPool, or there was an error, and reconciliation failed. This state - * can be found in `terminal_condition.state`. - * If reconciliation succeeded, the following fields will match: - * `instance_splits` and `instance_split_statuses`, `observed_generation` and - * `generation`, `latest_ready_revision` and `latest_created_revision`. - * If reconciliation failed, `instance_split_statuses`, `observed_generation`, - * and `latest_ready_revision` will have the state of the last serving - * revision, or empty for newly created WorkerPools. Additional information on - * the failure can be found in `terminal_condition` and `conditions`. - * - * Generated from protobuf field bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. A system-generated fingerprint for this version of the - * resource. May be used to detect modification conflict during updates. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php deleted file mode 100644 index e53a2a28f7ed..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolRevisionTemplate.php +++ /dev/null @@ -1,634 +0,0 @@ -google.cloud.run.v2.WorkerPoolRevisionTemplate - */ -class WorkerPoolRevisionTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the WorkerPool name. - * - * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $revision = ''; - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPoolRevisionTemplate. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 WorkerPoolRevisionTemplate. - * This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vpc_access = null; - /** - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - /** - * Holds list of the containers that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 6; - */ - private $containers; - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $volumes; - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 8 [(.google.api.resource_reference) = { - */ - protected $encryption_key = ''; - /** - * Optional. Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_mesh = null; - /** - * Optional. The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_key_revocation_action = 0; - /** - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_key_shutdown_duration = null; - /** - * Optional. The node selector for the revision template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_selector = null; - /** - * Optional. True if GPU zonal redundancy is disabled on this worker pool. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gpu_zonal_redundancy_disabled = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $revision - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the WorkerPool name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPoolRevisionTemplate. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 WorkerPoolRevisionTemplate. - * This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * @type \Google\Cloud\Run\V2\VpcAccess $vpc_access - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * @type string $service_account - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers - * Holds list of the containers that defines the unit of execution for this - * Revision. - * @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * Optional. A list of Volumes to make available to containers. - * @type string $encryption_key - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * @type \Google\Cloud\Run\V2\ServiceMesh $service_mesh - * Optional. Enables service mesh connectivity. - * @type int $encryption_key_revocation_action - * Optional. The action to take if the encryption key is revoked. - * @type \Google\Protobuf\Duration $encryption_key_shutdown_duration - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * @type \Google\Cloud\Run\V2\NodeSelector $node_selector - * Optional. The node selector for the revision template. - * @type bool $gpu_zonal_redundancy_disabled - * Optional. True if GPU zonal redundancy is disabled on this worker pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\WorkerPoolRevisionTemplate::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the WorkerPool name. - * - * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Optional. The unique name for the revision. If this field is omitted, it - * will be automatically generated based on the WorkerPool name. - * - * Generated from protobuf field string revision = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPoolRevisionTemplate. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Unstructured key value map that can be used to organize and - * categorize objects. User-provided labels are shared with Google's billing - * system, so they can be used to filter, or break down billing charges by - * team, component, environment, state, etc. For more information, visit - * https://cloud.google.com/resource-manager/docs/creating-managing-labels or - * https://cloud.google.com/run/docs/configuring/labels. - * Cloud Run API v2 does not support labels with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system labels in v1 now have a - * corresponding field in v2 WorkerPoolRevisionTemplate. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 WorkerPoolRevisionTemplate. - * This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Unstructured key value map that may be set by external tools to - * store and arbitrary metadata. They are not queryable and should be - * preserved when modifying objects. - * Cloud Run API v2 does not support annotations with `run.googleapis.com`, - * `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - * namespaces, and they will be rejected. All system annotations in v1 now - * have a corresponding field in v2 WorkerPoolRevisionTemplate. - * This field follows Kubernetes annotations' namespacing, limits, and - * rules. - * - * Generated from protobuf field map annotations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\VpcAccess|null - */ - public function getVpcAccess() - { - return $this->vpc_access; - } - - public function hasVpcAccess() - { - return isset($this->vpc_access); - } - - public function clearVpcAccess() - { - unset($this->vpc_access); - } - - /** - * Optional. VPC Access configuration to use for this Revision. For more - * information, visit - * https://cloud.google.com/run/docs/configuring/connecting-vpc. - * - * Generated from protobuf field .google.cloud.run.v2.VpcAccess vpc_access = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\VpcAccess $var - * @return $this - */ - public function setVpcAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class); - $this->vpc_access = $var; - - return $this; - } - - /** - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. Email address of the IAM service account associated with the - * revision of the service. The service account represents the identity of the - * running revision, and determines what permissions the revision has. If not - * provided, the revision will use the project's default service account. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Holds list of the containers that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainers() - { - return $this->containers; - } - - /** - * Holds list of the containers that defines the unit of execution for this - * Revision. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Container containers = 6; - * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class); - $this->containers = $arr; - - return $this; - } - - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Optional. A list of Volumes to make available to containers. - * - * Generated from protobuf field repeated .google.cloud.run.v2.Volume volumes = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 8 [(.google.api.resource_reference) = { - * @return string - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - /** - * A reference to a customer managed encryption key (CMEK) to use to encrypt - * this container image. For more information, go to - * https://cloud.google.com/run/docs/securing/using-cmek - * - * Generated from protobuf field string encryption_key = 8 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->encryption_key = $var; - - return $this; - } - - /** - * Optional. Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\ServiceMesh|null - */ - public function getServiceMesh() - { - return $this->service_mesh; - } - - public function hasServiceMesh() - { - return isset($this->service_mesh); - } - - public function clearServiceMesh() - { - unset($this->service_mesh); - } - - /** - * Optional. Enables service mesh connectivity. - * - * Generated from protobuf field .google.cloud.run.v2.ServiceMesh service_mesh = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\ServiceMesh $var - * @return $this - */ - public function setServiceMesh($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\ServiceMesh::class); - $this->service_mesh = $var; - - return $this; - } - - /** - * Optional. The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEncryptionKeyRevocationAction() - { - return $this->encryption_key_revocation_action; - } - - /** - * Optional. The action to take if the encryption key is revoked. - * - * Generated from protobuf field .google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEncryptionKeyRevocationAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class); - $this->encryption_key_revocation_action = $var; - - return $this; - } - - /** - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getEncryptionKeyShutdownDuration() - { - return $this->encryption_key_shutdown_duration; - } - - public function hasEncryptionKeyShutdownDuration() - { - return isset($this->encryption_key_shutdown_duration); - } - - public function clearEncryptionKeyShutdownDuration() - { - unset($this->encryption_key_shutdown_duration); - } - - /** - * Optional. If encryption_key_revocation_action is SHUTDOWN, the duration - * before shutting down all instances. The minimum increment is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration encryption_key_shutdown_duration = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEncryptionKeyShutdownDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->encryption_key_shutdown_duration = $var; - - return $this; - } - - /** - * Optional. The node selector for the revision template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Run\V2\NodeSelector|null - */ - public function getNodeSelector() - { - return $this->node_selector; - } - - public function hasNodeSelector() - { - return isset($this->node_selector); - } - - public function clearNodeSelector() - { - unset($this->node_selector); - } - - /** - * Optional. The node selector for the revision template. - * - * Generated from protobuf field .google.cloud.run.v2.NodeSelector node_selector = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Run\V2\NodeSelector $var - * @return $this - */ - public function setNodeSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\NodeSelector::class); - $this->node_selector = $var; - - return $this; - } - - /** - * Optional. True if GPU zonal redundancy is disabled on this worker pool. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled) ? $this->gpu_zonal_redundancy_disabled : false; - } - - public function hasGpuZonalRedundancyDisabled() - { - return isset($this->gpu_zonal_redundancy_disabled); - } - - public function clearGpuZonalRedundancyDisabled() - { - unset($this->gpu_zonal_redundancy_disabled); - } - - /** - * Optional. True if GPU zonal redundancy is disabled on this worker pool. - * - * Generated from protobuf field optional bool gpu_zonal_redundancy_disabled = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setGpuZonalRedundancyDisabled($var) - { - GPBUtil::checkBool($var); - $this->gpu_zonal_redundancy_disabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php b/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php deleted file mode 100644 index ad43f4c7e6ff..000000000000 --- a/owl-bot-staging/Run/v2/proto/src/Google/Cloud/Run/V2/WorkerPoolScaling.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.run.v2.WorkerPoolScaling - */ -class WorkerPoolScaling extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The total number of instances in manual scaling mode. - * - * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $manual_instance_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $manual_instance_count - * Optional. The total number of instances in manual scaling mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The total number of instances in manual scaling mode. - * - * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getManualInstanceCount() - { - return isset($this->manual_instance_count) ? $this->manual_instance_count : 0; - } - - public function hasManualInstanceCount() - { - return isset($this->manual_instance_count); - } - - public function clearManualInstanceCount() - { - unset($this->manual_instance_count); - } - - /** - * Optional. The total number of instances in manual scaling mode. - * - * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setManualInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->manual_instance_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php b/owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php deleted file mode 100644 index 3a56a96a8749..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/BuildsClient/submit_build.php +++ /dev/null @@ -1,94 +0,0 @@ -setBucket($storageSourceBucket) - ->setObject($storageSourceObject); - $request = (new SubmitBuildRequest()) - ->setParent($parent) - ->setStorageSource($storageSource) - ->setImageUri($imageUri); - - // Call the API and handle any network failures. - try { - /** @var SubmitBuildResponse $response */ - $response = $buildsClient->submitBuild($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $storageSourceBucket = '[BUCKET]'; - $storageSourceObject = '[OBJECT]'; - $imageUri = '[IMAGE_URI]'; - - submit_build_sample($parent, $storageSourceBucket, $storageSourceObject, $imageUri); -} -// [END run_v2_generated_Builds_SubmitBuild_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php deleted file mode 100644 index 67971a2d2ecd..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/cancel_execution.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $executionsClient->cancelExecution($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Execution $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExecutionsClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - - cancel_execution_sample($formattedName); -} -// [END run_v2_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php deleted file mode 100644 index a6a40e306333..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/delete_execution.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $executionsClient->deleteExecution($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Execution $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExecutionsClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - - delete_execution_sample($formattedName); -} -// [END run_v2_generated_Executions_DeleteExecution_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php deleted file mode 100644 index 943e831f9a6d..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/get_execution.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Execution $response */ - $response = $executionsClient->getExecution($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExecutionsClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - - get_execution_sample($formattedName); -} -// [END run_v2_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php b/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php deleted file mode 100644 index 3bdab87e34f6..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ExecutionsClient/list_executions.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $executionsClient->listExecutions($request); - - /** @var Execution $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ExecutionsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - list_executions_sample($formattedParent); -} -// [END run_v2_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php deleted file mode 100644 index d9bd6fd17c06..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/create_job.php +++ /dev/null @@ -1,97 +0,0 @@ -setTemplate($jobTemplateTemplate); - $job = (new Job()) - ->setTemplate($jobTemplate); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job) - ->setJobId($jobId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobsClient->createJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Job $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = JobsClient::locationName('[PROJECT]', '[LOCATION]'); - $jobId = '[JOB_ID]'; - - create_job_sample($formattedParent, $jobId); -} -// [END run_v2_generated_Jobs_CreateJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php deleted file mode 100644 index 49cbe7164bd6..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/delete_job.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobsClient->deleteJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Job $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = JobsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - delete_job_sample($formattedName); -} -// [END run_v2_generated_Jobs_DeleteJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php deleted file mode 100644 index caad9297c9d3..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $jobsClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END run_v2_generated_Jobs_GetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php deleted file mode 100644 index 5e6f2004c3f7..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/get_job.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobsClient->getJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = JobsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - get_job_sample($formattedName); -} -// [END run_v2_generated_Jobs_GetJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php deleted file mode 100644 index dc0cf25efa98..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/list_jobs.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $jobsClient->listJobs($request); - - /** @var Job $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = JobsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_jobs_sample($formattedParent); -} -// [END run_v2_generated_Jobs_ListJobs_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php deleted file mode 100644 index 52785b7b44aa..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/run_job.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobsClient->runJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Execution $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = JobsClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - run_job_sample($formattedName); -} -// [END run_v2_generated_Jobs_RunJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php deleted file mode 100644 index 55f6036ee6fd..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/set_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $jobsClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END run_v2_generated_Jobs_SetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php deleted file mode 100644 index ce4e7bcb22ca..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $jobsClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END run_v2_generated_Jobs_TestIamPermissions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php b/owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php deleted file mode 100644 index 3f2a8978c693..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/JobsClient/update_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setTemplate($jobTemplateTemplate); - $job = (new Job()) - ->setTemplate($jobTemplate); - $request = (new UpdateJobRequest()) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobsClient->updateJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Job $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END run_v2_generated_Jobs_UpdateJob_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php deleted file mode 100644 index 0eb4555285f5..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/delete_revision.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $revisionsClient->deleteRevision($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Revision $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RevisionsClient::revisionName( - '[PROJECT]', - '[LOCATION]', - '[SERVICE]', - '[REVISION]' - ); - - delete_revision_sample($formattedName); -} -// [END run_v2_generated_Revisions_DeleteRevision_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php deleted file mode 100644 index a3878b574ca5..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/get_revision.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Revision $response */ - $response = $revisionsClient->getRevision($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RevisionsClient::revisionName( - '[PROJECT]', - '[LOCATION]', - '[SERVICE]', - '[REVISION]' - ); - - get_revision_sample($formattedName); -} -// [END run_v2_generated_Revisions_GetRevision_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php b/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php deleted file mode 100644 index 8f0d90935284..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/RevisionsClient/list_revisions.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $revisionsClient->listRevisions($request); - - /** @var Revision $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = RevisionsClient::serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - - list_revisions_sample($formattedParent); -} -// [END run_v2_generated_Revisions_ListRevisions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php deleted file mode 100644 index d0cfec9e4270..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/create_service.php +++ /dev/null @@ -1,95 +0,0 @@ -setTemplate($serviceTemplate); - $request = (new CreateServiceRequest()) - ->setParent($formattedParent) - ->setService($service) - ->setServiceId($serviceId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $servicesClient->createService($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Service $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $serviceId = '[SERVICE_ID]'; - - create_service_sample($formattedParent, $serviceId); -} -// [END run_v2_generated_Services_CreateService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php deleted file mode 100644 index 7fc76f1f1ea4..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/delete_service.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $servicesClient->deleteService($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Service $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServicesClient::serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - - delete_service_sample($formattedName); -} -// [END run_v2_generated_Services_DeleteService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php deleted file mode 100644 index 7acf62b73868..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $servicesClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END run_v2_generated_Services_GetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php deleted file mode 100644 index c5144ab68613..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/get_service.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Service $response */ - $response = $servicesClient->getService($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServicesClient::serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - - get_service_sample($formattedName); -} -// [END run_v2_generated_Services_GetService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php deleted file mode 100644 index 91b20ade2c81..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/list_services.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $servicesClient->listServices($request); - - /** @var Service $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_services_sample($formattedParent); -} -// [END run_v2_generated_Services_ListServices_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php deleted file mode 100644 index 87240f31d7e0..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/set_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $servicesClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END run_v2_generated_Services_SetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php deleted file mode 100644 index a175ff6c7354..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $servicesClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END run_v2_generated_Services_TestIamPermissions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php b/owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php deleted file mode 100644 index 159dc763a8e5..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/ServicesClient/update_service.php +++ /dev/null @@ -1,74 +0,0 @@ -setTemplate($serviceTemplate); - $request = (new UpdateServiceRequest()) - ->setService($service); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $servicesClient->updateService($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Service $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END run_v2_generated_Services_UpdateService_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php b/owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php deleted file mode 100644 index 069ab2fa985a..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/TasksClient/get_task.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $tasksClient->getTask($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TasksClient::taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); - - get_task_sample($formattedName); -} -// [END run_v2_generated_Tasks_GetTask_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php b/owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php deleted file mode 100644 index 14ed847b2661..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/TasksClient/list_tasks.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $tasksClient->listTasks($request); - - /** @var Task $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TasksClient::executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - - list_tasks_sample($formattedParent); -} -// [END run_v2_generated_Tasks_ListTasks_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php deleted file mode 100644 index d2f23abbd34e..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/create_worker_pool.php +++ /dev/null @@ -1,97 +0,0 @@ -setTemplate($workerPoolTemplate); - $request = (new CreateWorkerPoolRequest()) - ->setParent($formattedParent) - ->setWorkerPool($workerPool) - ->setWorkerPoolId($workerPoolId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $workerPoolsClient->createWorkerPool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var WorkerPool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WorkerPoolsClient::locationName('[PROJECT]', '[LOCATION]'); - $workerPoolId = '[WORKER_POOL_ID]'; - - create_worker_pool_sample($formattedParent, $workerPoolId); -} -// [END run_v2_generated_WorkerPools_CreateWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php deleted file mode 100644 index 72ee8914ca5e..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/delete_worker_pool.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $workerPoolsClient->deleteWorkerPool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var WorkerPool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WorkerPoolsClient::workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); - - delete_worker_pool_sample($formattedName); -} -// [END run_v2_generated_WorkerPools_DeleteWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php deleted file mode 100644 index 9651fb15b340..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $workerPoolsClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END run_v2_generated_WorkerPools_GetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php deleted file mode 100644 index f2656ef4af55..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/get_worker_pool.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var WorkerPool $response */ - $response = $workerPoolsClient->getWorkerPool($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WorkerPoolsClient::workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); - - get_worker_pool_sample($formattedName); -} -// [END run_v2_generated_WorkerPools_GetWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php deleted file mode 100644 index d5c7f141cca0..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/list_worker_pools.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $workerPoolsClient->listWorkerPools($request); - - /** @var WorkerPool $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WorkerPoolsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_worker_pools_sample($formattedParent); -} -// [END run_v2_generated_WorkerPools_ListWorkerPools_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php deleted file mode 100644 index 2f6daa1ad122..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/set_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $workerPoolsClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END run_v2_generated_WorkerPools_SetIamPolicy_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php deleted file mode 100644 index 209ea6f45ac6..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $workerPoolsClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END run_v2_generated_WorkerPools_TestIamPermissions_sync] diff --git a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php b/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php deleted file mode 100644 index 9b56fe6c0ad2..000000000000 --- a/owl-bot-staging/Run/v2/samples/V2/WorkerPoolsClient/update_worker_pool.php +++ /dev/null @@ -1,74 +0,0 @@ -setTemplate($workerPoolTemplate); - $request = (new UpdateWorkerPoolRequest()) - ->setWorkerPool($workerPool); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $workerPoolsClient->updateWorkerPool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var WorkerPool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END run_v2_generated_WorkerPools_UpdateWorkerPool_sync] diff --git a/owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php deleted file mode 100644 index e32b64c37ee5..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/Client/BuildsClient.php +++ /dev/null @@ -1,255 +0,0 @@ - submitBuildAsync(SubmitBuildRequest $request, array $optionalArgs = []) - */ -final class BuildsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.run.v2.Builds'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'run.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/builds_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/builds_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/builds_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/builds_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * build_worker_pool resource. - * - * @param string $project - * @param string $location - * @param string $workerPool - * - * @return string The formatted build_worker_pool resource. - */ - public static function buildWorkerPoolName(string $project, string $location, string $workerPool): string - { - return self::getPathTemplate('buildWorkerPool')->render([ - 'project' => $project, - 'location' => $location, - 'worker_pool' => $workerPool, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - buildWorkerPool: projects/{project}/locations/{location}/workerPools/{worker_pool} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'run.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Run\V2\BuildsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new BuildsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Submits a build in a given project. - * - * The async variant is {@see BuildsClient::submitBuildAsync()} . - * - * @example samples/V2/BuildsClient/submit_build.php - * - * @param SubmitBuildRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SubmitBuildResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function submitBuild(SubmitBuildRequest $request, array $callOptions = []): SubmitBuildResponse - { - return $this->startApiCall('SubmitBuild', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php deleted file mode 100644 index ce2e385d7ae1..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/Client/ExecutionsClient.php +++ /dev/null @@ -1,417 +0,0 @@ - cancelExecutionAsync(CancelExecutionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExecutionAsync(DeleteExecutionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExecutionAsync(GetExecutionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExecutionsAsync(ListExecutionsRequest $request, array $optionalArgs = []) - */ -final class ExecutionsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.run.v2.Executions'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'run.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/executions_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/executions_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/executions_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/executions_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a execution - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $execution - * - * @return string The formatted execution resource. - */ - public static function executionName(string $project, string $location, string $job, string $execution): string - { - return self::getPathTemplate('execution')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'execution' => $execution, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $location, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - execution: projects/{project}/locations/{location}/jobs/{job}/executions/{execution} - * - job: projects/{project}/locations/{location}/jobs/{job} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'run.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Run\V2\ExecutionsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ExecutionsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Cancels an Execution. - * - * The async variant is {@see ExecutionsClient::cancelExecutionAsync()} . - * - * @example samples/V2/ExecutionsClient/cancel_execution.php - * - * @param CancelExecutionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelExecution(CancelExecutionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CancelExecution', $request, $callOptions)->wait(); - } - - /** - * Deletes an Execution. - * - * The async variant is {@see ExecutionsClient::deleteExecutionAsync()} . - * - * @example samples/V2/ExecutionsClient/delete_execution.php - * - * @param DeleteExecutionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteExecution(DeleteExecutionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteExecution', $request, $callOptions)->wait(); - } - - /** - * Gets information about an Execution. - * - * The async variant is {@see ExecutionsClient::getExecutionAsync()} . - * - * @example samples/V2/ExecutionsClient/get_execution.php - * - * @param GetExecutionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Execution - * - * @throws ApiException Thrown if the API call fails. - */ - public function getExecution(GetExecutionRequest $request, array $callOptions = []): Execution - { - return $this->startApiCall('GetExecution', $request, $callOptions)->wait(); - } - - /** - * Lists Executions from a Job. Results are sorted by creation time, - * descending. - * - * The async variant is {@see ExecutionsClient::listExecutionsAsync()} . - * - * @example samples/V2/ExecutionsClient/list_executions.php - * - * @param ListExecutionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listExecutions(ListExecutionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExecutions', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php deleted file mode 100644 index c5b18a3a074e..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/Client/JobsClient.php +++ /dev/null @@ -1,709 +0,0 @@ - createJobAsync(CreateJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface runJobAsync(RunJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateJobAsync(UpdateJobRequest $request, array $optionalArgs = []) - */ -final class JobsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.run.v2.Jobs'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'run.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/jobs_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/jobs_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/jobs_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/jobs_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a connector - * resource. - * - * @param string $project - * @param string $location - * @param string $connector - * - * @return string The formatted connector resource. - */ - public static function connectorName(string $project, string $location, string $connector): string - { - return self::getPathTemplate('connector')->render([ - 'project' => $project, - 'location' => $location, - 'connector' => $connector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a execution - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $execution - * - * @return string The formatted execution resource. - */ - public static function executionName(string $project, string $location, string $job, string $execution): string - { - return self::getPathTemplate('execution')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'execution' => $execution, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $location, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * location_policy resource. - * - * @param string $location - * - * @return string The formatted location_policy resource. - */ - public static function locationPolicyName(string $location): string - { - return self::getPathTemplate('locationPolicy')->render([ - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy - * resource. - * - * @param string $project - * - * @return string The formatted policy resource. - */ - public static function policyName(string $project): string - { - return self::getPathTemplate('policy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_policy resource. - * - * @param string $project - * - * @return string The formatted project_policy resource. - */ - public static function projectPolicyName(string $project): string - { - return self::getPathTemplate('projectPolicy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a secret - * resource. - * - * @param string $project - * @param string $secret - * - * @return string The formatted secret resource. - */ - public static function secretName(string $project, string $secret): string - { - return self::getPathTemplate('secret')->render([ - 'project' => $project, - 'secret' => $secret, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connector: projects/{project}/locations/{location}/connectors/{connector} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - execution: projects/{project}/locations/{location}/jobs/{job}/executions/{execution} - * - job: projects/{project}/locations/{location}/jobs/{job} - * - location: projects/{project}/locations/{location} - * - locationPolicy: locations/{location}/policy - * - policy: projects/{project}/policy - * - projectPolicy: projects/{project}/policy - * - secret: projects/{project}/secrets/{secret} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'run.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Run\V2\JobsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new JobsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a Job. - * - * The async variant is {@see JobsClient::createJobAsync()} . - * - * @example samples/V2/JobsClient/create_job.php - * - * @param CreateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createJob(CreateJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); - } - - /** - * Deletes a Job. - * - * The async variant is {@see JobsClient::deleteJobAsync()} . - * - * @example samples/V2/JobsClient/delete_job.php - * - * @param DeleteJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteJob(DeleteJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM Access Control policy currently in effect for the given Job. - * This result does not include any inherited policies. - * - * The async variant is {@see JobsClient::getIamPolicyAsync()} . - * - * @example samples/V2/JobsClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets information about a Job. - * - * The async variant is {@see JobsClient::getJobAsync()} . - * - * @example samples/V2/JobsClient/get_job.php - * - * @param GetJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJob(GetJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('GetJob', $request, $callOptions)->wait(); - } - - /** - * Lists Jobs. Results are sorted by creation time, descending. - * - * The async variant is {@see JobsClient::listJobsAsync()} . - * - * @example samples/V2/JobsClient/list_jobs.php - * - * @param ListJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobs', $request, $callOptions); - } - - /** - * Triggers creation of a new Execution of this Job. - * - * The async variant is {@see JobsClient::runJobAsync()} . - * - * @example samples/V2/JobsClient/run_job.php - * - * @param RunJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runJob(RunJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunJob', $request, $callOptions)->wait(); - } - - /** - * Sets the IAM Access control policy for the specified Job. Overwrites - * any existing policy. - * - * The async variant is {@see JobsClient::setIamPolicyAsync()} . - * - * @example samples/V2/JobsClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified Project. - * - * There are no permissions required for making this API call. - * - * The async variant is {@see JobsClient::testIamPermissionsAsync()} . - * - * @example samples/V2/JobsClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates a Job. - * - * The async variant is {@see JobsClient::updateJobAsync()} . - * - * @example samples/V2/JobsClient/update_job.php - * - * @param UpdateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateJob(UpdateJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateJob', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php deleted file mode 100644 index 1a6b36dff92c..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/Client/RevisionsClient.php +++ /dev/null @@ -1,389 +0,0 @@ - deleteRevisionAsync(DeleteRevisionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRevisionAsync(GetRevisionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRevisionsAsync(ListRevisionsRequest $request, array $optionalArgs = []) - */ -final class RevisionsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.run.v2.Revisions'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'run.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/revisions_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/revisions_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/revisions_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/revisions_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a revision - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * @param string $revision - * - * @return string The formatted revision resource. - */ - public static function revisionName(string $project, string $location, string $service, string $revision): string - { - return self::getPathTemplate('revision')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - 'revision' => $revision, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - revision: projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - service: projects/{project}/locations/{location}/services/{service} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'run.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Run\V2\RevisionsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new RevisionsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Deletes a Revision. - * - * The async variant is {@see RevisionsClient::deleteRevisionAsync()} . - * - * @example samples/V2/RevisionsClient/delete_revision.php - * - * @param DeleteRevisionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteRevision(DeleteRevisionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteRevision', $request, $callOptions)->wait(); - } - - /** - * Gets information about a Revision. - * - * The async variant is {@see RevisionsClient::getRevisionAsync()} . - * - * @example samples/V2/RevisionsClient/get_revision.php - * - * @param GetRevisionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Revision - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRevision(GetRevisionRequest $request, array $callOptions = []): Revision - { - return $this->startApiCall('GetRevision', $request, $callOptions)->wait(); - } - - /** - * Lists Revisions from a given Service, or from a given location. Results - * are sorted by creation time, descending. - * - * The async variant is {@see RevisionsClient::listRevisionsAsync()} . - * - * @example samples/V2/RevisionsClient/list_revisions.php - * - * @param ListRevisionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRevisions(ListRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRevisions', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php b/owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php deleted file mode 100644 index 90725720735b..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/Client/ServicesClient.php +++ /dev/null @@ -1,742 +0,0 @@ - createServiceAsync(CreateServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteServiceAsync(DeleteServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getServiceAsync(GetServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateServiceAsync(UpdateServiceRequest $request, array $optionalArgs = []) - */ -final class ServicesClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.run.v2.Services'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'run.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/services_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/services_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/services_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/services_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a build - * resource. - * - * @param string $project - * @param string $location - * @param string $build - * - * @return string The formatted build resource. - */ - public static function buildName(string $project, string $location, string $build): string - { - return self::getPathTemplate('build')->render([ - 'project' => $project, - 'location' => $location, - 'build' => $build, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * build_worker_pool resource. - * - * @param string $project - * @param string $location - * @param string $workerPool - * - * @return string The formatted build_worker_pool resource. - */ - public static function buildWorkerPoolName(string $project, string $location, string $workerPool): string - { - return self::getPathTemplate('buildWorkerPool')->render([ - 'project' => $project, - 'location' => $location, - 'worker_pool' => $workerPool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a connector - * resource. - * - * @param string $project - * @param string $location - * @param string $connector - * - * @return string The formatted connector resource. - */ - public static function connectorName(string $project, string $location, string $connector): string - { - return self::getPathTemplate('connector')->render([ - 'project' => $project, - 'location' => $location, - 'connector' => $connector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * location_policy resource. - * - * @param string $location - * - * @return string The formatted location_policy resource. - */ - public static function locationPolicyName(string $location): string - { - return self::getPathTemplate('locationPolicy')->render([ - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a mesh - * resource. - * - * @param string $project - * @param string $location - * @param string $mesh - * - * @return string The formatted mesh resource. - */ - public static function meshName(string $project, string $location, string $mesh): string - { - return self::getPathTemplate('mesh')->render([ - 'project' => $project, - 'location' => $location, - 'mesh' => $mesh, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy - * resource. - * - * @param string $project - * - * @return string The formatted policy resource. - */ - public static function policyName(string $project): string - { - return self::getPathTemplate('policy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_policy resource. - * - * @param string $project - * - * @return string The formatted project_policy resource. - */ - public static function projectPolicyName(string $project): string - { - return self::getPathTemplate('projectPolicy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a revision - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * @param string $revision - * - * @return string The formatted revision resource. - */ - public static function revisionName(string $project, string $location, string $service, string $revision): string - { - return self::getPathTemplate('revision')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - 'revision' => $revision, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a secret - * resource. - * - * @param string $project - * @param string $secret - * - * @return string The formatted secret resource. - */ - public static function secretName(string $project, string $secret): string - { - return self::getPathTemplate('secret')->render([ - 'project' => $project, - 'secret' => $secret, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - build: projects/{project}/locations/{location}/builds/{build} - * - buildWorkerPool: projects/{project}/locations/{location}/workerPools/{worker_pool} - * - connector: projects/{project}/locations/{location}/connectors/{connector} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - location: projects/{project}/locations/{location} - * - locationPolicy: locations/{location}/policy - * - mesh: projects/{project}/locations/{location}/meshes/{mesh} - * - policy: projects/{project}/policy - * - projectPolicy: projects/{project}/policy - * - revision: projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - secret: projects/{project}/secrets/{secret} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - service: projects/{project}/locations/{location}/services/{service} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'run.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Run\V2\ServicesClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ServicesClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Service in a given project and location. - * - * The async variant is {@see ServicesClient::createServiceAsync()} . - * - * @example samples/V2/ServicesClient/create_service.php - * - * @param CreateServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createService(CreateServiceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateService', $request, $callOptions)->wait(); - } - - /** - * Deletes a Service. - * This will cause the Service to stop serving traffic and will delete all - * revisions. - * - * The async variant is {@see ServicesClient::deleteServiceAsync()} . - * - * @example samples/V2/ServicesClient/delete_service.php - * - * @param DeleteServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteService(DeleteServiceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteService', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM Access Control policy currently in effect for the given - * Cloud Run Service. This result does not include any inherited policies. - * - * The async variant is {@see ServicesClient::getIamPolicyAsync()} . - * - * @example samples/V2/ServicesClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets information about a Service. - * - * The async variant is {@see ServicesClient::getServiceAsync()} . - * - * @example samples/V2/ServicesClient/get_service.php - * - * @param GetServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Service - * - * @throws ApiException Thrown if the API call fails. - */ - public function getService(GetServiceRequest $request, array $callOptions = []): Service - { - return $this->startApiCall('GetService', $request, $callOptions)->wait(); - } - - /** - * Lists Services. Results are sorted by creation time, descending. - * - * The async variant is {@see ServicesClient::listServicesAsync()} . - * - * @example samples/V2/ServicesClient/list_services.php - * - * @param ListServicesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listServices(ListServicesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServices', $request, $callOptions); - } - - /** - * Sets the IAM Access control policy for the specified Service. Overwrites - * any existing policy. - * - * The async variant is {@see ServicesClient::setIamPolicyAsync()} . - * - * @example samples/V2/ServicesClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified Project. - * - * There are no permissions required for making this API call. - * - * The async variant is {@see ServicesClient::testIamPermissionsAsync()} . - * - * @example samples/V2/ServicesClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates a Service. - * - * The async variant is {@see ServicesClient::updateServiceAsync()} . - * - * @example samples/V2/ServicesClient/update_service.php - * - * @param UpdateServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateService(UpdateServiceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateService', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php b/owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php deleted file mode 100644 index f57b57c3dabb..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/Client/TasksClient.php +++ /dev/null @@ -1,310 +0,0 @@ - getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) - */ -final class TasksClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.run.v2.Tasks'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'run.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/tasks_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/tasks_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/tasks_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/tasks_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a execution - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $execution - * - * @return string The formatted execution resource. - */ - public static function executionName(string $project, string $location, string $job, string $execution): string - { - return self::getPathTemplate('execution')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'execution' => $execution, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $execution - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName(string $project, string $location, string $job, string $execution, string $task): string - { - return self::getPathTemplate('task')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'execution' => $execution, - 'task' => $task, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - execution: projects/{project}/locations/{location}/jobs/{job}/executions/{execution} - * - task: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'run.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Run\V2\TasksClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new TasksClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Gets information about a Task. - * - * The async variant is {@see TasksClient::getTaskAsync()} . - * - * @example samples/V2/TasksClient/get_task.php - * - * @param GetTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTask(GetTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('GetTask', $request, $callOptions)->wait(); - } - - /** - * Lists Tasks from an Execution of a Job. - * - * The async variant is {@see TasksClient::listTasksAsync()} . - * - * @example samples/V2/TasksClient/list_tasks.php - * - * @param ListTasksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTasks', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php b/owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php deleted file mode 100644 index afd5c3342f22..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/Client/WorkerPoolsClient.php +++ /dev/null @@ -1,700 +0,0 @@ - createWorkerPoolAsync(CreateWorkerPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteWorkerPoolAsync(DeleteWorkerPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getWorkerPoolAsync(GetWorkerPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface listWorkerPoolsAsync(ListWorkerPoolsRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateWorkerPoolAsync(UpdateWorkerPoolRequest $request, array $optionalArgs = []) - */ -final class WorkerPoolsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.run.v2.WorkerPools'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'run.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'run.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/worker_pools_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/worker_pools_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/worker_pools_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/worker_pools_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a connector - * resource. - * - * @param string $project - * @param string $location - * @param string $connector - * - * @return string The formatted connector resource. - */ - public static function connectorName(string $project, string $location, string $connector): string - { - return self::getPathTemplate('connector')->render([ - 'project' => $project, - 'location' => $location, - 'connector' => $connector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * location_policy resource. - * - * @param string $location - * - * @return string The formatted location_policy resource. - */ - public static function locationPolicyName(string $location): string - { - return self::getPathTemplate('locationPolicy')->render([ - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a mesh - * resource. - * - * @param string $project - * @param string $location - * @param string $mesh - * - * @return string The formatted mesh resource. - */ - public static function meshName(string $project, string $location, string $mesh): string - { - return self::getPathTemplate('mesh')->render([ - 'project' => $project, - 'location' => $location, - 'mesh' => $mesh, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy - * resource. - * - * @param string $project - * - * @return string The formatted policy resource. - */ - public static function policyName(string $project): string - { - return self::getPathTemplate('policy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_policy resource. - * - * @param string $project - * - * @return string The formatted project_policy resource. - */ - public static function projectPolicyName(string $project): string - { - return self::getPathTemplate('projectPolicy')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a revision - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * @param string $revision - * - * @return string The formatted revision resource. - */ - public static function revisionName(string $project, string $location, string $service, string $revision): string - { - return self::getPathTemplate('revision')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - 'revision' => $revision, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a secret - * resource. - * - * @param string $project - * @param string $secret - * - * @return string The formatted secret resource. - */ - public static function secretName(string $project, string $secret): string - { - return self::getPathTemplate('secret')->render([ - 'project' => $project, - 'secret' => $secret, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a worker_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $workerPool - * - * @return string The formatted worker_pool resource. - */ - public static function workerPoolName(string $project, string $location, string $workerPool): string - { - return self::getPathTemplate('workerPool')->render([ - 'project' => $project, - 'location' => $location, - 'worker_pool' => $workerPool, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connector: projects/{project}/locations/{location}/connectors/{connector} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - location: projects/{project}/locations/{location} - * - locationPolicy: locations/{location}/policy - * - mesh: projects/{project}/locations/{location}/meshes/{mesh} - * - policy: projects/{project}/policy - * - projectPolicy: projects/{project}/policy - * - revision: projects/{project}/locations/{location}/services/{service}/revisions/{revision} - * - secret: projects/{project}/secrets/{secret} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - workerPool: projects/{project}/locations/{location}/workerPools/{worker_pool} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'run.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Run\V2\WorkerPoolsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new WorkerPoolsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new WorkerPool in a given project and location. - * - * The async variant is {@see WorkerPoolsClient::createWorkerPoolAsync()} . - * - * @example samples/V2/WorkerPoolsClient/create_worker_pool.php - * - * @param CreateWorkerPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createWorkerPool(CreateWorkerPoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateWorkerPool', $request, $callOptions)->wait(); - } - - /** - * Deletes a WorkerPool. - * - * The async variant is {@see WorkerPoolsClient::deleteWorkerPoolAsync()} . - * - * @example samples/V2/WorkerPoolsClient/delete_worker_pool.php - * - * @param DeleteWorkerPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteWorkerPool(DeleteWorkerPoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteWorkerPool', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM Access Control policy currently in effect for the given - * Cloud Run WorkerPool. This result does not include any inherited policies. - * - * The async variant is {@see WorkerPoolsClient::getIamPolicyAsync()} . - * - * @example samples/V2/WorkerPoolsClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets information about a WorkerPool. - * - * The async variant is {@see WorkerPoolsClient::getWorkerPoolAsync()} . - * - * @example samples/V2/WorkerPoolsClient/get_worker_pool.php - * - * @param GetWorkerPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WorkerPool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getWorkerPool(GetWorkerPoolRequest $request, array $callOptions = []): WorkerPool - { - return $this->startApiCall('GetWorkerPool', $request, $callOptions)->wait(); - } - - /** - * Lists WorkerPools. Results are sorted by creation time, descending. - * - * The async variant is {@see WorkerPoolsClient::listWorkerPoolsAsync()} . - * - * @example samples/V2/WorkerPoolsClient/list_worker_pools.php - * - * @param ListWorkerPoolsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listWorkerPools(ListWorkerPoolsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListWorkerPools', $request, $callOptions); - } - - /** - * Sets the IAM Access control policy for the specified WorkerPool. Overwrites - * any existing policy. - * - * The async variant is {@see WorkerPoolsClient::setIamPolicyAsync()} . - * - * @example samples/V2/WorkerPoolsClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified Project. - * - * There are no permissions required for making this API call. - * - * The async variant is {@see WorkerPoolsClient::testIamPermissionsAsync()} . - * - * @example samples/V2/WorkerPoolsClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates a WorkerPool. - * - * The async variant is {@see WorkerPoolsClient::updateWorkerPoolAsync()} . - * - * @example samples/V2/WorkerPoolsClient/update_worker_pool.php - * - * @param UpdateWorkerPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateWorkerPool(UpdateWorkerPoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateWorkerPool', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Run/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 68d37bcf5427..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,286 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.run.v2", - "libraryPackage": "Google\\Cloud\\Run\\V2", - "services": { - "Builds": { - "clients": { - "grpc": { - "libraryClient": "BuildsGapicClient", - "rpcs": { - "SubmitBuild": { - "methods": [ - "submitBuild" - ] - } - } - } - } - }, - "Executions": { - "clients": { - "grpc": { - "libraryClient": "ExecutionsGapicClient", - "rpcs": { - "CancelExecution": { - "methods": [ - "cancelExecution" - ] - }, - "DeleteExecution": { - "methods": [ - "deleteExecution" - ] - }, - "GetExecution": { - "methods": [ - "getExecution" - ] - }, - "ListExecutions": { - "methods": [ - "listExecutions" - ] - } - } - } - } - }, - "Instances": { - "clients": { - "grpc": { - "libraryClient": "InstancesGapicClient", - "rpcs": { - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "StartInstance": { - "methods": [ - "startInstance" - ] - }, - "StopInstance": { - "methods": [ - "stopInstance" - ] - } - } - } - } - }, - "Jobs": { - "clients": { - "grpc": { - "libraryClient": "JobsGapicClient", - "rpcs": { - "CreateJob": { - "methods": [ - "createJob" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "ListJobs": { - "methods": [ - "listJobs" - ] - }, - "RunJob": { - "methods": [ - "runJob" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateJob": { - "methods": [ - "updateJob" - ] - } - } - } - } - }, - "Revisions": { - "clients": { - "grpc": { - "libraryClient": "RevisionsGapicClient", - "rpcs": { - "DeleteRevision": { - "methods": [ - "deleteRevision" - ] - }, - "GetRevision": { - "methods": [ - "getRevision" - ] - }, - "ListRevisions": { - "methods": [ - "listRevisions" - ] - } - } - } - } - }, - "Services": { - "clients": { - "grpc": { - "libraryClient": "ServicesGapicClient", - "rpcs": { - "CreateService": { - "methods": [ - "createService" - ] - }, - "DeleteService": { - "methods": [ - "deleteService" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetService": { - "methods": [ - "getService" - ] - }, - "ListServices": { - "methods": [ - "listServices" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateService": { - "methods": [ - "updateService" - ] - } - } - } - } - }, - "Tasks": { - "clients": { - "grpc": { - "libraryClient": "TasksGapicClient", - "rpcs": { - "GetTask": { - "methods": [ - "getTask" - ] - }, - "ListTasks": { - "methods": [ - "listTasks" - ] - } - } - } - } - }, - "WorkerPools": { - "clients": { - "grpc": { - "libraryClient": "WorkerPoolsGapicClient", - "rpcs": { - "CreateWorkerPool": { - "methods": [ - "createWorkerPool" - ] - }, - "DeleteWorkerPool": { - "methods": [ - "deleteWorkerPool" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetWorkerPool": { - "methods": [ - "getWorkerPool" - ] - }, - "ListWorkerPools": { - "methods": [ - "listWorkerPools" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateWorkerPool": { - "methods": [ - "updateWorkerPool" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json deleted file mode 100644 index b09e6e721847..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/builds_client_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "interfaces": { - "google.cloud.run.v2.Builds": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "SubmitBuild": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php deleted file mode 100644 index ae74d1adac52..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/builds_descriptor_config.php +++ /dev/null @@ -1,43 +0,0 @@ - [ - 'google.cloud.run.v2.Builds' => [ - 'SubmitBuild' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Run\V2\SubmitBuildResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'buildWorkerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php deleted file mode 100644 index 9fc42fbf0285..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/builds_rest_client_config.php +++ /dev/null @@ -1,88 +0,0 @@ - [ - 'google.cloud.run.v2.Builds' => [ - 'SubmitBuild' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/builds:submit', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json deleted file mode 100644 index 2ca1a996052f..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/executions_client_config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "interfaces": { - "google.cloud.run.v2.Executions": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "CancelExecution": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteExecution": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetExecution": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListExecutions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php deleted file mode 100644 index 1258cfd84152..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/executions_descriptor_config.php +++ /dev/null @@ -1,102 +0,0 @@ - [ - 'google.cloud.run.v2.Executions' => [ - 'CancelExecution' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Execution', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Execution', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExecution' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Execution', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Execution', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetExecution' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Run\V2\Execution', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListExecutions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExecutions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Run\V2\ListExecutionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'execution' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}', - 'job' => 'projects/{project}/locations/{location}/jobs/{job}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php deleted file mode 100644 index 66147cb56cb6..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/executions_rest_client_config.php +++ /dev/null @@ -1,121 +0,0 @@ - [ - 'google.cloud.run.v2.Executions' => [ - 'CancelExecution' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExecution' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetExecution' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListExecutions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/jobs/*}/executions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json deleted file mode 100644 index c5f5321be6c1..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/jobs_client_config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "interfaces": { - "google.cloud.run.v2.Jobs": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "CreateJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RunJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php deleted file mode 100644 index fd3107ba7991..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/jobs_descriptor_config.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'google.cloud.run.v2.Jobs' => [ - 'CreateJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Job', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Job', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [], - ], - ], - ], - 'DeleteJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Job', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Job', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'RunJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Execution', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Execution', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'UpdateJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Job', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Job', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getJob', - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Run\V2\Job', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Run\V2\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'templateMap' => [ - 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'execution' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}', - 'job' => 'projects/{project}/locations/{location}/jobs/{job}', - 'location' => 'projects/{project}/locations/{location}', - 'locationPolicy' => 'locations/{location}/policy', - 'policy' => 'projects/{project}/policy', - 'projectPolicy' => 'projects/{project}/policy', - 'secret' => 'projects/{project}/secrets/{secret}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php deleted file mode 100644 index ec614b248227..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/jobs_rest_client_config.php +++ /dev/null @@ -1,184 +0,0 @@ - [ - 'google.cloud.run.v2.Jobs' => [ - 'CreateJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/jobs', - 'body' => 'job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'job_id', - ], - ], - 'DeleteJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/jobs/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/jobs/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/jobs/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateJob' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{job.name=projects/*/locations/*/jobs/*}', - 'body' => 'job', - 'placeholders' => [ - 'job.name' => [ - 'getters' => [ - 'getJob', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json deleted file mode 100644 index ba39cada8bc5..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/revisions_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.cloud.run.v2.Revisions": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "DeleteRevision": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetRevision": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php deleted file mode 100644 index be4f93d8c387..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/revisions_descriptor_config.php +++ /dev/null @@ -1,86 +0,0 @@ - [ - 'google.cloud.run.v2.Revisions' => [ - 'DeleteRevision' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Revision', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Revision', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'GetRevision' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Run\V2\Revision', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'ListRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRevisions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Run\V2\ListRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [], - ], - ], - ], - 'templateMap' => [ - 'revision' => 'projects/{project}/locations/{location}/services/{service}/revisions/{revision}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php deleted file mode 100644 index 851593567e0e..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/revisions_rest_client_config.php +++ /dev/null @@ -1,127 +0,0 @@ - [ - 'google.cloud.run.v2.Revisions' => [ - 'DeleteRevision' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*/revisions/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*/revisions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRevision' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*/revisions/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*/revisions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/services/*}/revisions', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/workerPools/*}/revisions', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json deleted file mode 100644 index 53e3bc1d5fa5..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/services_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.run.v2.Services": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 15000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 15000, - "total_timeout_millis": 15000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - } - }, - "methods": { - "CreateService": { - "timeout_millis": 15000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteService": { - "timeout_millis": 10000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetService": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListServices": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateService": { - "timeout_millis": 15000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php deleted file mode 100644 index ce32f880046c..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/services_descriptor_config.php +++ /dev/null @@ -1,174 +0,0 @@ - [ - 'google.cloud.run.v2.Services' => [ - 'CreateService' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Service', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Service', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [], - ], - ], - ], - 'DeleteService' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Service', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Service', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'UpdateService' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\Service', - 'metadataReturnType' => '\Google\Cloud\Run\V2\Service', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getService', - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Run\V2\Service', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'ListServices' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServices', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Run\V2\ListServicesResponse', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'templateMap' => [ - 'build' => 'projects/{project}/locations/{location}/builds/{build}', - 'buildWorkerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', - 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'location' => 'projects/{project}/locations/{location}', - 'locationPolicy' => 'locations/{location}/policy', - 'mesh' => 'projects/{project}/locations/{location}/meshes/{mesh}', - 'policy' => 'projects/{project}/policy', - 'projectPolicy' => 'projects/{project}/policy', - 'revision' => 'projects/{project}/locations/{location}/services/{service}/revisions/{revision}', - 'secret' => 'projects/{project}/secrets/{secret}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php deleted file mode 100644 index 6b244e981c12..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/services_rest_client_config.php +++ /dev/null @@ -1,172 +0,0 @@ - [ - 'google.cloud.run.v2.Services' => [ - 'CreateService' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/services', - 'body' => 'service', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'service_id', - ], - ], - 'DeleteService' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/services/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetService' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/services/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListServices' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/services', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/services/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/services/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateService' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{service.name=projects/*/locations/*/services/*}', - 'body' => 'service', - 'placeholders' => [ - 'service.name' => [ - 'getters' => [ - 'getService', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json deleted file mode 100644 index 60a75305960e..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/tasks_client_config.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "interfaces": { - "google.cloud.run.v2.Tasks": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "GetTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListTasks": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php deleted file mode 100644 index 9bc52e3f428b..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/tasks_descriptor_config.php +++ /dev/null @@ -1,64 +0,0 @@ - [ - 'google.cloud.run.v2.Tasks' => [ - 'GetTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Run\V2\Task', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Run\V2\ListTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'execution' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}', - 'task' => 'projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php deleted file mode 100644 index 594f6b965b47..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/tasks_rest_client_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.cloud.run.v2.Tasks' => [ - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/jobs/*/executions/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/jobs/*/executions/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json deleted file mode 100644 index 4fa3730c30dc..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_client_config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "interfaces": { - "google.cloud.run.v2.WorkerPools": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "CreateWorkerPool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteWorkerPool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetWorkerPool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListWorkerPools": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateWorkerPool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php deleted file mode 100644 index 641879748aa2..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_descriptor_config.php +++ /dev/null @@ -1,172 +0,0 @@ - [ - 'google.cloud.run.v2.WorkerPools' => [ - 'CreateWorkerPool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\WorkerPool', - 'metadataReturnType' => '\Google\Cloud\Run\V2\WorkerPool', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [], - ], - ], - ], - 'DeleteWorkerPool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\WorkerPool', - 'metadataReturnType' => '\Google\Cloud\Run\V2\WorkerPool', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'UpdateWorkerPool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Run\V2\WorkerPool', - 'metadataReturnType' => '\Google\Cloud\Run\V2\WorkerPool', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getWorkerPool', - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetWorkerPool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Run\V2\WorkerPool', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [], - ], - ], - ], - 'ListWorkerPools' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getWorkerPools', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Run\V2\ListWorkerPoolsResponse', - 'headerParams' => [ - [ - 'keyName' => 'location', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'templateMap' => [ - 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'location' => 'projects/{project}/locations/{location}', - 'locationPolicy' => 'locations/{location}/policy', - 'mesh' => 'projects/{project}/locations/{location}/meshes/{mesh}', - 'policy' => 'projects/{project}/policy', - 'projectPolicy' => 'projects/{project}/policy', - 'revision' => 'projects/{project}/locations/{location}/services/{service}/revisions/{revision}', - 'secret' => 'projects/{project}/secrets/{secret}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - 'workerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php b/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php deleted file mode 100644 index dc048632620e..000000000000 --- a/owl-bot-staging/Run/v2/src/V2/resources/worker_pools_rest_client_config.php +++ /dev/null @@ -1,172 +0,0 @@ - [ - 'google.cloud.run.v2.WorkerPools' => [ - 'CreateWorkerPool' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workerPools', - 'body' => 'worker_pool', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'worker_pool_id', - ], - ], - 'DeleteWorkerPool' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/workerPools/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetWorkerPool' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/workerPools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListWorkerPools' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/workerPools', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/workerPools/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/workerPools/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateWorkerPool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{worker_pool.name=projects/*/locations/*/workerPools/*}', - 'body' => 'worker_pool', - 'placeholders' => [ - 'worker_pool.name' => [ - 'getters' => [ - 'getWorkerPool', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php deleted file mode 100644 index a9c1182cfe03..000000000000 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/BuildsClientTest.php +++ /dev/null @@ -1,192 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BuildsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BuildsClient($options); - } - - /** @test */ - public function submitBuildTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $baseImageUri = 'baseImageUri2088954010'; - $baseImageWarning = 'baseImageWarning-2033873974'; - $expectedResponse = new SubmitBuildResponse(); - $expectedResponse->setBaseImageUri($baseImageUri); - $expectedResponse->setBaseImageWarning($baseImageWarning); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $storageSource = new StorageSource(); - $storageSourceBucket = 'storageSourceBucket608605184'; - $storageSource->setBucket($storageSourceBucket); - $storageSourceObject = 'storageSourceObject963439957'; - $storageSource->setObject($storageSourceObject); - $imageUri = 'imageUri-877823864'; - $request = (new SubmitBuildRequest()) - ->setParent($parent) - ->setStorageSource($storageSource) - ->setImageUri($imageUri); - $response = $gapicClient->submitBuild($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Builds/SubmitBuild', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getStorageSource(); - $this->assertProtobufEquals($storageSource, $actualValue); - $actualValue = $actualRequestObject->getImageUri(); - $this->assertProtobufEquals($imageUri, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitBuildExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $storageSource = new StorageSource(); - $storageSourceBucket = 'storageSourceBucket608605184'; - $storageSource->setBucket($storageSourceBucket); - $storageSourceObject = 'storageSourceObject963439957'; - $storageSource->setObject($storageSourceObject); - $imageUri = 'imageUri-877823864'; - $request = (new SubmitBuildRequest()) - ->setParent($parent) - ->setStorageSource($storageSource) - ->setImageUri($imageUri); - try { - $gapicClient->submitBuild($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitBuildAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $baseImageUri = 'baseImageUri2088954010'; - $baseImageWarning = 'baseImageWarning-2033873974'; - $expectedResponse = new SubmitBuildResponse(); - $expectedResponse->setBaseImageUri($baseImageUri); - $expectedResponse->setBaseImageWarning($baseImageWarning); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $storageSource = new StorageSource(); - $storageSourceBucket = 'storageSourceBucket608605184'; - $storageSource->setBucket($storageSourceBucket); - $storageSourceObject = 'storageSourceObject963439957'; - $storageSource->setObject($storageSourceObject); - $imageUri = 'imageUri-877823864'; - $request = (new SubmitBuildRequest()) - ->setParent($parent) - ->setStorageSource($storageSource) - ->setImageUri($imageUri); - $response = $gapicClient->submitBuildAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Builds/SubmitBuild', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getStorageSource(); - $this->assertProtobufEquals($storageSource, $actualValue); - $actualValue = $actualRequestObject->getImageUri(); - $this->assertProtobufEquals($imageUri, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php deleted file mode 100644 index 3bf58ca9aa6b..000000000000 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ExecutionsClientTest.php +++ /dev/null @@ -1,646 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ExecutionsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ExecutionsClient($options); - } - - /** @test */ - public function cancelExecutionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $creator = 'creator1028554796'; - $generation = 305703192; - $job = 'job105405'; - $parallelism = 635164956; - $taskCount = 1297805781; - $reconciling = false; - $observedGeneration = 900833007; - $runningCount = 261439119; - $succeededCount = 633694641; - $failedCount = 2013829491; - $cancelledCount = 1921113249; - $retriedCount = 1654679545; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setCreator($creator); - $expectedResponse->setGeneration($generation); - $expectedResponse->setJob($job); - $expectedResponse->setParallelism($parallelism); - $expectedResponse->setTaskCount($taskCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setRunningCount($runningCount); - $expectedResponse->setSucceededCount($succeededCount); - $expectedResponse->setFailedCount($failedCount); - $expectedResponse->setCancelledCount($cancelledCount); - $expectedResponse->setRetriedCount($retriedCount); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelExecutionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new CancelExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Executions/CancelExecution', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelExecutionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelExecutionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new CancelExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelExecutionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteExecutionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $creator = 'creator1028554796'; - $generation = 305703192; - $job = 'job105405'; - $parallelism = 635164956; - $taskCount = 1297805781; - $reconciling = false; - $observedGeneration = 900833007; - $runningCount = 261439119; - $succeededCount = 633694641; - $failedCount = 2013829491; - $cancelledCount = 1921113249; - $retriedCount = 1654679545; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setCreator($creator); - $expectedResponse->setGeneration($generation); - $expectedResponse->setJob($job); - $expectedResponse->setParallelism($parallelism); - $expectedResponse->setTaskCount($taskCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setRunningCount($runningCount); - $expectedResponse->setSucceededCount($succeededCount); - $expectedResponse->setFailedCount($failedCount); - $expectedResponse->setCancelledCount($cancelledCount); - $expectedResponse->setRetriedCount($retriedCount); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteExecutionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new DeleteExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Executions/DeleteExecution', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteExecutionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new DeleteExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getExecutionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $creator = 'creator1028554796'; - $generation = 305703192; - $job = 'job105405'; - $parallelism = 635164956; - $taskCount = 1297805781; - $reconciling = false; - $observedGeneration = 900833007; - $runningCount = 261439119; - $succeededCount = 633694641; - $failedCount = 2013829491; - $cancelledCount = 1921113249; - $retriedCount = 1654679545; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $etag = 'etag3123477'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setCreator($creator); - $expectedResponse->setGeneration($generation); - $expectedResponse->setJob($job); - $expectedResponse->setParallelism($parallelism); - $expectedResponse->setTaskCount($taskCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setRunningCount($runningCount); - $expectedResponse->setSucceededCount($succeededCount); - $expectedResponse->setFailedCount($failedCount); - $expectedResponse->setCancelledCount($cancelledCount); - $expectedResponse->setRetriedCount($retriedCount); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new GetExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->getExecution($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Executions/GetExecution', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExecutionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new GetExecutionRequest()) - ->setName($formattedName); - try { - $gapicClient->getExecution($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExecutionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $executionsElement = new Execution(); - $executions = [ - $executionsElement, - ]; - $expectedResponse = new ListExecutionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExecutions($executions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new ListExecutionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExecutions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExecutions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Executions/ListExecutions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExecutionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new ListExecutionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExecutions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelExecutionAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $creator = 'creator1028554796'; - $generation = 305703192; - $job = 'job105405'; - $parallelism = 635164956; - $taskCount = 1297805781; - $reconciling = false; - $observedGeneration = 900833007; - $runningCount = 261439119; - $succeededCount = 633694641; - $failedCount = 2013829491; - $cancelledCount = 1921113249; - $retriedCount = 1654679545; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setCreator($creator); - $expectedResponse->setGeneration($generation); - $expectedResponse->setJob($job); - $expectedResponse->setParallelism($parallelism); - $expectedResponse->setTaskCount($taskCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setRunningCount($runningCount); - $expectedResponse->setSucceededCount($succeededCount); - $expectedResponse->setFailedCount($failedCount); - $expectedResponse->setCancelledCount($cancelledCount); - $expectedResponse->setRetriedCount($retriedCount); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelExecutionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new CancelExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelExecutionAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Executions/CancelExecution', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelExecutionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php deleted file mode 100644 index 219b461ab0c4..000000000000 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/JobsClientTest.php +++ /dev/null @@ -1,1172 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return JobsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new JobsClient($options); - } - - /** @test */ - public function createJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $executionCount = 1646136616; - $reconciling = false; - $satisfiesPzs = false; - $startExecutionToken = 'startExecutionToken-1179087819'; - $etag = 'etag3123477'; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setExecutionCount($executionCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setStartExecutionToken($startExecutionToken); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $jobTemplate = new ExecutionTemplate(); - $templateTemplate = new TaskTemplate(); - $jobTemplate->setTemplate($templateTemplate); - $job->setTemplate($jobTemplate); - $jobId = 'jobId-1154752291'; - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job) - ->setJobId($jobId); - $response = $gapicClient->createJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/CreateJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $actualValue = $actualApiRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $jobTemplate = new ExecutionTemplate(); - $templateTemplate = new TaskTemplate(); - $jobTemplate->setTemplate($templateTemplate); - $job->setTemplate($jobTemplate); - $jobId = 'jobId-1154752291'; - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job) - ->setJobId($jobId); - $response = $gapicClient->createJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $executionCount = 1646136616; - $reconciling = false; - $satisfiesPzs = false; - $startExecutionToken = 'startExecutionToken-1179087819'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setExecutionCount($executionCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setStartExecutionToken($startExecutionToken); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/DeleteJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $executionCount = 1646136616; - $reconciling = false; - $satisfiesPzs = false; - $startExecutionToken = 'startExecutionToken-1179087819'; - $etag = 'etag3123477'; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setExecutionCount($executionCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setStartExecutionToken($startExecutionToken); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $creator = 'creator1028554796'; - $generation = 305703192; - $job = 'job105405'; - $parallelism = 635164956; - $taskCount = 1297805781; - $reconciling = false; - $observedGeneration = 900833007; - $runningCount = 261439119; - $succeededCount = 633694641; - $failedCount = 2013829491; - $cancelledCount = 1921113249; - $retriedCount = 1654679545; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setCreator($creator); - $expectedResponse->setGeneration($generation); - $expectedResponse->setJob($job); - $expectedResponse->setParallelism($parallelism); - $expectedResponse->setTaskCount($taskCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setRunningCount($runningCount); - $expectedResponse->setSucceededCount($succeededCount); - $expectedResponse->setFailedCount($failedCount); - $expectedResponse->setCancelledCount($cancelledCount); - $expectedResponse->setRetriedCount($retriedCount); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new RunJobRequest()) - ->setName($formattedName); - $response = $gapicClient->runJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/RunJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function runJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new RunJobRequest()) - ->setName($formattedName); - $response = $gapicClient->runJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $executionCount = 1646136616; - $reconciling = false; - $satisfiesPzs = false; - $startExecutionToken = 'startExecutionToken-1179087819'; - $etag = 'etag3123477'; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setExecutionCount($executionCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setStartExecutionToken($startExecutionToken); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $job = new Job(); - $jobTemplate = new ExecutionTemplate(); - $templateTemplate = new TaskTemplate(); - $jobTemplate->setTemplate($templateTemplate); - $job->setTemplate($jobTemplate); - $request = (new UpdateJobRequest()) - ->setJob($job); - $response = $gapicClient->updateJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/UpdateJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $job = new Job(); - $jobTemplate = new ExecutionTemplate(); - $templateTemplate = new TaskTemplate(); - $jobTemplate->setTemplate($templateTemplate); - $job->setTemplate($jobTemplate); - $request = (new UpdateJobRequest()) - ->setJob($job); - $response = $gapicClient->updateJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createJobAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $executionCount = 1646136616; - $reconciling = false; - $satisfiesPzs = false; - $startExecutionToken = 'startExecutionToken-1179087819'; - $etag = 'etag3123477'; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setExecutionCount($executionCount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setStartExecutionToken($startExecutionToken); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $jobTemplate = new ExecutionTemplate(); - $templateTemplate = new TaskTemplate(); - $jobTemplate->setTemplate($templateTemplate); - $job->setTemplate($jobTemplate); - $jobId = 'jobId-1154752291'; - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job) - ->setJobId($jobId); - $response = $gapicClient->createJobAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Jobs/CreateJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $actualValue = $actualApiRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php deleted file mode 100644 index 73cea513c2f3..000000000000 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/RevisionsClientTest.php +++ /dev/null @@ -1,478 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RevisionsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RevisionsClient($options); - } - - /** @test */ - public function deleteRevisionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRevisionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $generation = 305703192; - $service = 'service1984153269'; - $maxInstanceRequestConcurrency = 117250100; - $serviceAccount = 'serviceAccount-1948028253'; - $encryptionKey = 'encryptionKey-1122344029'; - $reconciling = false; - $observedGeneration = 900833007; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $sessionAffinity = false; - $gpuZonalRedundancyDisabled = true; - $creator = 'creator1028554796'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Revision(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setService($service); - $expectedResponse->setMaxInstanceRequestConcurrency($maxInstanceRequestConcurrency); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setEncryptionKey($encryptionKey); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSessionAffinity($sessionAffinity); - $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); - $expectedResponse->setCreator($creator); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRevisionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); - $request = (new DeleteRevisionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRevision($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Revisions/DeleteRevision', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRevisionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRevisionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRevisionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); - $request = (new DeleteRevisionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRevision($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRevisionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getRevisionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $generation = 305703192; - $service = 'service1984153269'; - $maxInstanceRequestConcurrency = 117250100; - $serviceAccount = 'serviceAccount-1948028253'; - $encryptionKey = 'encryptionKey-1122344029'; - $reconciling = false; - $observedGeneration = 900833007; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $sessionAffinity = false; - $gpuZonalRedundancyDisabled = true; - $creator = 'creator1028554796'; - $etag = 'etag3123477'; - $expectedResponse = new Revision(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setService($service); - $expectedResponse->setMaxInstanceRequestConcurrency($maxInstanceRequestConcurrency); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setEncryptionKey($encryptionKey); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSessionAffinity($sessionAffinity); - $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); - $expectedResponse->setCreator($creator); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); - $request = (new GetRevisionRequest()) - ->setName($formattedName); - $response = $gapicClient->getRevision($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Revisions/GetRevision', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRevisionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); - $request = (new GetRevisionRequest()) - ->setName($formattedName); - try { - $gapicClient->getRevision($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $revisionsElement = new Revision(); - $revisions = [ - $revisionsElement, - ]; - $expectedResponse = new ListRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRevisions($revisions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new ListRevisionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRevisions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Revisions/ListRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRevisionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new ListRevisionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRevisions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteRevisionAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRevisionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $generation = 305703192; - $service = 'service1984153269'; - $maxInstanceRequestConcurrency = 117250100; - $serviceAccount = 'serviceAccount-1948028253'; - $encryptionKey = 'encryptionKey-1122344029'; - $reconciling = false; - $observedGeneration = 900833007; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $sessionAffinity = false; - $gpuZonalRedundancyDisabled = true; - $creator = 'creator1028554796'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Revision(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setService($service); - $expectedResponse->setMaxInstanceRequestConcurrency($maxInstanceRequestConcurrency); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setEncryptionKey($encryptionKey); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSessionAffinity($sessionAffinity); - $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); - $expectedResponse->setCreator($creator); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRevisionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[REVISION]'); - $request = (new DeleteRevisionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRevisionAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Revisions/DeleteRevision', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRevisionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php deleted file mode 100644 index 3948de6bc615..000000000000 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/ServicesClientTest.php +++ /dev/null @@ -1,1064 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ServicesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ServicesClient($options); - } - - /** @test */ - public function createServiceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $invokerIamDisabled = false; - $defaultUriDisabled = false; - $iapEnabled = true; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $uri = 'uri116076'; - $satisfiesPzs = false; - $threatDetectionEnabled = true; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); - $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); - $expectedResponse->setIapEnabled($iapEnabled); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setUri($uri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $service = new Service(); - $serviceTemplate = new RevisionTemplate(); - $service->setTemplate($serviceTemplate); - $serviceId = 'serviceId-1724763419'; - $request = (new CreateServiceRequest()) - ->setParent($formattedParent) - ->setService($service) - ->setServiceId($serviceId); - $response = $gapicClient->createService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/CreateService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $actualValue = $actualApiRequestObject->getServiceId(); - $this->assertProtobufEquals($serviceId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServiceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServiceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $service = new Service(); - $serviceTemplate = new RevisionTemplate(); - $service->setTemplate($serviceTemplate); - $serviceId = 'serviceId-1724763419'; - $request = (new CreateServiceRequest()) - ->setParent($formattedParent) - ->setService($service) - ->setServiceId($serviceId); - $response = $gapicClient->createService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServiceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServiceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $invokerIamDisabled = false; - $defaultUriDisabled = false; - $iapEnabled = true; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $uri = 'uri116076'; - $satisfiesPzs = false; - $threatDetectionEnabled = true; - $reconciling = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Service(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); - $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); - $expectedResponse->setIapEnabled($iapEnabled); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setUri($uri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new DeleteServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/DeleteService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServiceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServiceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new DeleteServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServiceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $invokerIamDisabled = false; - $defaultUriDisabled = false; - $iapEnabled = true; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $uri = 'uri116076'; - $satisfiesPzs = false; - $threatDetectionEnabled = true; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new Service(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); - $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); - $expectedResponse->setIapEnabled($iapEnabled); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setUri($uri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new GetServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->getService($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/GetService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]'); - $request = (new GetServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->getService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $servicesElement = new Service(); - $services = [ - $servicesElement, - ]; - $expectedResponse = new ListServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServices($services); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServicesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listServices($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/ListServices', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServicesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listServices($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $invokerIamDisabled = false; - $defaultUriDisabled = false; - $iapEnabled = true; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $uri = 'uri116076'; - $satisfiesPzs = false; - $threatDetectionEnabled = true; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); - $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); - $expectedResponse->setIapEnabled($iapEnabled); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setUri($uri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $service = new Service(); - $serviceTemplate = new RevisionTemplate(); - $service->setTemplate($serviceTemplate); - $request = (new UpdateServiceRequest()) - ->setService($service); - $response = $gapicClient->updateService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/UpdateService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServiceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateServiceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $service = new Service(); - $serviceTemplate = new RevisionTemplate(); - $service->setTemplate($serviceTemplate); - $request = (new UpdateServiceRequest()) - ->setService($service); - $response = $gapicClient->updateService($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServiceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServiceAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServiceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $invokerIamDisabled = false; - $defaultUriDisabled = false; - $iapEnabled = true; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $uri = 'uri116076'; - $satisfiesPzs = false; - $threatDetectionEnabled = true; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setInvokerIamDisabled($invokerIamDisabled); - $expectedResponse->setDefaultUriDisabled($defaultUriDisabled); - $expectedResponse->setIapEnabled($iapEnabled); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setUri($uri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createServiceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $service = new Service(); - $serviceTemplate = new RevisionTemplate(); - $service->setTemplate($serviceTemplate); - $serviceId = 'serviceId-1724763419'; - $request = (new CreateServiceRequest()) - ->setParent($formattedParent) - ->setService($service) - ->setServiceId($serviceId); - $response = $gapicClient->createServiceAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Services/CreateService', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $actualValue = $actualApiRequestObject->getServiceId(); - $this->assertProtobufEquals($serviceId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServiceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php deleted file mode 100644 index 28b61666042a..000000000000 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/TasksClientTest.php +++ /dev/null @@ -1,289 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TasksClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TasksClient($options); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $generation = 305703192; - $job = 'job105405'; - $execution = 'execution-1090974952'; - $maxRetries = 1129288043; - $serviceAccount = 'serviceAccount-1948028253'; - $reconciling = false; - $observedGeneration = 900833007; - $index = 100346066; - $retried = 1098377527; - $encryptionKey = 'encryptionKey-1122344029'; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $gpuZonalRedundancyDisabled = true; - $etag = 'etag3123477'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setJob($job); - $expectedResponse->setExecution($execution); - $expectedResponse->setMaxRetries($maxRetries); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setIndex($index); - $expectedResponse->setRetried($retried); - $expectedResponse->setEncryptionKey($encryptionKey); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->getTask($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Tasks/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->getTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTasks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Tasks/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTasks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $generation = 305703192; - $job = 'job105405'; - $execution = 'execution-1090974952'; - $maxRetries = 1129288043; - $serviceAccount = 'serviceAccount-1948028253'; - $reconciling = false; - $observedGeneration = 900833007; - $index = 100346066; - $retried = 1098377527; - $encryptionKey = 'encryptionKey-1122344029'; - $logUri = 'logUri342054385'; - $satisfiesPzs = false; - $gpuZonalRedundancyDisabled = true; - $etag = 'etag3123477'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setJob($job); - $expectedResponse->setExecution($execution); - $expectedResponse->setMaxRetries($maxRetries); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setIndex($index); - $expectedResponse->setRetried($retried); - $expectedResponse->setEncryptionKey($encryptionKey); - $expectedResponse->setLogUri($logUri); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setGpuZonalRedundancyDisabled($gpuZonalRedundancyDisabled); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[EXECUTION]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->getTaskAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.Tasks/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php b/owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php deleted file mode 100644 index a1311c5bf452..000000000000 --- a/owl-bot-staging/Run/v2/tests/Unit/V2/Client/WorkerPoolsClientTest.php +++ /dev/null @@ -1,1024 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WorkerPoolsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WorkerPoolsClient($options); - } - - /** @test */ - public function createWorkerPoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createWorkerPoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $threatDetectionEnabled = true; - $satisfiesPzs = false; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new WorkerPool(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createWorkerPoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $workerPool = new WorkerPool(); - $workerPoolTemplate = new WorkerPoolRevisionTemplate(); - $workerPool->setTemplate($workerPoolTemplate); - $workerPoolId = 'workerPoolId-300928931'; - $request = (new CreateWorkerPoolRequest()) - ->setParent($formattedParent) - ->setWorkerPool($workerPool) - ->setWorkerPoolId($workerPoolId); - $response = $gapicClient->createWorkerPool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/CreateWorkerPool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getWorkerPool(); - $this->assertProtobufEquals($workerPool, $actualValue); - $actualValue = $actualApiRequestObject->getWorkerPoolId(); - $this->assertProtobufEquals($workerPoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createWorkerPoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createWorkerPoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createWorkerPoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $workerPool = new WorkerPool(); - $workerPoolTemplate = new WorkerPoolRevisionTemplate(); - $workerPool->setTemplate($workerPoolTemplate); - $workerPoolId = 'workerPoolId-300928931'; - $request = (new CreateWorkerPoolRequest()) - ->setParent($formattedParent) - ->setWorkerPool($workerPool) - ->setWorkerPoolId($workerPoolId); - $response = $gapicClient->createWorkerPool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createWorkerPoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteWorkerPoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteWorkerPoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $threatDetectionEnabled = true; - $satisfiesPzs = false; - $reconciling = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new WorkerPool(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteWorkerPoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); - $request = (new DeleteWorkerPoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteWorkerPool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/DeleteWorkerPool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteWorkerPoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteWorkerPoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteWorkerPoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); - $request = (new DeleteWorkerPoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteWorkerPool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteWorkerPoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWorkerPoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $threatDetectionEnabled = true; - $satisfiesPzs = false; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new WorkerPool(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); - $request = (new GetWorkerPoolRequest()) - ->setName($formattedName); - $response = $gapicClient->getWorkerPool($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/GetWorkerPool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWorkerPoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->workerPoolName('[PROJECT]', '[LOCATION]', '[WORKER_POOL]'); - $request = (new GetWorkerPoolRequest()) - ->setName($formattedName); - try { - $gapicClient->getWorkerPool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkerPoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $workerPoolsElement = new WorkerPool(); - $workerPools = [ - $workerPoolsElement, - ]; - $expectedResponse = new ListWorkerPoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setWorkerPools($workerPools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListWorkerPoolsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listWorkerPools($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getWorkerPools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/ListWorkerPools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkerPoolsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListWorkerPoolsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listWorkerPools($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWorkerPoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateWorkerPoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $threatDetectionEnabled = true; - $satisfiesPzs = false; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new WorkerPool(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateWorkerPoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $workerPool = new WorkerPool(); - $workerPoolTemplate = new WorkerPoolRevisionTemplate(); - $workerPool->setTemplate($workerPoolTemplate); - $request = (new UpdateWorkerPoolRequest()) - ->setWorkerPool($workerPool); - $response = $gapicClient->updateWorkerPool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/UpdateWorkerPool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getWorkerPool(); - $this->assertProtobufEquals($workerPool, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateWorkerPoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateWorkerPoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateWorkerPoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $workerPool = new WorkerPool(); - $workerPoolTemplate = new WorkerPoolRevisionTemplate(); - $workerPool->setTemplate($workerPoolTemplate); - $request = (new UpdateWorkerPoolRequest()) - ->setWorkerPool($workerPool); - $response = $gapicClient->updateWorkerPool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateWorkerPoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createWorkerPoolAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createWorkerPoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $generation = 305703192; - $creator = 'creator1028554796'; - $lastModifier = 'lastModifier-28366240'; - $client = 'client-1357712437'; - $clientVersion = 'clientVersion-1506231196'; - $observedGeneration = 900833007; - $latestReadyRevision = 'latestReadyRevision-853854545'; - $latestCreatedRevision = 'latestCreatedRevision452370698'; - $threatDetectionEnabled = true; - $satisfiesPzs = false; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new WorkerPool(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setGeneration($generation); - $expectedResponse->setCreator($creator); - $expectedResponse->setLastModifier($lastModifier); - $expectedResponse->setClient($client); - $expectedResponse->setClientVersion($clientVersion); - $expectedResponse->setObservedGeneration($observedGeneration); - $expectedResponse->setLatestReadyRevision($latestReadyRevision); - $expectedResponse->setLatestCreatedRevision($latestCreatedRevision); - $expectedResponse->setThreatDetectionEnabled($threatDetectionEnabled); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createWorkerPoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $workerPool = new WorkerPool(); - $workerPoolTemplate = new WorkerPoolRevisionTemplate(); - $workerPool->setTemplate($workerPoolTemplate); - $workerPoolId = 'workerPoolId-300928931'; - $request = (new CreateWorkerPoolRequest()) - ->setParent($formattedParent) - ->setWorkerPool($workerPool) - ->setWorkerPoolId($workerPoolId); - $response = $gapicClient->createWorkerPoolAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.run.v2.WorkerPools/CreateWorkerPool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getWorkerPool(); - $this->assertProtobufEquals($workerPool, $actualValue); - $actualValue = $actualApiRequestObject->getWorkerPoolId(); - $this->assertProtobufEquals($workerPoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createWorkerPoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}