From 9132cc73585d3dacb39a72d6e98b8362ebca576d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 6 Aug 2024 03:15:00 +0000 Subject: [PATCH 1/2] docs: Refine usage scope for fields `task_execution` and `task_state` in StatusEvent PiperOrigin-RevId: 659685089 Source-Link: https://github.com/googleapis/googleapis/commit/00ed8aad1ec259d62c2490255dec591574b56933 Source-Link: https://github.com/googleapis/googleapis-gen/commit/85a98627f9e90ea2cb0e1c06e3a41959942ca930 Copy-Tag: eyJwIjoiQmF0Y2gvLk93bEJvdC55YW1sIiwiaCI6Ijg1YTk4NjI3ZjllOTBlYTJjYjBlMWMwNmUzYTQxOTU5OTQyY2E5MzAifQ== --- .../Google/Cloud/Batch/V1/Batch.php | 93 +++ .../GPBMetadata/Google/Cloud/Batch/V1/Job.php | Bin 0 -> 5994 bytes .../Google/Cloud/Batch/V1/Task.php | Bin 0 -> 3962 bytes .../Google/Cloud/Batch/V1/Volume.php | Bin 0 -> 1026 bytes .../Cloud/Batch/V1/AllocationPolicy.php | 400 ++++++++++ .../Batch/V1/AllocationPolicy/Accelerator.php | 201 +++++ .../V1/AllocationPolicy/AttachedDisk.php | 153 ++++ .../Cloud/Batch/V1/AllocationPolicy/Disk.php | 355 +++++++++ .../V1/AllocationPolicy/InstancePolicy.php | 321 ++++++++ .../InstancePolicyOrTemplate.php | 224 ++++++ .../V1/AllocationPolicy/LocationPolicy.php | 112 +++ .../V1/AllocationPolicy/NetworkInterface.php | 202 +++++ .../V1/AllocationPolicy/NetworkPolicy.php | 70 ++ .../V1/AllocationPolicy/PlacementPolicy.php | 133 ++++ .../V1/AllocationPolicy/ProvisioningModel.php | 75 ++ .../Google/Cloud/Batch/V1/ComputeResource.php | 248 +++++++ .../Cloud/Batch/V1/CreateJobRequest.php | 278 +++++++ .../Cloud/Batch/V1/DeleteJobRequest.php | 188 +++++ .../src/Google/Cloud/Batch/V1/Environment.php | 158 ++++ .../Cloud/Batch/V1/Environment/KMSEnvMap.php | 102 +++ .../proto/src/Google/Cloud/Batch/V1/GCS.php | 71 ++ .../Google/Cloud/Batch/V1/GetJobRequest.php | 81 ++ .../Google/Cloud/Batch/V1/GetTaskRequest.php | 81 ++ .../proto/src/Google/Cloud/Batch/V1/Job.php | 513 +++++++++++++ .../Google/Cloud/Batch/V1/JobNotification.php | 155 ++++ .../Batch/V1/JobNotification/Message.php | 144 ++++ .../Cloud/Batch/V1/JobNotification/Type.php | 64 ++ .../src/Google/Cloud/Batch/V1/JobStatus.php | 183 +++++ .../Batch/V1/JobStatus/InstanceStatus.php | 182 +++++ .../Google/Cloud/Batch/V1/JobStatus/State.php | 96 +++ .../Batch/V1/JobStatus/TaskGroupStatus.php | 108 +++ .../Google/Cloud/Batch/V1/LifecyclePolicy.php | 128 ++++ .../Cloud/Batch/V1/LifecyclePolicy/Action.php | 64 ++ .../V1/LifecyclePolicy/ActionCondition.php | 82 ++ .../Google/Cloud/Batch/V1/ListJobsRequest.php | 220 ++++++ .../Cloud/Batch/V1/ListJobsResponse.php | 135 ++++ .../Cloud/Batch/V1/ListTasksRequest.php | 201 +++++ .../Cloud/Batch/V1/ListTasksResponse.php | 135 ++++ .../src/Google/Cloud/Batch/V1/LogsPolicy.php | 158 ++++ .../V1/LogsPolicy/CloudLoggingOption.php | 99 +++ .../Cloud/Batch/V1/LogsPolicy/Destination.php | 64 ++ .../proto/src/Google/Cloud/Batch/V1/NFS.php | 101 +++ .../Cloud/Batch/V1/OperationMetadata.php | 307 ++++++++ .../src/Google/Cloud/Batch/V1/Runnable.php | 452 +++++++++++ .../Cloud/Batch/V1/Runnable/Barrier.php | 74 ++ .../Cloud/Batch/V1/Runnable/Container.php | 546 ++++++++++++++ .../Google/Cloud/Batch/V1/Runnable/Script.php | 147 ++++ .../Google/Cloud/Batch/V1/ServiceAccount.php | 101 +++ .../src/Google/Cloud/Batch/V1/StatusEvent.php | 235 ++++++ .../proto/src/Google/Cloud/Batch/V1/Task.php | 123 +++ .../Google/Cloud/Batch/V1/TaskExecution.php | 100 +++ .../src/Google/Cloud/Batch/V1/TaskGroup.php | 479 ++++++++++++ .../Batch/V1/TaskGroup/SchedulingPolicy.php | 66 ++ .../src/Google/Cloud/Batch/V1/TaskSpec.php | 440 +++++++++++ .../src/Google/Cloud/Batch/V1/TaskStatus.php | 101 +++ .../Cloud/Batch/V1/TaskStatus/State.php | 92 +++ .../src/Google/Cloud/Batch/V1/Volume.php | 268 +++++++ .../V1/BatchServiceClient/create_job.php | 81 ++ .../V1/BatchServiceClient/delete_job.php | 66 ++ .../samples/V1/BatchServiceClient/get_job.php | 71 ++ .../V1/BatchServiceClient/get_location.php | 57 ++ .../V1/BatchServiceClient/get_task.php | 77 ++ .../V1/BatchServiceClient/list_jobs.php | 62 ++ .../V1/BatchServiceClient/list_locations.php | 62 ++ .../V1/BatchServiceClient/list_tasks.php | 83 +++ .../v1/src/V1/Client/BatchServiceClient.php | 558 ++++++++++++++ .../Batch/v1/src/V1/gapic_metadata.json | 58 ++ .../batch_service_client_config.json | 84 +++ .../batch_service_descriptor_config.php | 163 ++++ .../batch_service_rest_client_config.php | 167 +++++ .../Unit/V1/Client/BatchServiceClientTest.php | 701 ++++++++++++++++++ 71 files changed, 12199 insertions(+) create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php create mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php create mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php create mode 100644 owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php create mode 100644 owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json create mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php create mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php create mode 100644 owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php new file mode 100644 index 000000000000..7f21496cde09 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php @@ -0,0 +1,93 @@ +internalAddGeneratedFile( + ' +† +!google/cloud/batch/v1/batch.protogoogle.cloud.batch.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.protogoogle/cloud/batch/v1/job.proto google/cloud/batch/v1/task.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"› +CreateJobRequest0 +parent ( B àAúAbatch.googleapis.com/Job +job_id ( , +job ( 2.google.cloud.batch.v1.JobBàA + +request_id ( BàA"? + GetJobRequest. +name ( B àAúA +batch.googleapis.com/Job"N +DeleteJobRequest +name (  +reason ( BàA + +request_id ( BàA"o +ListJobsRequest +parent (  +filter (  +order_by ( BàA + page_size ( + +page_token ( "j +ListJobsResponse( +jobs ( 2.google.cloud.batch.v1.Job +next_page_token (  + unreachable ( " +ListTasksRequest6 +parent ( B&àAúA +batch.googleapis.com/TaskGroup +filter (  + page_size ( + +page_token ( "m +ListTasksResponse* +tasks ( 2.google.cloud.batch.v1.Task +next_page_token (  + unreachable ( "A +GetTaskRequest/ +name ( B!àAúA +batch.googleapis.com/Task"€ +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA +status_message ( BàA# +requested_cancellation (BàA + api_version ( BàA2¶ + BatchService› + CreateJob\'.google.cloud.batch.v1.CreateJobRequest.google.cloud.batch.v1.Job"IÚAparent,job,job_id‚Óä“/"(/v1/{parent=projects/*/locations/*}/jobs:jobƒ +GetJob$.google.cloud.batch.v1.GetJobRequest.google.cloud.batch.v1.Job"7ÚAname‚Óä“*(/v1/{name=projects/*/locations/*/jobs/*}Ï + DeleteJob\'.google.cloud.batch.v1.DeleteJobRequest.google.longrunning.Operation"zÊA@ +google.protobuf.Empty\'google.cloud.batch.v1.OperationMetadataÚAname‚Óä“**(/v1/{name=projects/*/locations/*/jobs/*}– +ListJobs&.google.cloud.batch.v1.ListJobsRequest\'.google.cloud.batch.v1.ListJobsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*/locations/*}/jobs› +GetTask%.google.cloud.batch.v1.GetTaskRequest.google.cloud.batch.v1.Task"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}® + ListTasks\'.google.cloud.batch.v1.ListTasksRequest(.google.cloud.batch.v1.ListTasksResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasksHÊAbatch.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB« +com.google.cloud.batch.v1B +BatchProtoPZ/cloud.google.com/go/batch/apiv1/batchpb;batchpb¢GCBªGoogle.Cloud.Batch.V1ÊGoogle\\Cloud\\Batch\\V1êGoogle::Cloud::Batch::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php new file mode 100644 index 0000000000000000000000000000000000000000..470c2cabe016fc4335aeb554b4d5af988fe1d960 GIT binary patch literal 5994 zcmbtY-E$h(6%U{fI7kSszc6m?HA!n_5<^51C&6|czJzcjAObm)4l~?hSYPfP%ibZAZO8H~%`)WP=-_}kvStl!-C#~umMcxU(d@|8O1*OzMO|y; zXsjR)ENft}oMu>~ey*o_+F|Z!Gxyx;Ww|Z@QyntbRy8KqTBTj)seRQ`yEQJ>Et6Qc zL}J}%n-2jrLv>yGsnvtmAmg7s>KVEwyPoRd#|OHr=%()Js-gb|PyJXvPz{%%-1)T! zBUAHq%alo=X=-faLs{sgwIA3P-tw^=9Hd1T$4htXrpFvpHM$k%YL0Gumeazeg~EV& zV{_4yjSu~8Nu7QmZ-_G%3g-^_SoWL|o7`QN9p;T3^C3SsDL5H_>t0}{qOEtgbY}ER z>`*<@EvHa8z169bS)zN)_txA}XZ_OcsP2pTw;bEDGQ!|O7yJ*R9UY^_Q-}7&vfO?5 zzt(+c75n|MZ?-UAH^$Z^+unnpHsH=X0#&*u7G!xOXL%%Nk2cdceL2!MbV~ zmc~7(*cPVYacUXW#`E2KGgK7E0xiB?dH_p?+GB>Bit@dGIYSWdnBCzEtET51OP|9M zrPIhw#rTf1&Wv(xzE0TWGl**rLqJo=kf}JAO$U1hR?d!tYb-Ug5tV$YmHDI|K-{nf zZeW>JE_FB9>ueNdcW|X|lE<)WTAqHO3(LBx#Jeohm{^{^5AjJu#Ub*79gDb-R$=i- zHAYMXMIroUsPNsJVgphlnuXgjklifedXC~Mk2ZPEG|$bw_P?Fv0-xiv;OhwiI{wE0 zCz-#80VeKKf_NWORX2H{@RKC+_upxUEaGb*gy9_%wp6`Cad_!_xXNv);ERE74iw8K zDB*z}&wuuA{T#yZoFv@jvgGYhdJClUucS}l{gKO*0To1DQ+U=4Evy`t!}>~)`22QJ zt|wE2_~aFC!Hr6_-KjT^Iu2YPr5uuU3-p;r&+2JI(!yveT^9>Wx}5Bt>DN zRqSjh!dL4FzG8;C9#pKup?%AE?SXtJu|~jLbggv zrRqf>@yQIq@j*}F!WAi-gB53FDgnZ!7I{M44D^hXFDMG>e}o`WH}TY1o5gvgtFSUu zwL{&+R6MqQxRdrlLg^#jMgLPI46Qyhc$g&eUj_Q75^fravaJaXyQF}Ej=LGT$qOGZ zpFpf+89UuOYOjtW{t=vA?}k$Gc;acTA?9Z=HkN4 zC5Y+1(E=yu-l_1cnF&KCRnEqc2w_NCo4Awj>@y-yCSfO@zeMPW`_U$u*RV*xm~;)+ z+nr*kI+a2IOW*BR_c5J9h;y-adAnNK-@%_@DGtkf`;7+WRfNCWFPE#;3cg#AP;9GM zr*(@`3a(bFJ5`>a^@h^gYu5Iv?RIi0^Pe!Rq4_6)mSPdfr#tE?o@MKr53x^R8HtIj z4g|=?^V!+PpH!FK6;kQHgkahKj!C;P4)a9*qd7HoFf$~oBJ8E|-0CSVhYR8X^TWjx zNRT*>e<4qVAu+qMQ&0Epb@*bcWdZ%T4g4Em$_0_tJ7+_|)w4 zd9^fzm~Ww{5W`z(Y={LR1swRkm{(IP5cG8+SM}6^i|i{RxN0c<5hSKua#OI&msnf_ zCkuRxrGJD4!cu7s7WE+|8Ub-^`#nj5sB5aWduVyQy3n(gi4=;V$g+!#p)%<4@(_`( zLxQjzn?~&F4)B7hB~n&eMbd(8s3Q8J^zTEkQuI75J*?07{sy9yA0+F?-lggQ9_$9J zvR67$oPkioi8{WxLVSsb4QKR}cd-&cRQ2~yA3_{sgkjgMBKw%SAyPaMYosnB-GM8- z8W@H$ut!SY(T|wp@@f_>g;OEv78-y*ROkf}C~i$bg?<+~t-!wXrYkT%H6mwnsGEw0 zTTt*HSk92|5t~t)X^;P_HrHVVlPa)*i|!^iGk1zi+V4zFkK(~DS<^957by;03>`Ye zEb4hKPtOEY3gSp25dj2Crap@IaUr5XshJ?N4NJD@yr}cL1OlGbh+%gN)_J5L*-|_o z!vxjlFK365blaE27_)3w!Hh(VAP);7Tv~@UamKOU^!JeT@ueOl9_3~LRlJMEbOx-h z!7~wPx8b^JDeRS)!6>?|sQo?~&JXD{gVnRZ)d9)ZaGK)*(fV>;1oKsn&zgP&YtyKP zX^V5Q0IPg9z_aBQ*vX725uuic~);@Gl9fL*=-_qnW9815XA!9 zs1)~z6k$WrZZ$i|ht?q8+N)M~Tb+7or<#mp{s~}kgXFLuN4mq5L(BDC z7eq&Mk1T%&%$p9{Qhu3`c6^(x1cEYJ8rY<(+-D zMDyhAv(3K-&%6Gh*`GAysQFDeB}57ZE>kFQp+e!=W^V~?qmNg4nE literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php new file mode 100644 index 0000000000000000000000000000000000000000..8bac0e2979dfcdf792061b2ffe0587f0a437420b GIT binary patch literal 3962 zcmbVP&2k$>5RN2Uwp#wnKoVJ1kc|k$0kXnMRRRi0kYvTElE}i6%}=RnYqT2Mi&wkL z?yM6*`31P}1{^r%4Y+aU!UJ&OoFjLt=$YA-Wntlf57zE%e>45_b@%kg54{5q-qJRi z!+gqFU+WDue!w)(ce!i2w$=;x_L#4k?!dEb=Iffav86S)I$C|B(Yc1uzzuzqm9>4> z-M3lMwB4{@>``tW6pz-6oCb%w+zh~>0~UDHWZGt{`jm0nr<`^-C9Yc&xNcS8y1VQ5 z08E<(f!0Ahd98z<02Im{T7Or%lnLv941!QZbrw7 z?W{d*P3c%J|3k_98uvpse!8aljEBB+PwFi;I37K9&+t>lv$~HgX7{V?fF4<{UoM|m zb+XAc=r)Vu^~$Kzf$8qLb~s?Ke(1=X8zB-5gYZ9~9Se!W>A*W1D+74zffa?T((jL= z^9VV+Hu9(N?hW`k2j`NNTvBw_C7pFiXZ>hBzZ$WedREboT&d`tFPxnKN77%B%$t#n zObDb{u^%}l`hIotJC7|_0);JDu3;vIoW+487a?PMp)s&*+sY-h#9E3FfB_r0{t#Dt zxujgX1dBb_^7UAjU}j0Q zNGX<^MdVVcd*ffA${Jn#utEVAPj83bV$UsZm~Nj*du9uNCIEzx0+Ks0tIiU>{10c5 zk6=*%!@!X43D7kuG_x>8S9P59df^+G6|an3f{X1=rBgR{n(bD-)_ByYZ>(G(S(t0p zn;VVh=1KxXG+$}A8=Fo1loX$~cbZM{DTQ%QKdLmI;D;Hq2$}XytyZsZ;Oi_|0@!KR zzo^%CI{2P0{FsLM?a*;(&t~KSa>#W!wXh3FuVhO%r>Grc^jZw~^aA-1(yBs6ba>}H za9h?>M3!N$M}6PIbJLO)Q)4?ixT@q4yb23QXV0cXL-ZERYb0$o^+zQ^@<6P8$MqS~ z4#TYiBUwE!(xXSs!+qZkoxUWaT%-0gIt&aybR^B@$z8}Y=g9J1XMl9i%}M>Hg|mJl zN#2DyksEHvbMq3k8v7$od_As)$nUgGd&~}U8A+G-V$q4L7@7Y>O4l9k5A(kzATx@C zs07x4?lU9wRVB!f6`04)J)lls(J>>8M`Qe<=VHB#(tH`_RGA9U$Q0&1F1VgZ)j%4M zA#cLvp6!|z z(Shac=N7~sGH&_XkXGD4!p?YDj||L zlfMPoF?V6Eqz>6IDr1WS4f9vOVjdWvbNubl>vP&C~3rj(`JU};$_NWG3};l^dttfg#3^^hJ~@52ry}dE7qsDB6goXmK}kl zZZ(-pU?(}nyKL!=Df_5P$7Di^be~>d$Bsl+T^xH=8l1<5!uLs7o;3eHq^Z10N)j!V zZcR~m0;g9bh_qlu!7(mQA1|-i3`Kj+mhSwgjWFjGI{!8-tG!1{GQ;B*7oeW0wb{Z$ zNJlDM22!bY8e7eY7K8m^yWZLU(&$v$kFm>O`w*=}y(SC4Bw$8F^K^odbu9d{=S5~* zn_|XEe=R?IS>dp%ZdB^hfS0L2$4n{813t$Z`86|nQ2Z`>Ixb@Ak#|R2iyx1RU%Neg z$N$H2%Gktm?%@I#cMVb7J+&S!9T$E`L3WGqH&@fb|sjWLqPDK5Woz^z zN-~x|)hcCu6!$yR@(!49oRrr52e34u&^dK8e+OPa(~xs;)fWj^#kiksQ8gpz&=SK~ zEAf?@D@T$@mVGyxGLb$wXi7qPy?fE`Ps!9~t@qG zMuR6#o-dO*1u2&$rd*bwa(Q>XmzM4O_Knd%@xB`8#-=}!4VHPvN7e0B`S0Dl80 CUcli1 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php new file mode 100644 index 0000000000000000000000000000000000000000..fa8ca8061c1c73d2e747bfcc335cfc3d120737af GIT binary patch literal 1026 zcmaiz-Hy^g6vqXW$Pm52kkq|8;wB45OIYuUXk>A5FI-66aABH|VK~4fZKs(|N!0K% zUT%C6U&O?xa6Yfp5*D99Z4go^lwcx)MZQ|0 z1SaB?M<{)O(FD#X7w~R$cJV}8Gm%S%0jz~sN7!YN$d}y(RczDU_PSdUq^r_mm!LeDyYt6rvNd_8)2mMD}7jlvOT zO!8C-In~l2Sfkosnu)YKMOl-Mub}OE41ya?4nWBquU7|BskXjC9R1ukugn_{2z?q`t&0XE-+~cvWqw>2QOPSmcSCr&MjcyC$lo4_r*7 zW^b8y4=U~2@II+J;#$v0Mb~dU)B%)Rl(yGe;}NM#jD_CrZy#}3clTj|n3g^{zV})Ych{nzou*s^Z|^c)^o#RbSr;B&mYWW8-$L$N$o*OG z$5lKm=r8cs{QoL@&JqOH69m>21hd|vYJaDfNBiABcSv0$@UQe)r2}n8c7*%}XQevv literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php new file mode 100644 index 000000000000..f438a67a782e --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php @@ -0,0 +1,400 @@ +google.cloud.batch.v1.AllocationPolicy + */ +class AllocationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Location where compute resources should be allocated for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; + */ + protected $location = null; + /** + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; + */ + private $instances; + /** + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * + * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; + */ + protected $service_account = null; + /** + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 6; + */ + private $labels; + /** + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; + */ + protected $network = null; + /** + * The placement policy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; + */ + protected $placement = null; + /** + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $location + * Location where compute resources should be allocated for the Job. + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $instances + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * @type \Google\Cloud\Batch\V1\ServiceAccount $service_account + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $network + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $placement + * The placement policy. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Location where compute resources should be allocated for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy|null + */ + public function getLocation() + { + return $this->location; + } + + public function hasLocation() + { + return isset($this->location); + } + + public function clearLocation() + { + unset($this->location); + } + + /** + * Location where compute resources should be allocated for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy::class); + $this->location = $var; + + return $this; + } + + /** + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Describe instances that can be created by this AllocationPolicy. + * Only instances[0] is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate::class); + $this->instances = $arr; + + return $this; + } + + /** + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * + * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; + * @return \Google\Cloud\Batch\V1\ServiceAccount|null + */ + public function getServiceAccount() + { + return $this->service_account; + } + + public function hasServiceAccount() + { + return isset($this->service_account); + } + + public function clearServiceAccount() + { + unset($this->service_account); + } + + /** + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) + * + * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; + * @param \Google\Cloud\Batch\V1\ServiceAccount $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ServiceAccount::class); + $this->service_account = $var; + + return $this; + } + + /** + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels applied to all VM instances and other resources + * created by AllocationPolicy. + * Labels could be user provided or system generated. + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * 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; + } + + /** + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * The network policy. + * If you define an instance template in the `InstancePolicyOrTemplate` field, + * Batch will use the network settings in the instance template instead of + * this field. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy::class); + $this->network = $var; + + return $this; + } + + /** + * The placement policy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy|null + */ + public function getPlacement() + { + return $this->placement; + } + + public function hasPlacement() + { + return isset($this->placement); + } + + public function clearPlacement() + { + unset($this->placement); + } + + /** + * The placement policy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $var + * @return $this + */ + public function setPlacement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy::class); + $this->placement = $var; + + return $this; + } + + /** + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Tags applied to the VM instances. + * The tags identify valid sources or targets for network firewalls. + * Each tag must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field repeated string tags = 11 [(.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; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php new file mode 100644 index 000000000000..a035df7f534c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php @@ -0,0 +1,201 @@ +google.cloud.batch.v1.AllocationPolicy.Accelerator + */ +class Accelerator extends \Google\Protobuf\Internal\Message +{ + /** + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * The number of accelerators of this type. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + /** + * Deprecated: please use instances[0].install_gpu_drivers instead. + * + * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; + * @deprecated + */ + protected $install_gpu_drivers = false; + /** + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * + * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $driver_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * @type int|string $count + * The number of accelerators of this type. + * @type bool $install_gpu_drivers + * Deprecated: please use instances[0].install_gpu_drivers instead. + * @type string $driver_version + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The accelerator type. For example, "nvidia-tesla-t4". + * See `gcloud compute accelerator-types list`. + * + * 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; + } + + /** + * The number of accelerators of this type. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * The number of accelerators of this type. + * + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Deprecated: please use instances[0].install_gpu_drivers instead. + * + * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getInstallGpuDrivers() + { + @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); + return $this->install_gpu_drivers; + } + + /** + * Deprecated: please use instances[0].install_gpu_drivers instead. + * + * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setInstallGpuDrivers($var) + { + @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->install_gpu_drivers = $var; + + return $this; + } + + /** + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * + * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDriverVersion() + { + return $this->driver_version; + } + + /** + * Optional. The NVIDIA GPU driver version that should be installed for this + * type. + * You can define the specific driver version such as "470.103.01", + * following the driver version requirements in + * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + * Batch will install the specific accelerator driver if qualified. + * + * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDriverVersion($var) + { + GPBUtil::checkString($var, True); + $this->driver_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Accelerator::class, \Google\Cloud\Batch\V1\AllocationPolicy_Accelerator::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php new file mode 100644 index 000000000000..d57b97912d09 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php @@ -0,0 +1,153 @@ +google.cloud.batch.v1.AllocationPolicy.AttachedDisk + */ +class AttachedDisk extends \Google\Protobuf\Internal\Message +{ + /** + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * + * Generated from protobuf field string device_name = 3; + */ + protected $device_name = ''; + protected $attached; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $new_disk + * @type string $existing_disk + * Name of an existing PD. + * @type string $device_name + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null + */ + public function getNewDisk() + { + return $this->readOneof(1); + } + + public function hasNewDisk() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var + * @return $this + */ + public function setNewDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Name of an existing PD. + * + * Generated from protobuf field string existing_disk = 2; + * @return string + */ + public function getExistingDisk() + { + return $this->readOneof(2); + } + + public function hasExistingDisk() + { + return $this->hasOneof(2); + } + + /** + * Name of an existing PD. + * + * Generated from protobuf field string existing_disk = 2; + * @param string $var + * @return $this + */ + public function setExistingDisk($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * + * Generated from protobuf field string device_name = 3; + * @return string + */ + public function getDeviceName() + { + return $this->device_name; + } + + /** + * Device name that the guest operating system will see. + * It is used by Runnable.volumes field to mount disks. So please specify + * the device_name if you want Batch to help mount the disk, and it should + * match the device_name field in volumes. + * + * Generated from protobuf field string device_name = 3; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->device_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getAttached() + { + return $this->whichOneof("attached"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttachedDisk::class, \Google\Cloud\Batch\V1\AllocationPolicy_AttachedDisk::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php new file mode 100644 index 000000000000..4abf60b5f58d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php @@ -0,0 +1,355 @@ +google.cloud.batch.v1.AllocationPolicy.Disk + */ +class Disk extends \Google\Protobuf\Internal\Message +{ + /** + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * + * Generated from protobuf field int64 size_gb = 2; + */ + protected $size_gb = 0; + /** + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * + * Generated from protobuf field string disk_interface = 6; + */ + protected $disk_interface = ''; + protected $data_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image + * URL for a VM image to use as the data source for this disk. + * For example, the following are all valid URLs: + * * Specify the image by its family name: + * projects/{project}/global/images/family/{image_family} + * * Specify the image version: + * projects/{project}/global/images/{image_version} + * You can also use Batch customized image in short names. + * The following image values are supported for a boot disk: + * * `batch-debian`: use Batch Debian images. + * * `batch-centos`: use Batch CentOS images. + * * `batch-cos`: use Batch Container-Optimized images. + * * `batch-hpc-centos`: use Batch HPC CentOS images. + * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + * @type string $snapshot + * Name of a snapshot used as the data source. + * Snapshot is not supported as boot disk now. + * @type string $type + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * @type int|string $size_gb + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * @type string $disk_interface + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * URL for a VM image to use as the data source for this disk. + * For example, the following are all valid URLs: + * * Specify the image by its family name: + * projects/{project}/global/images/family/{image_family} + * * Specify the image version: + * projects/{project}/global/images/{image_version} + * You can also use Batch customized image in short names. + * The following image values are supported for a boot disk: + * * `batch-debian`: use Batch Debian images. + * * `batch-centos`: use Batch CentOS images. + * * `batch-cos`: use Batch Container-Optimized images. + * * `batch-hpc-centos`: use Batch HPC CentOS images. + * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + * + * Generated from protobuf field string image = 4; + * @return string + */ + public function getImage() + { + return $this->readOneof(4); + } + + public function hasImage() + { + return $this->hasOneof(4); + } + + /** + * URL for a VM image to use as the data source for this disk. + * For example, the following are all valid URLs: + * * Specify the image by its family name: + * projects/{project}/global/images/family/{image_family} + * * Specify the image version: + * projects/{project}/global/images/{image_version} + * You can also use Batch customized image in short names. + * The following image values are supported for a boot disk: + * * `batch-debian`: use Batch Debian images. + * * `batch-centos`: use Batch CentOS images. + * * `batch-cos`: use Batch Container-Optimized images. + * * `batch-hpc-centos`: use Batch HPC CentOS images. + * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + * + * Generated from protobuf field string image = 4; + * @param string $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Name of a snapshot used as the data source. + * Snapshot is not supported as boot disk now. + * + * Generated from protobuf field string snapshot = 5; + * @return string + */ + public function getSnapshot() + { + return $this->readOneof(5); + } + + public function hasSnapshot() + { + return $this->hasOneof(5); + } + + /** + * Name of a snapshot used as the data source. + * Snapshot is not supported as boot disk now. + * + * Generated from protobuf field string snapshot = 5; + * @param string $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Disk type as shown in `gcloud compute disk-types list`. + * For example, local SSD uses type "local-ssd". + * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + * or "pd-standard". If not specified, "pd-standard" will be used as the + * default type for non-boot disks, "pd-balanced" will be used as the + * default type for boot disks. + * + * 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; + } + + /** + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * + * Generated from protobuf field int64 size_gb = 2; + * @return int|string + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Disk size in GB. + * **Non-Boot Disk**: + * If the `type` specifies a persistent disk, this field + * is ignored if `data_source` is set as `image` or `snapshot`. + * If the `type` specifies a local SSD, this field should be a multiple of + * 375 GB, otherwise, the final size will be the next greater multiple of + * 375 GB. + * **Boot Disk**: + * Batch will calculate the boot disk size based on source + * image and task requirements if you do not speicify the size. + * If both this field and the `boot_disk_mib` field in task spec's + * `compute_resource` are defined, Batch will only honor this field. + * Also, this field should be no smaller than the source disk's + * size when the `data_source` is set as `snapshot` or `image`. + * For example, if you set an image as the `data_source` field and the + * image's default disk size 30 GB, you can only use this field to make the + * disk larger or equal to 30 GB. + * + * Generated from protobuf field int64 size_gb = 2; + * @param int|string $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->size_gb = $var; + + return $this; + } + + /** + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * + * Generated from protobuf field string disk_interface = 6; + * @return string + */ + public function getDiskInterface() + { + return $this->disk_interface; + } + + /** + * Local SSDs are available through both "SCSI" and "NVMe" interfaces. + * If not indicated, "NVMe" will be the default one for local ssds. + * This field is ignored for persistent disks as the interface is chosen + * automatically. See + * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + * + * Generated from protobuf field string disk_interface = 6; + * @param string $var + * @return $this + */ + public function setDiskInterface($var) + { + GPBUtil::checkString($var, True); + $this->disk_interface = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataSource() + { + return $this->whichOneof("data_source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Disk::class, \Google\Cloud\Batch\V1\AllocationPolicy_Disk::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php new file mode 100644 index 000000000000..23e02e3a0f2f --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php @@ -0,0 +1,321 @@ +google.cloud.batch.v1.AllocationPolicy.InstancePolicy + */ +class InstancePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 2; + */ + protected $machine_type = ''; + /** + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * + * Generated from protobuf field string min_cpu_platform = 3; + */ + protected $min_cpu_platform = ''; + /** + * The provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; + */ + protected $provisioning_model = 0; + /** + * The accelerators attached to each VM instance. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; + */ + private $accelerators; + /** + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; + */ + protected $boot_disk = null; + /** + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; + */ + private $disks; + /** + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * + * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reservation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * The Compute Engine machine type. + * @type string $min_cpu_platform + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * @type int $provisioning_model + * The provisioning model. + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $accelerators + * The accelerators attached to each VM instance. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $disks + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * @type string $reservation + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 2; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 2; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * + * Generated from protobuf field string min_cpu_platform = 3; + * @return string + */ + public function getMinCpuPlatform() + { + return $this->min_cpu_platform; + } + + /** + * The minimum CPU platform. + * See + * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + * + * Generated from protobuf field string min_cpu_platform = 3; + * @param string $var + * @return $this + */ + public function setMinCpuPlatform($var) + { + GPBUtil::checkString($var, True); + $this->min_cpu_platform = $var; + + return $this; + } + + /** + * The provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; + * @return int + */ + public function getProvisioningModel() + { + return $this->provisioning_model; + } + + /** + * The provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; + * @param int $var + * @return $this + */ + public function setProvisioningModel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); + $this->provisioning_model = $var; + + return $this; + } + + /** + * The accelerators attached to each VM instance. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAccelerators() + { + return $this->accelerators; + } + + /** + * The accelerators attached to each VM instance. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAccelerators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\Accelerator::class); + $this->accelerators = $arr; + + return $this; + } + + /** + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null + */ + public function getBootDisk() + { + return $this->boot_disk; + } + + public function hasBootDisk() + { + return isset($this->boot_disk); + } + + public function clearBootDisk() + { + unset($this->boot_disk); + } + + /** + * Boot disk to be created and attached to each VM by this InstancePolicy. + * Boot disk will be deleted when the VM is deleted. + * Batch API now only supports booting from image. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var + * @return $this + */ + public function setBootDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); + $this->boot_disk = $var; + + return $this; + } + + /** + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Non-boot disks to be attached for each VM created by this InstancePolicy. + * New disks will be deleted when the VM is deleted. + * A non-boot disk is a disk that can be of a device with a + * file system or a raw storage drive that is not ready for data + * storage and accessing. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk::class); + $this->disks = $arr; + + return $this; + } + + /** + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * + * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReservation() + { + return $this->reservation; + } + + /** + * Optional. If specified, VMs will consume only the specified reservation. + * If not specified (default), VMs will consume any applicable reservation. + * + * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReservation($var) + { + GPBUtil::checkString($var, True); + $this->reservation = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstancePolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php new file mode 100644 index 000000000000..1946698543b7 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php @@ -0,0 +1,224 @@ +google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate + */ +class InstancePolicyOrTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * + * Generated from protobuf field bool install_gpu_drivers = 3; + */ + protected $install_gpu_drivers = false; + /** + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * + * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $install_ops_agent = false; + protected $policy_template; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $policy + * InstancePolicy. + * @type string $instance_template + * Name of an instance template used to create VMs. + * Named the field as 'instance_template' instead of 'template' to avoid + * c++ keyword conflict. + * @type bool $install_gpu_drivers + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * @type bool $install_ops_agent + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * InstancePolicy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy|null + */ + public function getPolicy() + { + return $this->readOneof(1); + } + + public function hasPolicy() + { + return $this->hasOneof(1); + } + + /** + * InstancePolicy. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Name of an instance template used to create VMs. + * Named the field as 'instance_template' instead of 'template' to avoid + * c++ keyword conflict. + * + * Generated from protobuf field string instance_template = 2; + * @return string + */ + public function getInstanceTemplate() + { + return $this->readOneof(2); + } + + public function hasInstanceTemplate() + { + return $this->hasOneof(2); + } + + /** + * Name of an instance template used to create VMs. + * Named the field as 'instance_template' instead of 'template' to avoid + * c++ keyword conflict. + * + * Generated from protobuf field string instance_template = 2; + * @param string $var + * @return $this + */ + public function setInstanceTemplate($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * + * Generated from protobuf field bool install_gpu_drivers = 3; + * @return bool + */ + public function getInstallGpuDrivers() + { + return $this->install_gpu_drivers; + } + + /** + * Set this field true if you want Batch to help fetch drivers from a third + * party location and install them for GPUs specified in + * `policy.accelerators` or `instance_template` on your behalf. Default is + * false. + * For Container-Optimized Image cases, Batch will install the + * accelerator driver following milestones of + * https://cloud.google.com/container-optimized-os/docs/release-notes. For + * non Container-Optimized Image cases, following + * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + * + * Generated from protobuf field bool install_gpu_drivers = 3; + * @param bool $var + * @return $this + */ + public function setInstallGpuDrivers($var) + { + GPBUtil::checkBool($var); + $this->install_gpu_drivers = $var; + + return $this; + } + + /** + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * + * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getInstallOpsAgent() + { + return $this->install_ops_agent; + } + + /** + * Optional. Set this field true if you want Batch to install Ops Agent on + * your behalf. Default is false. + * + * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setInstallOpsAgent($var) + { + GPBUtil::checkBool($var); + $this->install_ops_agent = $var; + + return $this; + } + + /** + * @return string + */ + public function getPolicyTemplate() + { + return $this->whichOneof("policy_template"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstancePolicyOrTemplate::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicyOrTemplate::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php new file mode 100644 index 000000000000..cb5fbeb79a66 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php @@ -0,0 +1,112 @@ +google.cloud.batch.v1.AllocationPolicy.LocationPolicy + */ +class LocationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * + * Generated from protobuf field repeated string allowed_locations = 1; + */ + private $allowed_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_locations + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * + * Generated from protobuf field repeated string allowed_locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedLocations() + { + return $this->allowed_locations; + } + + /** + * A list of allowed location names represented by internal URLs. + * Each location can be a region or a zone. + * Only one region or multiple zones in one region is supported now. + * For example, + * ["regions/us-central1"] allow VMs in any zones in region us-central1. + * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + * in zones us-central1-a and us-central1-c. + * Mixing locations from different regions would cause errors. + * For example, + * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. + * + * Generated from protobuf field repeated string allowed_locations = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_locations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LocationPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_LocationPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php new file mode 100644 index 000000000000..1c4b064ed7e0 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php @@ -0,0 +1,202 @@ +google.cloud.batch.v1.AllocationPolicy.NetworkInterface + */ +class NetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * + * Generated from protobuf field string subnetwork = 2; + */ + protected $subnetwork = ''; + /** + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * + * Generated from protobuf field bool no_external_ip_address = 3; + */ + protected $no_external_ip_address = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * @type string $subnetwork + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * @type bool $no_external_ip_address + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The URL of an existing network resource. + * You can specify the network as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + * * projects/{project}/global/networks/{network} + * * global/networks/{network} + * + * Generated from protobuf field string network = 1; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * + * Generated from protobuf field string subnetwork = 2; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * The URL of an existing subnetwork resource in the network. + * You can specify the subnetwork as a full or partial URL. + * For example, the following are all valid URLs: + * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * projects/{project}/regions/{region}/subnetworks/{subnetwork} + * * regions/{region}/subnetworks/{subnetwork} + * + * Generated from protobuf field string subnetwork = 2; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * + * Generated from protobuf field bool no_external_ip_address = 3; + * @return bool + */ + public function getNoExternalIpAddress() + { + return $this->no_external_ip_address; + } + + /** + * Default is false (with an external IP address). Required if + * no external public IP address is attached to the VM. If no external + * public IP address, additional configuration is required to allow the VM + * to access Google Services. See + * https://cloud.google.com/vpc/docs/configure-private-google-access and + * https://cloud.google.com/nat/docs/gce-example#create-nat for more + * information. + * + * Generated from protobuf field bool no_external_ip_address = 3; + * @param bool $var + * @return $this + */ + public function setNoExternalIpAddress($var) + { + GPBUtil::checkBool($var); + $this->no_external_ip_address = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkInterface::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkInterface::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php new file mode 100644 index 000000000000..f402f3e8e3d2 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php @@ -0,0 +1,70 @@ +google.cloud.batch.v1.AllocationPolicy.NetworkPolicy + */ +class NetworkPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Network configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; + */ + private $network_interfaces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * Network configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Network configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * Network configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; + * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php new file mode 100644 index 000000000000..2b9777719d46 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php @@ -0,0 +1,133 @@ +google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + */ +class PlacementPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * + * Generated from protobuf field string collocation = 1; + */ + protected $collocation = ''; + /** + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * + * Generated from protobuf field int64 max_distance = 2; + */ + protected $max_distance = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $collocation + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * @type int|string $max_distance + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * + * Generated from protobuf field string collocation = 1; + * @return string + */ + public function getCollocation() + { + return $this->collocation; + } + + /** + * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + * want VMs to be located close to each other for low network latency + * between the VMs. No placement policy will be generated when collocation + * is UNSPECIFIED. + * + * Generated from protobuf field string collocation = 1; + * @param string $var + * @return $this + */ + public function setCollocation($var) + { + GPBUtil::checkString($var, True); + $this->collocation = $var; + + return $this; + } + + /** + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * + * Generated from protobuf field int64 max_distance = 2; + * @return int|string + */ + public function getMaxDistance() + { + return $this->max_distance; + } + + /** + * When specified, causes the job to fail if more than max_distance logical + * switches are required between VMs. Batch uses the most compact possible + * placement of VMs even when max_distance is not specified. An explicit + * max_distance makes that level of compactness a strict requirement. + * Not yet implemented + * + * Generated from protobuf field int64 max_distance = 2; + * @param int|string $var + * @return $this + */ + public function setMaxDistance($var) + { + GPBUtil::checkInt64($var); + $this->max_distance = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PlacementPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_PlacementPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php new file mode 100644 index 000000000000..62a6191c61cb --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php @@ -0,0 +1,75 @@ +google.cloud.batch.v1.AllocationPolicy.ProvisioningModel + */ +class ProvisioningModel +{ + /** + * Unspecified. + * + * Generated from protobuf enum PROVISIONING_MODEL_UNSPECIFIED = 0; + */ + const PROVISIONING_MODEL_UNSPECIFIED = 0; + /** + * Standard VM. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * SPOT VM. + * + * Generated from protobuf enum SPOT = 2; + */ + const SPOT = 2; + /** + * Preemptible VM (PVM). + * Above SPOT VM is the preferable model for preemptible VM instances: the + * old preemptible VM model (indicated by this field) is the older model, + * and has been migrated to use the SPOT model as the underlying technology. + * This old model will still be supported. + * + * Generated from protobuf enum PREEMPTIBLE = 3; + */ + const PREEMPTIBLE = 3; + + private static $valueToName = [ + self::PROVISIONING_MODEL_UNSPECIFIED => 'PROVISIONING_MODEL_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::SPOT => 'SPOT', + self::PREEMPTIBLE => 'PREEMPTIBLE', + ]; + + 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(ProvisioningModel::class, \Google\Cloud\Batch\V1\AllocationPolicy_ProvisioningModel::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php new file mode 100644 index 000000000000..71cfcd4d50f6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php @@ -0,0 +1,248 @@ +google.cloud.batch.v1.ComputeResource + */ +class ComputeResource extends \Google\Protobuf\Internal\Message +{ + /** + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * + * Generated from protobuf field int64 cpu_milli = 1; + */ + protected $cpu_milli = 0; + /** + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * + * Generated from protobuf field int64 memory_mib = 2; + */ + protected $memory_mib = 0; + /** + * Extra boot disk size in MiB for each task. + * + * Generated from protobuf field int64 boot_disk_mib = 4; + */ + protected $boot_disk_mib = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $cpu_milli + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * @type int|string $memory_mib + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * @type int|string $boot_disk_mib + * Extra boot disk size in MiB for each task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * + * Generated from protobuf field int64 cpu_milli = 1; + * @return int|string + */ + public function getCpuMilli() + { + return $this->cpu_milli; + } + + /** + * The milliCPU count. + * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + * For example, `1000` corresponds to 1 vCPU per task. If undefined, the + * default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the CPU resources for both fields are compatible with each + * other and with how many tasks you want to allow to run on the same VM at + * the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 2 + * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + * you are recommended to run two tasks on the same VM if you set `cpuMilli` + * to `1000` or less. + * + * Generated from protobuf field int64 cpu_milli = 1; + * @param int|string $var + * @return $this + */ + public function setCpuMilli($var) + { + GPBUtil::checkInt64($var); + $this->cpu_milli = $var; + + return $this; + } + + /** + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * + * Generated from protobuf field int64 memory_mib = 2; + * @return int|string + */ + public function getMemoryMib() + { + return $this->memory_mib; + } + + /** + * Memory in MiB. + * `memoryMib` defines the amount of memory per task in MiB units. + * If undefined, the default value is `2000`. + * If you also define the VM's machine type using the `machineType` in + * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + * field or inside the `instanceTemplate` in the + * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + * field, make sure the memory resources for both fields are compatible with + * each other and with how many tasks you want to allow to run on the same VM + * at the same time. + * For example, if you specify the `n2-standard-2` machine type, which has 8 + * GiB each, you are recommended to set `memoryMib` to no more than `8192`, + * or you are recommended to run two tasks on the same VM if you set + * `memoryMib` to `4096` or less. + * + * Generated from protobuf field int64 memory_mib = 2; + * @param int|string $var + * @return $this + */ + public function setMemoryMib($var) + { + GPBUtil::checkInt64($var); + $this->memory_mib = $var; + + return $this; + } + + /** + * Extra boot disk size in MiB for each task. + * + * Generated from protobuf field int64 boot_disk_mib = 4; + * @return int|string + */ + public function getBootDiskMib() + { + return $this->boot_disk_mib; + } + + /** + * Extra boot disk size in MiB for each task. + * + * Generated from protobuf field int64 boot_disk_mib = 4; + * @param int|string $var + * @return $this + */ + public function setBootDiskMib($var) + { + GPBUtil::checkInt64($var); + $this->boot_disk_mib = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php new file mode 100644 index 000000000000..fdec8fae5402 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php @@ -0,0 +1,278 @@ +google.cloud.batch.v1.CreateJobRequest + */ +class CreateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * Generated from protobuf field string job_id = 2; + */ + protected $job_id = ''; + /** + * Required. The Job to create. + * + * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * Please see {@see BatchServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Batch\V1\Job $job Required. The Job to create. + * @param string $jobId ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * @return \Google\Cloud\Batch\V1\CreateJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Batch\V1\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 parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * @type string $job_id + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * @type \Google\Cloud\Batch\V1\Job $job + * Required. The Job to create. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * + * 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 parent resource name where the Job will be created. + * Pattern: "projects/{project}/locations/{location}" + * + * 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; + } + + /** + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * Generated from protobuf field string job_id = 2; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * ID used to uniquely identify the Job within its parent scope. + * This field should contain at most 63 characters and must start with + * lowercase characters. + * Only lowercase characters, numbers and '-' are accepted. + * The '-' character cannot be the first or the last one. + * A system generated ID will be used if the field is not set. + * The job.name field in the request will be ignored and the created resource + * name of the Job will be "{parent}/jobs/{job_id}". + * + * Generated from protobuf field string job_id = 2; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * Required. The Job to create. + * + * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Batch\V1\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 create. + * + * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Batch\V1\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Job::class); + $this->job = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php new file mode 100644 index 000000000000..0acc2dfbbac6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php @@ -0,0 +1,188 @@ +google.cloud.batch.v1.DeleteJobRequest + */ +class DeleteJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Job name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. Reason for this deletion. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reason = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Job name. + * + * @return \Google\Cloud\Batch\V1\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 + * Job name. + * @type string $reason + * Optional. Reason for this deletion. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Job name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Job name. + * + * 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. Reason for this deletion. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Optional. Reason for this deletion. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php new file mode 100644 index 000000000000..058a8d4ccc90 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php @@ -0,0 +1,158 @@ +google.cloud.batch.v1.Environment + */ +class Environment extends \Google\Protobuf\Internal\Message +{ + /** + * A map of environment variable names to values. + * + * Generated from protobuf field map variables = 1; + */ + private $variables; + /** + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * + * Generated from protobuf field map secret_variables = 2; + */ + private $secret_variables; + /** + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; + */ + protected $encrypted_variables = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $variables + * A map of environment variable names to values. + * @type array|\Google\Protobuf\Internal\MapField $secret_variables + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * @type \Google\Cloud\Batch\V1\Environment\KMSEnvMap $encrypted_variables + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * A map of environment variable names to values. + * + * Generated from protobuf field map variables = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVariables() + { + return $this->variables; + } + + /** + * A map of environment variable names to values. + * + * Generated from protobuf field map variables = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->variables = $arr; + + return $this; + } + + /** + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * + * Generated from protobuf field map secret_variables = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSecretVariables() + { + return $this->secret_variables; + } + + /** + * A map of environment variable names to Secret Manager secret names. + * The VM will access the named secrets to set the value of each environment + * variable. + * + * Generated from protobuf field map secret_variables = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSecretVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->secret_variables = $arr; + + return $this; + } + + /** + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; + * @return \Google\Cloud\Batch\V1\Environment\KMSEnvMap|null + */ + public function getEncryptedVariables() + { + return $this->encrypted_variables; + } + + public function hasEncryptedVariables() + { + return isset($this->encrypted_variables); + } + + public function clearEncryptedVariables() + { + unset($this->encrypted_variables); + } + + /** + * An encrypted JSON dictionary where the key/value pairs correspond to + * environment variable names and their values. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; + * @param \Google\Cloud\Batch\V1\Environment\KMSEnvMap $var + * @return $this + */ + public function setEncryptedVariables($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment\KMSEnvMap::class); + $this->encrypted_variables = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php new file mode 100644 index 000000000000..91b995831e11 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php @@ -0,0 +1,102 @@ +google.cloud.batch.v1.Environment.KMSEnvMap + */ +class KMSEnvMap extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the KMS key that will be used to decrypt the cipher text. + * + * Generated from protobuf field string key_name = 1; + */ + protected $key_name = ''; + /** + * The value of the cipherText response from the `encrypt` method. + * + * Generated from protobuf field string cipher_text = 2; + */ + protected $cipher_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_name + * The name of the KMS key that will be used to decrypt the cipher text. + * @type string $cipher_text + * The value of the cipherText response from the `encrypt` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The name of the KMS key that will be used to decrypt the cipher text. + * + * Generated from protobuf field string key_name = 1; + * @return string + */ + public function getKeyName() + { + return $this->key_name; + } + + /** + * The name of the KMS key that will be used to decrypt the cipher text. + * + * Generated from protobuf field string key_name = 1; + * @param string $var + * @return $this + */ + public function setKeyName($var) + { + GPBUtil::checkString($var, True); + $this->key_name = $var; + + return $this; + } + + /** + * The value of the cipherText response from the `encrypt` method. + * + * Generated from protobuf field string cipher_text = 2; + * @return string + */ + public function getCipherText() + { + return $this->cipher_text; + } + + /** + * The value of the cipherText response from the `encrypt` method. + * + * Generated from protobuf field string cipher_text = 2; + * @param string $var + * @return $this + */ + public function setCipherText($var) + { + GPBUtil::checkString($var, True); + $this->cipher_text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KMSEnvMap::class, \Google\Cloud\Batch\V1\Environment_KMSEnvMap::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php new file mode 100644 index 000000000000..af7bffd938ba --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php @@ -0,0 +1,71 @@ +google.cloud.batch.v1.GCS + */ +class GCS extends \Google\Protobuf\Internal\Message +{ + /** + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * + * Generated from protobuf field string remote_path = 1; + */ + protected $remote_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $remote_path + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * + * Generated from protobuf field string remote_path = 1; + * @return string + */ + public function getRemotePath() + { + return $this->remote_path; + } + + /** + * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + * bucket_name, bucket_name/subdirectory/ + * + * Generated from protobuf field string remote_path = 1; + * @param string $var + * @return $this + */ + public function setRemotePath($var) + { + GPBUtil::checkString($var, True); + $this->remote_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php new file mode 100644 index 000000000000..ae27090d4139 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.batch.v1.GetJobRequest + */ +class GetJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Job name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Job name. Please see + * {@see BatchServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Batch\V1\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. Job name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. Job name. + * + * 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. Job 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php new file mode 100644 index 000000000000..6271a4460bce --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php @@ -0,0 +1,81 @@ +google.cloud.batch.v1.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Task name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Task name. Please see + * {@see BatchServiceClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Batch\V1\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. Task name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. Task name. + * + * 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. Task 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php new file mode 100644 index 000000000000..6c7254f33660 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php @@ -0,0 +1,513 @@ +google.cloud.batch.v1.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. A system generated unique ID for the Job. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * + * Generated from protobuf field int64 priority = 3; + */ + protected $priority = 0; + /** + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $task_groups; + /** + * Compute resource allocation for all TaskGroups in the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; + */ + protected $allocation_policy = null; + /** + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 8; + */ + private $labels; + /** + * Output only. Job status. It is read only for users. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Output only. When the Job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the Job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Log preservation policy for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; + */ + protected $logs_policy = null; + /** + * Notification configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; + */ + private $notifications; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * @type string $uid + * Output only. A system generated unique ID for the Job. + * @type int|string $priority + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * @type array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $task_groups + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * @type \Google\Cloud\Batch\V1\AllocationPolicy $allocation_policy + * Compute resource allocation for all TaskGroups in the Job. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * @type \Google\Cloud\Batch\V1\JobStatus $status + * Output only. Job status. It is read only for users. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the Job was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the Job was updated. + * @type \Google\Cloud\Batch\V1\LogsPolicy $logs_policy + * Log preservation policy for the Job. + * @type array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $notifications + * Notification configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Job name. + * For example: "projects/123456/locations/us-central1/jobs/job01". + * + * 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. A system generated unique ID for the Job. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. A system generated unique ID for the Job. + * + * 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; + } + + /** + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * + * Generated from protobuf field int64 priority = 3; + * @return int|string + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Priority of the Job. + * The valid value range is [0, 100). Default value is 0. + * Higher value indicates higher priority. + * A job with higher priority value is more likely to run earlier if all other + * requirements are satisfied. + * + * Generated from protobuf field int64 priority = 3; + * @param int|string $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt64($var); + $this->priority = $var; + + return $this; + } + + /** + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaskGroups() + { + return $this->task_groups; + } + + /** + * Required. TaskGroups in the Job. Only one TaskGroup is supported now. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaskGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\TaskGroup::class); + $this->task_groups = $arr; + + return $this; + } + + /** + * Compute resource allocation for all TaskGroups in the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; + * @return \Google\Cloud\Batch\V1\AllocationPolicy|null + */ + public function getAllocationPolicy() + { + return $this->allocation_policy; + } + + public function hasAllocationPolicy() + { + return isset($this->allocation_policy); + } + + public function clearAllocationPolicy() + { + unset($this->allocation_policy); + } + + /** + * Compute resource allocation for all TaskGroups in the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; + * @param \Google\Cloud\Batch\V1\AllocationPolicy $var + * @return $this + */ + public function setAllocationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy::class); + $this->allocation_policy = $var; + + return $this; + } + + /** + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for the Job. Labels could be user provided or system generated. + * For example, + * "labels": { + * "department": "finance", + * "environment": "test" + * } + * You can assign up to 64 labels. [Google Compute Engine label + * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + * apply. + * Label names that start with "goog-" or "google-" are reserved. + * + * Generated from protobuf field map labels = 8; + * @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. Job status. It is read only for users. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Batch\V1\JobStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. Job status. It is read only for users. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Batch\V1\JobStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. When the Job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. When the Job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 time the Job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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 time the Job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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; + } + + /** + * Log preservation policy for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; + * @return \Google\Cloud\Batch\V1\LogsPolicy|null + */ + public function getLogsPolicy() + { + return $this->logs_policy; + } + + public function hasLogsPolicy() + { + return isset($this->logs_policy); + } + + public function clearLogsPolicy() + { + unset($this->logs_policy); + } + + /** + * Log preservation policy for the Job. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; + * @param \Google\Cloud\Batch\V1\LogsPolicy $var + * @return $this + */ + public function setLogsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy::class); + $this->logs_policy = $var; + + return $this; + } + + /** + * Notification configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotifications() + { + return $this->notifications; + } + + /** + * Notification configurations. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; + * @param array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobNotification::class); + $this->notifications = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php new file mode 100644 index 000000000000..a84bc5653ad3 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php @@ -0,0 +1,155 @@ +google.cloud.batch.v1.JobNotification + */ +class JobNotification extends \Google\Protobuf\Internal\Message +{ + /** + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * + * Generated from protobuf field string pubsub_topic = 1; + */ + protected $pubsub_topic = ''; + /** + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; + */ + protected $message = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pubsub_topic + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * @type \Google\Cloud\Batch\V1\JobNotification\Message $message + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * + * Generated from protobuf field string pubsub_topic = 1; + * @return string + */ + public function getPubsubTopic() + { + return $this->pubsub_topic; + } + + /** + * The Pub/Sub topic where notifications for the job, like state + * changes, will be published. If undefined, no Pub/Sub notifications + * are sent for this job. + * Specify the topic using the following format: + * `projects/{project}/topics/{topic}`. + * Notably, if you want to specify a Pub/Sub topic that is in a + * different project than the job, your administrator must grant your + * project's Batch service agent permission to publish to that topic. + * For more information about configuring Pub/Sub notifications for + * a job, see + * https://cloud.google.com/batch/docs/enable-notifications. + * + * Generated from protobuf field string pubsub_topic = 1; + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic = $var; + + return $this; + } + + /** + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; + * @return \Google\Cloud\Batch\V1\JobNotification\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * The attribute requirements of messages to be sent to this Pub/Sub topic. + * Without this field, no message will be sent. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; + * @param \Google\Cloud\Batch\V1\JobNotification\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobNotification\Message::class); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php new file mode 100644 index 000000000000..2dc572817132 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php @@ -0,0 +1,144 @@ +google.cloud.batch.v1.JobNotification.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * The message type. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; + */ + protected $type = 0; + /** + * The new job state. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; + */ + protected $new_job_state = 0; + /** + * The new task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; + */ + protected $new_task_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The message type. + * @type int $new_job_state + * The new job state. + * @type int $new_task_state + * The new task state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The message type. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The message type. + * + * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobNotification\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The new job state. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; + * @return int + */ + public function getNewJobState() + { + return $this->new_job_state; + } + + /** + * The new job state. + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; + * @param int $var + * @return $this + */ + public function setNewJobState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); + $this->new_job_state = $var; + + return $this; + } + + /** + * The new task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; + * @return int + */ + public function getNewTaskState() + { + return $this->new_task_state; + } + + /** + * The new task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; + * @param int $var + * @return $this + */ + public function setNewTaskState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); + $this->new_task_state = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Message::class, \Google\Cloud\Batch\V1\JobNotification_Message::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php new file mode 100644 index 000000000000..28ccf868f4c0 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php @@ -0,0 +1,64 @@ +google.cloud.batch.v1.JobNotification.Type + */ +class Type +{ + /** + * Unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Notify users that the job state has changed. + * + * Generated from protobuf enum JOB_STATE_CHANGED = 1; + */ + const JOB_STATE_CHANGED = 1; + /** + * Notify users that the task state has changed. + * + * Generated from protobuf enum TASK_STATE_CHANGED = 2; + */ + const TASK_STATE_CHANGED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::JOB_STATE_CHANGED => 'JOB_STATE_CHANGED', + self::TASK_STATE_CHANGED => 'TASK_STATE_CHANGED', + ]; + + 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(Type::class, \Google\Cloud\Batch\V1\JobNotification_Type::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php new file mode 100644 index 000000000000..44e61d9713b6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php @@ -0,0 +1,183 @@ +google.cloud.batch.v1.JobStatus + */ +class JobStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Job state + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; + */ + protected $state = 0; + /** + * Job status events + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + */ + private $status_events; + /** + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * + * Generated from protobuf field map task_groups = 4; + */ + private $task_groups; + /** + * The duration of time that the Job spent in status RUNNING. + * + * Generated from protobuf field .google.protobuf.Duration run_duration = 5; + */ + protected $run_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Job state + * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events + * Job status events + * @type array|\Google\Protobuf\Internal\MapField $task_groups + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * @type \Google\Protobuf\Duration $run_duration + * The duration of time that the Job spent in status RUNNING. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Job state + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Job state + * + * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Job status events + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatusEvents() + { + return $this->status_events; + } + + /** + * Job status events + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatusEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); + $this->status_events = $arr; + + return $this; + } + + /** + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * + * Generated from protobuf field map task_groups = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTaskGroups() + { + return $this->task_groups; + } + + /** + * Aggregated task status for each TaskGroup in the Job. + * The map key is TaskGroup ID. + * + * Generated from protobuf field map task_groups = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTaskGroups($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\TaskGroupStatus::class); + $this->task_groups = $arr; + + return $this; + } + + /** + * The duration of time that the Job spent in status RUNNING. + * + * Generated from protobuf field .google.protobuf.Duration run_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getRunDuration() + { + return $this->run_duration; + } + + public function hasRunDuration() + { + return isset($this->run_duration); + } + + public function clearRunDuration() + { + unset($this->run_duration); + } + + /** + * The duration of time that the Job spent in status RUNNING. + * + * Generated from protobuf field .google.protobuf.Duration run_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRunDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->run_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php new file mode 100644 index 000000000000..4073a44ab3bc --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php @@ -0,0 +1,182 @@ +google.cloud.batch.v1.JobStatus.InstanceStatus + */ +class InstanceStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 1; + */ + protected $machine_type = ''; + /** + * The VM instance provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; + */ + protected $provisioning_model = 0; + /** + * The max number of tasks can be assigned to this instance type. + * + * Generated from protobuf field int64 task_pack = 3; + */ + protected $task_pack = 0; + /** + * The VM boot disk. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; + */ + protected $boot_disk = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * The Compute Engine machine type. + * @type int $provisioning_model + * The VM instance provisioning model. + * @type int|string $task_pack + * The max number of tasks can be assigned to this instance type. + * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk + * The VM boot disk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 1; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 1; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * The VM instance provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; + * @return int + */ + public function getProvisioningModel() + { + return $this->provisioning_model; + } + + /** + * The VM instance provisioning model. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; + * @param int $var + * @return $this + */ + public function setProvisioningModel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); + $this->provisioning_model = $var; + + return $this; + } + + /** + * The max number of tasks can be assigned to this instance type. + * + * Generated from protobuf field int64 task_pack = 3; + * @return int|string + */ + public function getTaskPack() + { + return $this->task_pack; + } + + /** + * The max number of tasks can be assigned to this instance type. + * + * Generated from protobuf field int64 task_pack = 3; + * @param int|string $var + * @return $this + */ + public function setTaskPack($var) + { + GPBUtil::checkInt64($var); + $this->task_pack = $var; + + return $this; + } + + /** + * The VM boot disk. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; + * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null + */ + public function getBootDisk() + { + return $this->boot_disk; + } + + public function hasBootDisk() + { + return isset($this->boot_disk); + } + + public function clearBootDisk() + { + unset($this->boot_disk); + } + + /** + * The VM boot disk. + * + * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; + * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var + * @return $this + */ + public function setBootDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); + $this->boot_disk = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstanceStatus::class, \Google\Cloud\Batch\V1\JobStatus_InstanceStatus::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php new file mode 100644 index 000000000000..88b1b714c63f --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php @@ -0,0 +1,96 @@ +google.cloud.batch.v1.JobStatus.State + */ +class State +{ + /** + * Job state unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Job is admitted (validated and persisted) and waiting for resources. + * + * Generated from protobuf enum QUEUED = 1; + */ + const QUEUED = 1; + /** + * Job is scheduled to run as soon as resource allocation is ready. + * The resource allocation may happen at a later time but with a high + * chance to succeed. + * + * Generated from protobuf enum SCHEDULED = 2; + */ + const SCHEDULED = 2; + /** + * Resource allocation has been successful. At least one Task in the Job is + * RUNNING. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * All Tasks in the Job have finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * At least one Task in the Job has failed. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The Job will be deleted, but has not been deleted yet. Typically this is + * because resources used by the Job are still being cleaned up. + * + * Generated from protobuf enum DELETION_IN_PROGRESS = 6; + */ + const DELETION_IN_PROGRESS = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::QUEUED => 'QUEUED', + self::SCHEDULED => 'SCHEDULED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::DELETION_IN_PROGRESS => 'DELETION_IN_PROGRESS', + ]; + + 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\Batch\V1\JobStatus_State::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php new file mode 100644 index 000000000000..54e870456e18 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php @@ -0,0 +1,108 @@ +google.cloud.batch.v1.JobStatus.TaskGroupStatus + */ +class TaskGroupStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * + * Generated from protobuf field map counts = 1; + */ + private $counts; + /** + * Status of instances allocated for the TaskGroup. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $counts + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * @type array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $instances + * Status of instances allocated for the TaskGroup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * + * Generated from protobuf field map counts = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCounts() + { + return $this->counts; + } + + /** + * Count of task in each state in the TaskGroup. + * The map key is task state name. + * + * Generated from protobuf field map counts = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCounts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); + $this->counts = $arr; + + return $this; + } + + /** + * Status of instances allocated for the TaskGroup. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Status of instances allocated for the TaskGroup. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; + * @param array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\InstanceStatus::class); + $this->instances = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TaskGroupStatus::class, \Google\Cloud\Batch\V1\JobStatus_TaskGroupStatus::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php new file mode 100644 index 000000000000..50bf332faf2d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php @@ -0,0 +1,128 @@ +google.cloud.batch.v1.LifecyclePolicy + */ +class LifecyclePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; + */ + protected $action = 0; + /** + * Conditions that decide why a task failure is dealt with a specific action. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; + */ + protected $action_condition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $action + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * @type \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $action_condition + * Conditions that decide why a task failure is dealt with a specific action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Action to execute when ActionCondition is true. + * When RETRY_TASK is specified, we will retry failed tasks + * if we notice any exit code match and fail tasks if no match is found. + * Likewise, when FAIL_TASK is specified, we will fail tasks + * if we notice any exit code match and retry tasks if no match is found. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LifecyclePolicy\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Conditions that decide why a task failure is dealt with a specific action. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; + * @return \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition|null + */ + public function getActionCondition() + { + return $this->action_condition; + } + + public function hasActionCondition() + { + return isset($this->action_condition); + } + + public function clearActionCondition() + { + unset($this->action_condition); + } + + /** + * Conditions that decide why a task failure is dealt with a specific action. + * + * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; + * @param \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $var + * @return $this + */ + public function setActionCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition::class); + $this->action_condition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php new file mode 100644 index 000000000000..08419071bb67 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php @@ -0,0 +1,64 @@ +google.cloud.batch.v1.LifecyclePolicy.Action + */ +class Action +{ + /** + * Action unspecified. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Action that tasks in the group will be scheduled to re-execute. + * + * Generated from protobuf enum RETRY_TASK = 1; + */ + const RETRY_TASK = 1; + /** + * Action that tasks in the group will be stopped immediately. + * + * Generated from protobuf enum FAIL_TASK = 2; + */ + const FAIL_TASK = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::RETRY_TASK => 'RETRY_TASK', + self::FAIL_TASK => 'FAIL_TASK', + ]; + + 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(Action::class, \Google\Cloud\Batch\V1\LifecyclePolicy_Action::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php new file mode 100644 index 000000000000..acffa97a9300 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php @@ -0,0 +1,82 @@ +google.cloud.batch.v1.LifecyclePolicy.ActionCondition + */ +class ActionCondition extends \Google\Protobuf\Internal\Message +{ + /** + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * + * Generated from protobuf field repeated int32 exit_codes = 1; + */ + private $exit_codes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $exit_codes + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * + * Generated from protobuf field repeated int32 exit_codes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExitCodes() + { + return $this->exit_codes; + } + + /** + * Exit codes of a task execution. + * If there are more than 1 exit codes, + * when task executes with any of the exit code in the list, + * the condition is met and the action will be executed. + * + * Generated from protobuf field repeated int32 exit_codes = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExitCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->exit_codes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ActionCondition::class, \Google\Cloud\Batch\V1\LifecyclePolicy_ActionCondition::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php new file mode 100644 index 000000000000..172ee92ea293 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php @@ -0,0 +1,220 @@ +google.cloud.batch.v1.ListJobsRequest + */ +class ListJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Parent path. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Parent path. + * + * @return \Google\Cloud\Batch\V1\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 + * Parent path. + * @type string $filter + * List filter. + * @type string $order_by + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * @type int $page_size + * Page size. + * @type string $page_token + * Page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Parent path. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Parent path. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort results. Supported are "name", "name desc", "create_time", + * and "create_time desc". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. + * + * 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; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php new file mode 100644 index 000000000000..9874dbeed530 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php @@ -0,0 +1,135 @@ +google.cloud.batch.v1.ListJobsResponse + */ +class ListJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Jobs. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; + */ + private $jobs; + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * Jobs. + * @type string $next_page_token + * Next page token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Jobs. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Jobs. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; + * @param array<\Google\Cloud\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @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/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php new file mode 100644 index 000000000000..bd42658dcae9 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php @@ -0,0 +1,201 @@ +google.cloud.batch.v1.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Page token. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * Please see {@see BatchServiceClient::taskGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Batch\V1\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. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * @type string $filter + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * @type int $page_size + * Page size. + * @type string $page_token + * Page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * + * 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. Name of a TaskGroup from which Tasks are being requested. + * Pattern: + * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + * + * 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; + } + + /** + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Task filter, null filter matches all Tasks. + * Filter string should be of the format State=TaskStatus.State e.g. + * State=RUNNING + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Page size. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php new file mode 100644 index 000000000000..7209c2e30a9f --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php @@ -0,0 +1,135 @@ +google.cloud.batch.v1.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Tasks. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; + */ + private $tasks; + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * Tasks. + * @type string $next_page_token + * Next page token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Tasks. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * Tasks. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; + * @param array<\Google\Cloud\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * Next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token. + * + * 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @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/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php new file mode 100644 index 000000000000..3815935a8403 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php @@ -0,0 +1,158 @@ +google.cloud.batch.v1.LogsPolicy + */ +class LogsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Where logs should be saved. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; + */ + protected $destination = 0; + /** + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * + * Generated from protobuf field string logs_path = 2; + */ + protected $logs_path = ''; + /** + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloud_logging_option = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $destination + * Where logs should be saved. + * @type string $logs_path + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * @type \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $cloud_logging_option + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Where logs should be saved. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; + * @return int + */ + public function getDestination() + { + return $this->destination; + } + + /** + * Where logs should be saved. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; + * @param int $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LogsPolicy\Destination::class); + $this->destination = $var; + + return $this; + } + + /** + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * + * Generated from protobuf field string logs_path = 2; + * @return string + */ + public function getLogsPath() + { + return $this->logs_path; + } + + /** + * The path to which logs are saved when the destination = PATH. This can be a + * local file path on the VM, or under the mount point of a Persistent Disk or + * Filestore, or a Cloud Storage path. + * + * Generated from protobuf field string logs_path = 2; + * @param string $var + * @return $this + */ + public function setLogsPath($var) + { + GPBUtil::checkString($var, True); + $this->logs_path = $var; + + return $this; + } + + /** + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption|null + */ + public function getCloudLoggingOption() + { + return $this->cloud_logging_option; + } + + public function hasCloudLoggingOption() + { + return isset($this->cloud_logging_option); + } + + public function clearCloudLoggingOption() + { + unset($this->cloud_logging_option); + } + + /** + * Optional. Additional settings for Cloud Logging. It will only take effect + * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + * + * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $var + * @return $this + */ + public function setCloudLoggingOption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption::class); + $this->cloud_logging_option = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php new file mode 100644 index 000000000000..6004643bec5a --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php @@ -0,0 +1,99 @@ +google.cloud.batch.v1.LogsPolicy.CloudLoggingOption + */ +class CloudLoggingOption extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * + * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_generic_task_monitored_resource = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_generic_task_monitored_resource + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * + * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseGenericTaskMonitoredResource() + { + return $this->use_generic_task_monitored_resource; + } + + /** + * Optional. Set this flag to true to change the [monitored resource + * type](https://cloud.google.com/monitoring/api/resources) for + * Cloud Logging logs generated by this Batch job from + * the + * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + * type to the formerly used + * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + * type. + * + * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseGenericTaskMonitoredResource($var) + { + GPBUtil::checkBool($var); + $this->use_generic_task_monitored_resource = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudLoggingOption::class, \Google\Cloud\Batch\V1\LogsPolicy_CloudLoggingOption::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php new file mode 100644 index 000000000000..1f87d09d632d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php @@ -0,0 +1,64 @@ +google.cloud.batch.v1.LogsPolicy.Destination + */ +class Destination +{ + /** + * Logs are not preserved. + * + * Generated from protobuf enum DESTINATION_UNSPECIFIED = 0; + */ + const DESTINATION_UNSPECIFIED = 0; + /** + * Logs are streamed to Cloud Logging. + * + * Generated from protobuf enum CLOUD_LOGGING = 1; + */ + const CLOUD_LOGGING = 1; + /** + * Logs are saved to a file path. + * + * Generated from protobuf enum PATH = 2; + */ + const PATH = 2; + + private static $valueToName = [ + self::DESTINATION_UNSPECIFIED => 'DESTINATION_UNSPECIFIED', + self::CLOUD_LOGGING => 'CLOUD_LOGGING', + self::PATH => 'PATH', + ]; + + 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(Destination::class, \Google\Cloud\Batch\V1\LogsPolicy_Destination::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php new file mode 100644 index 000000000000..b4c6e4bb1506 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php @@ -0,0 +1,101 @@ +google.cloud.batch.v1.NFS + */ +class NFS extends \Google\Protobuf\Internal\Message +{ + /** + * The IP address of the NFS. + * + * Generated from protobuf field string server = 1; + */ + protected $server = ''; + /** + * Remote source path exported from the NFS, e.g., "/share". + * + * Generated from protobuf field string remote_path = 2; + */ + protected $remote_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $server + * The IP address of the NFS. + * @type string $remote_path + * Remote source path exported from the NFS, e.g., "/share". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The IP address of the NFS. + * + * Generated from protobuf field string server = 1; + * @return string + */ + public function getServer() + { + return $this->server; + } + + /** + * The IP address of the NFS. + * + * 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; + } + + /** + * Remote source path exported from the NFS, e.g., "/share". + * + * Generated from protobuf field string remote_path = 2; + * @return string + */ + public function getRemotePath() + { + return $this->remote_path; + } + + /** + * Remote source path exported from the NFS, e.g., "/share". + * + * Generated from protobuf field string remote_path = 2; + * @param string $var + * @return $this + */ + public function setRemotePath($var) + { + GPBUtil::checkString($var, True); + $this->remote_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php new file mode 100644 index 000000000000..6a98d039d45c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.batch.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php new file mode 100644 index 000000000000..90befbe91d56 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php @@ -0,0 +1,452 @@ +google.cloud.batch.v1.Runnable + */ +class Runnable extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Normally, a non-zero exit status causes the Task to fail. This flag allows + * execution of other Runnables to continue instead. + * + * Generated from protobuf field bool ignore_exit_status = 3; + */ + protected $ignore_exit_status = false; + /** + * This flag allows a Runnable to continue running in the background while the + * Task executes subsequent Runnables. This is useful to provide services to + * other Runnables (or to provide debugging support tools like SSH servers). + * + * Generated from protobuf field bool background = 4; + */ + protected $background = false; + /** + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * + * Generated from protobuf field bool always_run = 5; + */ + protected $always_run = false; + /** + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; + */ + protected $environment = null; + /** + * Timeout for this Runnable. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + */ + protected $timeout = null; + /** + * Labels for this Runnable. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + protected $executable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\Runnable\Container $container + * Container runnable. + * @type \Google\Cloud\Batch\V1\Runnable\Script $script + * Script runnable. + * @type \Google\Cloud\Batch\V1\Runnable\Barrier $barrier + * Barrier runnable. + * @type string $display_name + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * @type bool $ignore_exit_status + * Normally, a non-zero exit status causes the Task to fail. This flag allows + * execution of other Runnables to continue instead. + * @type bool $background + * This flag allows a Runnable to continue running in the background while the + * Task executes subsequent Runnables. This is useful to provide services to + * other Runnables (or to provide debugging support tools like SSH servers). + * @type bool $always_run + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * @type \Google\Cloud\Batch\V1\Environment $environment + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * @type \Google\Protobuf\Duration $timeout + * Timeout for this Runnable. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for this Runnable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Container runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; + * @return \Google\Cloud\Batch\V1\Runnable\Container|null + */ + public function getContainer() + { + return $this->readOneof(1); + } + + public function hasContainer() + { + return $this->hasOneof(1); + } + + /** + * Container runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; + * @param \Google\Cloud\Batch\V1\Runnable\Container $var + * @return $this + */ + public function setContainer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Container::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Script runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; + * @return \Google\Cloud\Batch\V1\Runnable\Script|null + */ + public function getScript() + { + return $this->readOneof(2); + } + + public function hasScript() + { + return $this->hasOneof(2); + } + + /** + * Script runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; + * @param \Google\Cloud\Batch\V1\Runnable\Script $var + * @return $this + */ + public function setScript($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Script::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Barrier runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; + * @return \Google\Cloud\Batch\V1\Runnable\Barrier|null + */ + public function getBarrier() + { + return $this->readOneof(6); + } + + public function hasBarrier() + { + return $this->hasOneof(6); + } + + /** + * Barrier runnable. + * + * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; + * @param \Google\Cloud\Batch\V1\Runnable\Barrier $var + * @return $this + */ + public function setBarrier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Barrier::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. DisplayName is an optional field that can be provided by the + * caller. If provided, it will be used in logs and other outputs to identify + * the script, making it easier for users to understand the logs. If not + * provided the index of the runnable will be used for outputs. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Normally, a non-zero exit status causes the Task to fail. This flag allows + * execution of other Runnables to continue instead. + * + * Generated from protobuf field bool ignore_exit_status = 3; + * @return bool + */ + public function getIgnoreExitStatus() + { + return $this->ignore_exit_status; + } + + /** + * Normally, a non-zero exit status causes the Task to fail. This flag allows + * execution of other Runnables to continue instead. + * + * Generated from protobuf field bool ignore_exit_status = 3; + * @param bool $var + * @return $this + */ + public function setIgnoreExitStatus($var) + { + GPBUtil::checkBool($var); + $this->ignore_exit_status = $var; + + return $this; + } + + /** + * This flag allows a Runnable to continue running in the background while the + * Task executes subsequent Runnables. This is useful to provide services to + * other Runnables (or to provide debugging support tools like SSH servers). + * + * Generated from protobuf field bool background = 4; + * @return bool + */ + public function getBackground() + { + return $this->background; + } + + /** + * This flag allows a Runnable to continue running in the background while the + * Task executes subsequent Runnables. This is useful to provide services to + * other Runnables (or to provide debugging support tools like SSH servers). + * + * Generated from protobuf field bool background = 4; + * @param bool $var + * @return $this + */ + public function setBackground($var) + { + GPBUtil::checkBool($var); + $this->background = $var; + + return $this; + } + + /** + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * + * Generated from protobuf field bool always_run = 5; + * @return bool + */ + public function getAlwaysRun() + { + return $this->always_run; + } + + /** + * By default, after a Runnable fails, no further Runnable are executed. This + * flag indicates that this Runnable must be run even if the Task has already + * failed. This is useful for Runnables that copy output files off of the VM + * or for debugging. + * The always_run flag does not override the Task's overall max_run_duration. + * If the max_run_duration has expired then no further Runnables will execute, + * not even always_run Runnables. + * + * Generated from protobuf field bool always_run = 5; + * @param bool $var + * @return $this + */ + public function setAlwaysRun($var) + { + GPBUtil::checkBool($var); + $this->always_run = $var; + + return $this; + } + + /** + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; + * @return \Google\Cloud\Batch\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Environment variables for this Runnable (overrides variables set for the + * whole Task or TaskGroup). + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; + * @param \Google\Cloud\Batch\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * Timeout for this Runnable. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Timeout for this Runnable. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Labels for this Runnable. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for this Runnable. + * + * Generated from protobuf field map labels = 9; + * @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; + } + + /** + * @return string + */ + public function getExecutable() + { + return $this->whichOneof("executable"); + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php new file mode 100644 index 000000000000..189d5e8cb44c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php @@ -0,0 +1,74 @@ +google.cloud.batch.v1.Runnable.Barrier + */ +class Barrier extends \Google\Protobuf\Internal\Message +{ + /** + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Barriers are identified by their index in runnable list. + * Names are not required, but if present should be an identifier. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Barrier::class, \Google\Cloud\Batch\V1\Runnable_Barrier::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php new file mode 100644 index 000000000000..6ce82d28921a --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php @@ -0,0 +1,546 @@ +google.cloud.batch.v1.Runnable.Container + */ +class Container extends \Google\Protobuf\Internal\Message +{ + /** + * The URI to pull the container image from. + * + * Generated from protobuf field string image_uri = 1; + */ + protected $image_uri = ''; + /** + * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT + * (either in the container image or with the entrypoint field below) then + * commands are appended as arguments to the ENTRYPOINT. + * + * Generated from protobuf field repeated string commands = 2; + */ + private $commands; + /** + * Overrides the `ENTRYPOINT` specified in the container. + * + * Generated from protobuf field string entrypoint = 3; + */ + protected $entrypoint = ''; + /** + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match docker run's --volume option, + * e.g. /foo:/bar, or /foo:/bar:ro + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (ro) for existing persistent disks and + * read-write (rw) for other volume types, regardless of the original mount + * options specified in `TaskSpec.Volumes`. If you need different mount + * settings, you can explicitly configure them in this field. + * + * Generated from protobuf field repeated string volumes = 7; + */ + private $volumes; + /** + * Arbitrary additional options to include in the "docker run" command when + * running this container, e.g. "--network host". + * + * Generated from protobuf field string options = 8; + */ + protected $options = ''; + /** + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * + * Generated from protobuf field bool block_external_network = 9; + */ + protected $block_external_network = false; + /** + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string username = 10; + */ + protected $username = ''; + /** + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string password = 11; + */ + protected $password = ''; + /** + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * + * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_image_streaming = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_uri + * The URI to pull the container image from. + * @type array|\Google\Protobuf\Internal\RepeatedField $commands + * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT + * (either in the container image or with the entrypoint field below) then + * commands are appended as arguments to the ENTRYPOINT. + * @type string $entrypoint + * Overrides the `ENTRYPOINT` specified in the container. + * @type array|\Google\Protobuf\Internal\RepeatedField $volumes + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match docker run's --volume option, + * e.g. /foo:/bar, or /foo:/bar:ro + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (ro) for existing persistent disks and + * read-write (rw) for other volume types, regardless of the original mount + * options specified in `TaskSpec.Volumes`. If you need different mount + * settings, you can explicitly configure them in this field. + * @type string $options + * Arbitrary additional options to include in the "docker run" command when + * running this container, e.g. "--network host". + * @type bool $block_external_network + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * @type string $username + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * @type string $password + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * @type bool $enable_image_streaming + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The URI to pull the container image from. + * + * Generated from protobuf field string image_uri = 1; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * The URI to pull the container image from. + * + * Generated from protobuf field string image_uri = 1; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT + * (either in the container image or with the entrypoint field below) then + * commands are appended as arguments to the ENTRYPOINT. + * + * Generated from protobuf field repeated string commands = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCommands() + { + return $this->commands; + } + + /** + * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT + * (either in the container image or with the entrypoint field below) then + * commands are appended as arguments to the ENTRYPOINT. + * + * Generated from protobuf field repeated string commands = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCommands($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->commands = $arr; + + return $this; + } + + /** + * Overrides the `ENTRYPOINT` specified in the container. + * + * Generated from protobuf field string entrypoint = 3; + * @return string + */ + public function getEntrypoint() + { + return $this->entrypoint; + } + + /** + * Overrides the `ENTRYPOINT` specified in the container. + * + * Generated from protobuf field string entrypoint = 3; + * @param string $var + * @return $this + */ + public function setEntrypoint($var) + { + GPBUtil::checkString($var, True); + $this->entrypoint = $var; + + return $this; + } + + /** + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match docker run's --volume option, + * e.g. /foo:/bar, or /foo:/bar:ro + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (ro) for existing persistent disks and + * read-write (rw) for other volume types, regardless of the original mount + * options specified in `TaskSpec.Volumes`. If you need different mount + * settings, you can explicitly configure them in this field. + * + * Generated from protobuf field repeated string volumes = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Volumes to mount (bind mount) from the host machine files or directories + * into the container, formatted to match docker run's --volume option, + * e.g. /foo:/bar, or /foo:/bar:ro + * If the `TaskSpec.Volumes` field is specified but this field is not, Batch + * will mount each volume from the host machine to the container with the + * same mount path by default. In this case, the default mount option for + * containers will be read-only (ro) for existing persistent disks and + * read-write (rw) for other volume types, regardless of the original mount + * options specified in `TaskSpec.Volumes`. If you need different mount + * settings, you can explicitly configure them in this field. + * + * Generated from protobuf field repeated string volumes = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->volumes = $arr; + + return $this; + } + + /** + * Arbitrary additional options to include in the "docker run" command when + * running this container, e.g. "--network host". + * + * Generated from protobuf field string options = 8; + * @return string + */ + public function getOptions() + { + return $this->options; + } + + /** + * Arbitrary additional options to include in the "docker run" command when + * running this container, e.g. "--network host". + * + * Generated from protobuf field string options = 8; + * @param string $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkString($var, True); + $this->options = $var; + + return $this; + } + + /** + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * + * Generated from protobuf field bool block_external_network = 9; + * @return bool + */ + public function getBlockExternalNetwork() + { + return $this->block_external_network; + } + + /** + * If set to true, external network access to and from container will be + * blocked, containers that are with block_external_network as true can + * still communicate with each other, network cannot be specified in the + * `container.options` field. + * + * Generated from protobuf field bool block_external_network = 9; + * @param bool $var + * @return $this + */ + public function setBlockExternalNetwork($var) + { + GPBUtil::checkBool($var); + $this->block_external_network = $var; + + return $this; + } + + /** + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string username = 10; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required if the container image is from a private Docker registry. The + * username to login to the Docker registry that contains the image. + * You can either specify the username directly by using plain text or + * specify an encrypted username by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. However, using a secret is + * recommended for enhanced security. + * Caution: If you specify the username using plain text, you risk the + * username being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the username instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string username = 10; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string password = 11; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required if the container image is from a private Docker registry. The + * password to login to the Docker registry that contains the image. + * For security, it is strongly recommended to specify an + * encrypted password by using a Secret Manager secret: + * `projects/*/secrets/*/versions/*`. + * Warning: If you specify the password using plain text, you risk the + * password being exposed to any users who can view the job or its logs. + * To avoid this risk, specify a secret that contains the password instead. + * Learn more about [Secret + * Manager](https://cloud.google.com/secret-manager/docs/) and [using + * Secret Manager with + * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + * + * Generated from protobuf field string password = 11; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * + * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableImageStreaming() + { + return $this->enable_image_streaming; + } + + /** + * Optional. If set to true, this container runnable uses Image streaming. + * Use Image streaming to allow the runnable to initialize without + * waiting for the entire container image to download, which can + * significantly reduce startup time for large container images. + * When `enableImageStreaming` is set to true, the container + * runtime is [containerd](https://containerd.io/) instead of Docker. + * Additionally, this container runnable only supports the following + * `container` subfields: `imageUri`, + * `commands[]`, `entrypoint`, and + * `volumes[]`; any other `container` subfields are ignored. + * For more information about the requirements and limitations for using + * Image streaming with Batch, see the [`image-streaming` + * sample on + * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + * + * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableImageStreaming($var) + { + GPBUtil::checkBool($var); + $this->enable_image_streaming = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Container::class, \Google\Cloud\Batch\V1\Runnable_Container::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php new file mode 100644 index 000000000000..1982a46b0335 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php @@ -0,0 +1,147 @@ +google.cloud.batch.v1.Runnable.Script + */ +class Script extends \Google\Protobuf\Internal\Message +{ + protected $command; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Script file path on the host VM. + * To specify an interpreter, please add a `#!`(also known as + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the + * first line of the file.(For example, to execute the script using bash, + * `#!/bin/bash` should be the first line of the file. To execute the + * script using`Python3`, `#!/usr/bin/env python3` should be the first + * line of the file.) Otherwise, the file will by default be executed by + * `/bin/sh`. + * @type string $text + * Shell script text. + * To specify an interpreter, please add a `#!\n` at the + * beginning of the text.(For example, to execute the script using bash, + * `#!/bin/bash\n` should be added. To execute the script using`Python3`, + * `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will + * by default be executed by `/bin/sh`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Script file path on the host VM. + * To specify an interpreter, please add a `#!`(also known as + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the + * first line of the file.(For example, to execute the script using bash, + * `#!/bin/bash` should be the first line of the file. To execute the + * script using`Python3`, `#!/usr/bin/env python3` should be the first + * line of the file.) Otherwise, the file will by default be executed by + * `/bin/sh`. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->readOneof(1); + } + + public function hasPath() + { + return $this->hasOneof(1); + } + + /** + * Script file path on the host VM. + * To specify an interpreter, please add a `#!`(also known as + * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the + * first line of the file.(For example, to execute the script using bash, + * `#!/bin/bash` should be the first line of the file. To execute the + * script using`Python3`, `#!/usr/bin/env python3` should be the first + * line of the file.) Otherwise, the file will by default be executed by + * `/bin/sh`. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Shell script text. + * To specify an interpreter, please add a `#!\n` at the + * beginning of the text.(For example, to execute the script using bash, + * `#!/bin/bash\n` should be added. To execute the script using`Python3`, + * `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will + * by default be executed by `/bin/sh`. + * + * Generated from protobuf field string text = 2; + * @return string + */ + public function getText() + { + return $this->readOneof(2); + } + + public function hasText() + { + return $this->hasOneof(2); + } + + /** + * Shell script text. + * To specify an interpreter, please add a `#!\n` at the + * beginning of the text.(For example, to execute the script using bash, + * `#!/bin/bash\n` should be added. To execute the script using`Python3`, + * `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will + * by default be executed by `/bin/sh`. + * + * Generated from protobuf field string text = 2; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getCommand() + { + return $this->whichOneof("command"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Script::class, \Google\Cloud\Batch\V1\Runnable_Script::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php new file mode 100644 index 000000000000..2a315346b647 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php @@ -0,0 +1,101 @@ +google.cloud.batch.v1.ServiceAccount + */ +class ServiceAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + */ + protected $email = ''; + /** + * List of scopes to be enabled for this service account. + * + * Generated from protobuf field repeated string scopes = 2; + */ + private $scopes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Email address of the service account. + * @type array|\Google\Protobuf\Internal\RepeatedField $scopes + * List of scopes to be enabled for this service account. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string email = 1; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * List of scopes to be enabled for this service account. + * + * Generated from protobuf field repeated string scopes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * List of scopes to be enabled for this service account. + * + * Generated from protobuf field repeated string scopes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scopes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php new file mode 100644 index 000000000000..1a199e88f2ff --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php @@ -0,0 +1,235 @@ +google.cloud.batch.v1.StatusEvent + */ +class StatusEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the event. + * + * Generated from protobuf field string type = 3; + */ + protected $type = ''; + /** + * Description of the event. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * The time this event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + */ + protected $event_time = null; + /** + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; + */ + protected $task_execution = null; + /** + * Task State. + * This field is only defined for task-level status events. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; + */ + protected $task_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * Type of the event. + * @type string $description + * Description of the event. + * @type \Google\Protobuf\Timestamp $event_time + * The time this event occurred. + * @type \Google\Cloud\Batch\V1\TaskExecution $task_execution + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * @type int $task_state + * Task State. + * This field is only defined for task-level status events. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Type of the event. + * + * Generated from protobuf field string type = 3; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the event. + * + * Generated from protobuf field string type = 3; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Description of the event. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the event. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The time this event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * The time this event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; + * @return \Google\Cloud\Batch\V1\TaskExecution|null + */ + public function getTaskExecution() + { + return $this->task_execution; + } + + public function hasTaskExecution() + { + return isset($this->task_execution); + } + + public function clearTaskExecution() + { + unset($this->task_execution); + } + + /** + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; + * @param \Google\Cloud\Batch\V1\TaskExecution $var + * @return $this + */ + public function setTaskExecution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskExecution::class); + $this->task_execution = $var; + + return $this; + } + + /** + * Task State. + * This field is only defined for task-level status events. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; + * @return int + */ + public function getTaskState() + { + return $this->task_state; + } + + /** + * Task State. + * This field is only defined for task-level status events. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; + * @param int $var + * @return $this + */ + public function setTaskState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); + $this->task_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php new file mode 100644 index 000000000000..c034a667462e --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php @@ -0,0 +1,123 @@ +google.cloud.batch.v1.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Task Status. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * @type \Google\Cloud\Batch\V1\TaskStatus $status + * Task Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Task name. + * The name is generated from the parent TaskGroup name and 'id' field. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + * + * 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; + } + + /** + * Task Status. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; + * @return \Google\Cloud\Batch\V1\TaskStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Task Status. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; + * @param \Google\Cloud\Batch\V1\TaskStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php new file mode 100644 index 000000000000..3a06c25ccab4 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php @@ -0,0 +1,100 @@ +google.cloud.batch.v1.TaskExecution + */ +class TaskExecution extends \Google\Protobuf\Internal\Message +{ + /** + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * + * Generated from protobuf field int32 exit_code = 1; + */ + protected $exit_code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $exit_code + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * + * Generated from protobuf field int32 exit_code = 1; + * @return int + */ + public function getExitCode() + { + return $this->exit_code; + } + + /** + * The exit code of a finished task. + * If the task succeeded, the exit code will be 0. If the task failed but not + * due to the following reasons, the exit code will be 50000. + * Otherwise, it can be from different sources: + * * Batch known failures: + * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + * * Batch runnable execution failures; you can rely on Batch logs to further + * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If + * there are multiple runnables failures, Batch only exposes the first error. + * + * Generated from protobuf field int32 exit_code = 1; + * @param int $var + * @return $this + */ + public function setExitCode($var) + { + GPBUtil::checkInt32($var); + $this->exit_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php new file mode 100644 index 000000000000..9a71f100436d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php @@ -0,0 +1,479 @@ +google.cloud.batch.v1.TaskGroup + */ +class TaskGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Tasks in the group share the same task spec. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task_spec = null; + /** + * Number of Tasks in the TaskGroup. + * Default is 1. + * + * Generated from protobuf field int64 task_count = 4; + */ + protected $task_count = 0; + /** + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * + * Generated from protobuf field int64 parallelism = 5; + */ + protected $parallelism = 0; + /** + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; + */ + protected $scheduling_policy = 0; + /** + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; + */ + private $task_environments; + /** + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * + * Generated from protobuf field int64 task_count_per_node = 10; + */ + protected $task_count_per_node = 0; + /** + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * + * Generated from protobuf field bool require_hosts_file = 11; + */ + protected $require_hosts_file = false; + /** + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * + * Generated from protobuf field bool permissive_ssh = 12; + */ + protected $permissive_ssh = false; + /** + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * + * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $run_as_non_root = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * @type \Google\Cloud\Batch\V1\TaskSpec $task_spec + * Required. Tasks in the group share the same task spec. + * @type int|string $task_count + * Number of Tasks in the TaskGroup. + * Default is 1. + * @type int|string $parallelism + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * @type int $scheduling_policy + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * @type array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $task_environments + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * @type int|string $task_count_per_node + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * @type bool $require_hosts_file + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * @type bool $permissive_ssh + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * @type bool $run_as_non_root + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); + parent::__construct($data); + } + + /** + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. TaskGroup name. + * The system generates this field based on parent Job name. + * For example: + * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + * + * 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; + } + + /** + * Required. Tasks in the group share the same task spec. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Batch\V1\TaskSpec|null + */ + public function getTaskSpec() + { + return $this->task_spec; + } + + public function hasTaskSpec() + { + return isset($this->task_spec); + } + + public function clearTaskSpec() + { + unset($this->task_spec); + } + + /** + * Required. Tasks in the group share the same task spec. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Batch\V1\TaskSpec $var + * @return $this + */ + public function setTaskSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskSpec::class); + $this->task_spec = $var; + + return $this; + } + + /** + * Number of Tasks in the TaskGroup. + * Default is 1. + * + * Generated from protobuf field int64 task_count = 4; + * @return int|string + */ + public function getTaskCount() + { + return $this->task_count; + } + + /** + * Number of Tasks in the TaskGroup. + * Default is 1. + * + * Generated from protobuf field int64 task_count = 4; + * @param int|string $var + * @return $this + */ + public function setTaskCount($var) + { + GPBUtil::checkInt64($var); + $this->task_count = $var; + + return $this; + } + + /** + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * + * Generated from protobuf field int64 parallelism = 5; + * @return int|string + */ + public function getParallelism() + { + return $this->parallelism; + } + + /** + * Max number of tasks that can run in parallel. + * Default to min(task_count, parallel tasks per job limit). + * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + * + * Generated from protobuf field int64 parallelism = 5; + * @param int|string $var + * @return $this + */ + public function setParallelism($var) + { + GPBUtil::checkInt64($var); + $this->parallelism = $var; + + return $this; + } + + /** + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; + * @return int + */ + public function getSchedulingPolicy() + { + return $this->scheduling_policy; + } + + /** + * Scheduling policy for Tasks in the TaskGroup. + * The default value is AS_SOON_AS_POSSIBLE. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; + * @param int $var + * @return $this + */ + public function setSchedulingPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskGroup\SchedulingPolicy::class); + $this->scheduling_policy = $var; + + return $this; + } + + /** + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaskEnvironments() + { + return $this->task_environments; + } + + /** + * An array of environment variable mappings, which are passed to Tasks with + * matching indices. If task_environments is used then task_count should + * not be specified in the request (and will be ignored). Task count will be + * the length of task_environments. + * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + * addition to any environment variables set in task_environments, specifying + * the number of Tasks in the Task's parent TaskGroup, and the specific Task's + * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; + * @param array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaskEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Environment::class); + $this->task_environments = $arr; + + return $this; + } + + /** + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * + * Generated from protobuf field int64 task_count_per_node = 10; + * @return int|string + */ + public function getTaskCountPerNode() + { + return $this->task_count_per_node; + } + + /** + * Max number of tasks that can be run on a VM at the same time. + * If not specified, the system will decide a value based on available + * compute resources on a VM and task requirements. + * + * Generated from protobuf field int64 task_count_per_node = 10; + * @param int|string $var + * @return $this + */ + public function setTaskCountPerNode($var) + { + GPBUtil::checkInt64($var); + $this->task_count_per_node = $var; + + return $this; + } + + /** + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * + * Generated from protobuf field bool require_hosts_file = 11; + * @return bool + */ + public function getRequireHostsFile() + { + return $this->require_hosts_file; + } + + /** + * When true, Batch will populate a file with a list of all VMs assigned to + * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + * of that file. Defaults to false. The host file supports up to 1000 VMs. + * + * Generated from protobuf field bool require_hosts_file = 11; + * @param bool $var + * @return $this + */ + public function setRequireHostsFile($var) + { + GPBUtil::checkBool($var); + $this->require_hosts_file = $var; + + return $this; + } + + /** + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * + * Generated from protobuf field bool permissive_ssh = 12; + * @return bool + */ + public function getPermissiveSsh() + { + return $this->permissive_ssh; + } + + /** + * When true, Batch will configure SSH to allow passwordless login between + * VMs running the Batch tasks in the same TaskGroup. + * + * Generated from protobuf field bool permissive_ssh = 12; + * @param bool $var + * @return $this + */ + public function setPermissiveSsh($var) + { + GPBUtil::checkBool($var); + $this->permissive_ssh = $var; + + return $this; + } + + /** + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * + * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRunAsNonRoot() + { + return $this->run_as_non_root; + } + + /** + * Optional. If not set or set to false, Batch uses the root user to execute + * runnables. If set to true, Batch runs the runnables using a non-root user. + * Currently, the non-root user Batch used is generated by OS Login. For more + * information, see [About OS + * Login](https://cloud.google.com/compute/docs/oslogin). + * + * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRunAsNonRoot($var) + { + GPBUtil::checkBool($var); + $this->run_as_non_root = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php new file mode 100644 index 000000000000..df18ec4557bc --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php @@ -0,0 +1,66 @@ +google.cloud.batch.v1.TaskGroup.SchedulingPolicy + */ +class SchedulingPolicy +{ + /** + * Unspecified. + * + * Generated from protobuf enum SCHEDULING_POLICY_UNSPECIFIED = 0; + */ + const SCHEDULING_POLICY_UNSPECIFIED = 0; + /** + * Run Tasks as soon as resources are available. + * Tasks might be executed in parallel depending on parallelism and + * task_count values. + * + * Generated from protobuf enum AS_SOON_AS_POSSIBLE = 1; + */ + const AS_SOON_AS_POSSIBLE = 1; + /** + * Run Tasks sequentially with increased task index. + * + * Generated from protobuf enum IN_ORDER = 2; + */ + const IN_ORDER = 2; + + private static $valueToName = [ + self::SCHEDULING_POLICY_UNSPECIFIED => 'SCHEDULING_POLICY_UNSPECIFIED', + self::AS_SOON_AS_POSSIBLE => 'AS_SOON_AS_POSSIBLE', + self::IN_ORDER => 'IN_ORDER', + ]; + + 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(SchedulingPolicy::class, \Google\Cloud\Batch\V1\TaskGroup_SchedulingPolicy::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php new file mode 100644 index 000000000000..ff38c4b463ba --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php @@ -0,0 +1,440 @@ +google.cloud.batch.v1.TaskSpec + */ +class TaskSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The sequence of scripts or containers to run for this Task. Each Task using + * this TaskSpec executes its list of runnables in order. The Task succeeds if + * all of its runnables either exit with a zero status or any that exit with a + * non-zero status have the ignore_exit_status flag. + * Background runnables are killed automatically (if they have not already + * exited) a short time after all foreground runnables have completed. Even + * though this is likely to result in a non-zero exit status for the + * background runnable, these automatic kills are not treated as Task + * failures. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; + */ + private $runnables; + /** + * ComputeResource requirements. + * + * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; + */ + protected $compute_resource = null; + /** + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * + * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; + */ + protected $max_run_duration = null; + /** + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * + * Generated from protobuf field int32 max_retry_count = 5; + */ + protected $max_retry_count = 0; + /** + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; + */ + private $lifecycle_policies; + /** + * Deprecated: please use environment(non-plural) instead. + * + * Generated from protobuf field map environments = 6 [deprecated = true]; + * @deprecated + */ + private $environments; + /** + * Volumes to mount before running Tasks using this TaskSpec. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; + */ + private $volumes; + /** + * Environment variables to set before running the Task. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; + */ + protected $environment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $runnables + * The sequence of scripts or containers to run for this Task. Each Task using + * this TaskSpec executes its list of runnables in order. The Task succeeds if + * all of its runnables either exit with a zero status or any that exit with a + * non-zero status have the ignore_exit_status flag. + * Background runnables are killed automatically (if they have not already + * exited) a short time after all foreground runnables have completed. Even + * though this is likely to result in a non-zero exit status for the + * background runnable, these automatic kills are not treated as Task + * failures. + * @type \Google\Cloud\Batch\V1\ComputeResource $compute_resource + * ComputeResource requirements. + * @type \Google\Protobuf\Duration $max_run_duration + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * @type int $max_retry_count + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * @type array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $lifecycle_policies + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * @type array|\Google\Protobuf\Internal\MapField $environments + * Deprecated: please use environment(non-plural) instead. + * @type array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * Volumes to mount before running Tasks using this TaskSpec. + * @type \Google\Cloud\Batch\V1\Environment $environment + * Environment variables to set before running the Task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * The sequence of scripts or containers to run for this Task. Each Task using + * this TaskSpec executes its list of runnables in order. The Task succeeds if + * all of its runnables either exit with a zero status or any that exit with a + * non-zero status have the ignore_exit_status flag. + * Background runnables are killed automatically (if they have not already + * exited) a short time after all foreground runnables have completed. Even + * though this is likely to result in a non-zero exit status for the + * background runnable, these automatic kills are not treated as Task + * failures. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRunnables() + { + return $this->runnables; + } + + /** + * The sequence of scripts or containers to run for this Task. Each Task using + * this TaskSpec executes its list of runnables in order. The Task succeeds if + * all of its runnables either exit with a zero status or any that exit with a + * non-zero status have the ignore_exit_status flag. + * Background runnables are killed automatically (if they have not already + * exited) a short time after all foreground runnables have completed. Even + * though this is likely to result in a non-zero exit status for the + * background runnable, these automatic kills are not treated as Task + * failures. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; + * @param array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRunnables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Runnable::class); + $this->runnables = $arr; + + return $this; + } + + /** + * ComputeResource requirements. + * + * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; + * @return \Google\Cloud\Batch\V1\ComputeResource|null + */ + public function getComputeResource() + { + return $this->compute_resource; + } + + public function hasComputeResource() + { + return isset($this->compute_resource); + } + + public function clearComputeResource() + { + unset($this->compute_resource); + } + + /** + * ComputeResource requirements. + * + * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; + * @param \Google\Cloud\Batch\V1\ComputeResource $var + * @return $this + */ + public function setComputeResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ComputeResource::class); + $this->compute_resource = $var; + + return $this; + } + + /** + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * + * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxRunDuration() + { + return $this->max_run_duration; + } + + public function hasMaxRunDuration() + { + return isset($this->max_run_duration); + } + + public function clearMaxRunDuration() + { + unset($this->max_run_duration); + } + + /** + * Maximum duration the task should run before being automatically retried + * (if enabled) or automatically failed. Format the value of this field + * as a time limit in seconds followed by `s`—for example, `3600s` + * for 1 hour. The field accepts any value between 0 and the maximum listed + * for the `Duration` field type at + * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, + * the actual maximum run time for a job will be limited to the maximum run + * time for a job listed at + * https://cloud.google.com/batch/quotas#max-job-duration. + * + * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxRunDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_run_duration = $var; + + return $this; + } + + /** + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * + * Generated from protobuf field int32 max_retry_count = 5; + * @return int + */ + public function getMaxRetryCount() + { + return $this->max_retry_count; + } + + /** + * Maximum number of retries on failures. + * The default, 0, which means never retry. + * The valid value range is [0, 10]. + * + * Generated from protobuf field int32 max_retry_count = 5; + * @param int $var + * @return $this + */ + public function setMaxRetryCount($var) + { + GPBUtil::checkInt32($var); + $this->max_retry_count = $var; + + return $this; + } + + /** + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLifecyclePolicies() + { + return $this->lifecycle_policies; + } + + /** + * Lifecycle management schema when any task in a task group is failed. + * Currently we only support one lifecycle policy. + * When the lifecycle policy condition is met, + * the action in the policy will execute. + * If task execution result does not meet with the defined lifecycle + * policy, we consider it as the default policy. + * Default policy means if the exit code is 0, exit task. + * If task ends with non-zero exit code, retry the task with max_retry_count. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; + * @param array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLifecyclePolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\LifecyclePolicy::class); + $this->lifecycle_policies = $arr; + + return $this; + } + + /** + * Deprecated: please use environment(non-plural) instead. + * + * Generated from protobuf field map environments = 6 [deprecated = true]; + * @return \Google\Protobuf\Internal\MapField + * @deprecated + */ + public function getEnvironments() + { + @trigger_error('environments is deprecated.', E_USER_DEPRECATED); + return $this->environments; + } + + /** + * Deprecated: please use environment(non-plural) instead. + * + * Generated from protobuf field map environments = 6 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + * @deprecated + */ + public function setEnvironments($var) + { + @trigger_error('environments is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environments = $arr; + + return $this; + } + + /** + * Volumes to mount before running Tasks using this TaskSpec. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * Volumes to mount before running Tasks using this TaskSpec. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; + * @param array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * Environment variables to set before running the Task. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; + * @return \Google\Cloud\Batch\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Environment variables to set before running the Task. + * + * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; + * @param \Google\Cloud\Batch\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php new file mode 100644 index 000000000000..8caeb3d3d49d --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php @@ -0,0 +1,101 @@ +google.cloud.batch.v1.TaskStatus + */ +class TaskStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; + */ + protected $state = 0; + /** + * Detailed info about why the state is reached. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + */ + private $status_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Task state. + * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events + * Detailed info about why the state is reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); + parent::__construct($data); + } + + /** + * Task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Task state. + * + * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Detailed info about why the state is reached. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatusEvents() + { + return $this->status_events; + } + + /** + * Detailed info about why the state is reached. + * + * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; + * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatusEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); + $this->status_events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php new file mode 100644 index 000000000000..d74433bd3301 --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php @@ -0,0 +1,92 @@ +google.cloud.batch.v1.TaskStatus.State + */ +class State +{ + /** + * Unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Task is created and waiting for resources. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The Task is assigned to at least one VM. + * + * Generated from protobuf enum ASSIGNED = 2; + */ + const ASSIGNED = 2; + /** + * The Task is running. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The Task has failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The Task has succeeded. + * + * Generated from protobuf enum SUCCEEDED = 5; + */ + const SUCCEEDED = 5; + /** + * The Task has not been executed when the Job finishes. + * + * Generated from protobuf enum UNEXECUTED = 6; + */ + const UNEXECUTED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ASSIGNED => 'ASSIGNED', + self::RUNNING => 'RUNNING', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + self::UNEXECUTED => 'UNEXECUTED', + ]; + + 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\Batch\V1\TaskStatus_State::class); + diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php new file mode 100644 index 000000000000..c13f144d732c --- /dev/null +++ b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php @@ -0,0 +1,268 @@ +google.cloud.batch.v1.Volume + */ +class Volume extends \Google\Protobuf\Internal\Message +{ + /** + * The mount path for the volume, e.g. /mnt/disks/share. + * + * Generated from protobuf field string mount_path = 4; + */ + protected $mount_path = ''; + /** + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * + * Generated from protobuf field repeated string mount_options = 5; + */ + private $mount_options; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Batch\V1\NFS $nfs + * A Network File System (NFS) volume. For example, a + * Filestore file share. + * @type \Google\Cloud\Batch\V1\GCS $gcs + * A Google Cloud Storage (GCS) volume. + * @type string $device_name + * Device name of an attached disk volume, which should align with a + * device_name specified by + * job.allocation_policy.instances[0].policy.disks[i].device_name or + * defined by the given instance template in + * job.allocation_policy.instances[0].instance_template. + * @type string $mount_path + * The mount path for the volume, e.g. /mnt/disks/share. + * @type array|\Google\Protobuf\Internal\RepeatedField $mount_options + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * A Network File System (NFS) volume. For example, a + * Filestore file share. + * + * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; + * @return \Google\Cloud\Batch\V1\NFS|null + */ + public function getNfs() + { + return $this->readOneof(1); + } + + public function hasNfs() + { + return $this->hasOneof(1); + } + + /** + * A Network File System (NFS) volume. For example, a + * Filestore file share. + * + * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; + * @param \Google\Cloud\Batch\V1\NFS $var + * @return $this + */ + public function setNfs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\NFS::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A Google Cloud Storage (GCS) volume. + * + * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; + * @return \Google\Cloud\Batch\V1\GCS|null + */ + public function getGcs() + { + return $this->readOneof(3); + } + + public function hasGcs() + { + return $this->hasOneof(3); + } + + /** + * A Google Cloud Storage (GCS) volume. + * + * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; + * @param \Google\Cloud\Batch\V1\GCS $var + * @return $this + */ + public function setGcs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\GCS::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Device name of an attached disk volume, which should align with a + * device_name specified by + * job.allocation_policy.instances[0].policy.disks[i].device_name or + * defined by the given instance template in + * job.allocation_policy.instances[0].instance_template. + * + * Generated from protobuf field string device_name = 6; + * @return string + */ + public function getDeviceName() + { + return $this->readOneof(6); + } + + public function hasDeviceName() + { + return $this->hasOneof(6); + } + + /** + * Device name of an attached disk volume, which should align with a + * device_name specified by + * job.allocation_policy.instances[0].policy.disks[i].device_name or + * defined by the given instance template in + * job.allocation_policy.instances[0].instance_template. + * + * Generated from protobuf field string device_name = 6; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The mount path for the volume, e.g. /mnt/disks/share. + * + * Generated from protobuf field string mount_path = 4; + * @return string + */ + public function getMountPath() + { + return $this->mount_path; + } + + /** + * The mount path for the volume, e.g. /mnt/disks/share. + * + * Generated from protobuf field string mount_path = 4; + * @param string $var + * @return $this + */ + public function setMountPath($var) + { + GPBUtil::checkString($var, True); + $this->mount_path = $var; + + return $this; + } + + /** + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * + * Generated from protobuf field repeated string mount_options = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMountOptions() + { + return $this->mount_options; + } + + /** + * Mount options vary based on the type of storage volume: + * * For a Cloud Storage bucket, all the mount options provided + * by + * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) + * are supported. + * * For an existing persistent disk, all mount options provided by the + * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) + * except writing are supported. This is due to restrictions of + * [multi-writer + * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + * * For any other disk or a Network File System (NFS), all the + * mount options provided by the `mount` command are supported. + * + * Generated from protobuf field repeated string mount_options = 5; + * @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; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php new file mode 100644 index 000000000000..78181b5873de --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php @@ -0,0 +1,81 @@ +setTaskSpec($jobTaskGroupsTaskSpec); + $jobTaskGroups = [$taskGroup,]; + $job = (new Job()) + ->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $batchServiceClient->createJob($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 +{ + $formattedParent = BatchServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_job_sample($formattedParent); +} +// [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php new file mode 100644 index 000000000000..2f18d5dabdf6 --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php @@ -0,0 +1,66 @@ +deleteJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php new file mode 100644 index 000000000000..df59d0831359 --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $batchServiceClient->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 = BatchServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + get_job_sample($formattedName); +} +// [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php new file mode 100644 index 000000000000..7a7ba7f1f70b --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END batch_v1_generated_BatchService_GetLocation_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php new file mode 100644 index 000000000000..757f3239fecb --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $batchServiceClient->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 = BatchServiceClient::taskName( + '[PROJECT]', + '[LOCATION]', + '[JOB]', + '[TASK_GROUP]', + '[TASK]' + ); + + get_task_sample($formattedName); +} +// [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php new file mode 100644 index 000000000000..98fb7d71673e --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php @@ -0,0 +1,62 @@ +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()); + } +} +// [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php new file mode 100644 index 000000000000..044396d5d16e --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $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()); + } +} +// [END batch_v1_generated_BatchService_ListLocations_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php new file mode 100644 index 000000000000..68b45472d029 --- /dev/null +++ b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $batchServiceClient->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 = BatchServiceClient::taskGroupName( + '[PROJECT]', + '[LOCATION]', + '[JOB]', + '[TASK_GROUP]' + ); + + list_tasks_sample($formattedParent); +} +// [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php b/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php new file mode 100644 index 000000000000..2179f2485c98 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php @@ -0,0 +1,558 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/batch_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/batch_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/batch_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/batch_service_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 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 task + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $taskGroup + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName(string $project, string $location, string $job, string $taskGroup, string $task): string + { + return self::getPathTemplate('task')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'task_group' => $taskGroup, + 'task' => $task, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task_group + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $taskGroup + * + * @return string The formatted task_group resource. + */ + public static function taskGroupName(string $project, string $location, string $job, string $taskGroup): string + { + return self::getPathTemplate('taskGroup')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'task_group' => $taskGroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - job: projects/{project}/locations/{location}/jobs/{job} + * - location: projects/{project}/locations/{location} + * - task: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task} + * - taskGroup: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} + * + * 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 $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 'batch.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * Create a Job. + * + * The async variant is {@see BatchServiceClient::createJobAsync()} . + * + * @example samples/V1/BatchServiceClient/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 Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function createJob(CreateJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); + } + + /** + * Delete a Job. + * + * The async variant is {@see BatchServiceClient::deleteJobAsync()} . + * + * @example samples/V1/BatchServiceClient/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(); + } + + /** + * Get a Job specified by its resource name. + * + * The async variant is {@see BatchServiceClient::getJobAsync()} . + * + * @example samples/V1/BatchServiceClient/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(); + } + + /** + * Return a single Task. + * + * The async variant is {@see BatchServiceClient::getTaskAsync()} . + * + * @example samples/V1/BatchServiceClient/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(); + } + + /** + * List all Jobs for a project within a region. + * + * The async variant is {@see BatchServiceClient::listJobsAsync()} . + * + * @example samples/V1/BatchServiceClient/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); + } + + /** + * List Tasks associated with a job. + * + * The async variant is {@see BatchServiceClient::listTasksAsync()} . + * + * @example samples/V1/BatchServiceClient/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); + } + + /** + * Gets information about a location. + * + * The async variant is {@see BatchServiceClient::getLocationAsync()} . + * + * @example samples/V1/BatchServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see BatchServiceClient::listLocationsAsync()} . + * + * @example samples/V1/BatchServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..eae7f15d2f08 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.batch.v1", + "libraryPackage": "Google\\Cloud\\Batch\\V1", + "services": { + "BatchService": { + "clients": { + "grpc": { + "libraryClient": "BatchServiceGapicClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "ListJobs": { + "methods": [ + "listJobs" + ] + }, + "ListTasks": { + "methods": [ + "listTasks" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json new file mode 100644 index 000000000000..4fae7bea9f19 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.batch.v1.BatchService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTask": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php new file mode 100644 index 000000000000..8618662401e1 --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php @@ -0,0 +1,163 @@ + [ + 'google.cloud.batch.v1.BatchService' => [ + 'DeleteJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Batch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\Task', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\ListJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTasks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Batch\V1\ListTasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'job' => 'projects/{project}/locations/{location}/jobs/{job}', + 'location' => 'projects/{project}/locations/{location}', + 'task' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}', + 'taskGroup' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php new file mode 100644 index 000000000000..53dc86dfd5dc --- /dev/null +++ b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php @@ -0,0 +1,167 @@ + [ + 'google.cloud.batch.v1.BatchService' => [ + 'CreateJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'body' => 'job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php b/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php new file mode 100644 index 000000000000..524f1fafb188 --- /dev/null +++ b/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php @@ -0,0 +1,701 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BatchServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BatchServiceClient($options); + } + + /** @test */ + public function createJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $priority = 1165461084; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPriority($priority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $jobTaskGroups = []; + $job->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJob($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.batch.v1.BatchService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobExceptionTest() + { + $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]'); + $job = new Job(); + $jobTaskGroups = []; + $job->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + try { + $gapicClient->createJob($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 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); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new DeleteJobRequest(); + $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.batch.v1.BatchService/DeleteJob', $actualApiFuncCall); + $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); + $request = new DeleteJobRequest(); + $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 getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $priority = 1165461084; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setPriority($priority); + $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.batch.v1.BatchService/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 getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]', '[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.batch.v1.BatchService/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]', '[TASK_GROUP]', '[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 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); + $request = new ListJobsRequest(); + $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.batch.v1.BatchService/ListJobs', $actualFuncCall); + $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); + $request = new ListJobsRequest(); + 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 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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); + $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.batch.v1.BatchService/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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); + $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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 createJobAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $priority = 1165461084; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPriority($priority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $jobTaskGroups = []; + $job->setTaskGroups($jobTaskGroups); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJobAsync($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.batch.v1.BatchService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From af8356f9c731743fc88e0ff1a365ef036503b491 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 6 Aug 2024 03:18:14 +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 --- Batch/src/V1/StatusEvent.php | 30 +- Batch/src/V1/TaskStatus.php | 10 +- .../Google/Cloud/Batch/V1/Batch.php | 93 --- .../GPBMetadata/Google/Cloud/Batch/V1/Job.php | Bin 5994 -> 0 bytes .../Google/Cloud/Batch/V1/Task.php | Bin 3962 -> 0 bytes .../Google/Cloud/Batch/V1/Volume.php | Bin 1026 -> 0 bytes .../Cloud/Batch/V1/AllocationPolicy.php | 400 ---------- .../Batch/V1/AllocationPolicy/Accelerator.php | 201 ----- .../V1/AllocationPolicy/AttachedDisk.php | 153 ---- .../Cloud/Batch/V1/AllocationPolicy/Disk.php | 355 --------- .../V1/AllocationPolicy/InstancePolicy.php | 321 -------- .../InstancePolicyOrTemplate.php | 224 ------ .../V1/AllocationPolicy/LocationPolicy.php | 112 --- .../V1/AllocationPolicy/NetworkInterface.php | 202 ----- .../V1/AllocationPolicy/NetworkPolicy.php | 70 -- .../V1/AllocationPolicy/PlacementPolicy.php | 133 ---- .../V1/AllocationPolicy/ProvisioningModel.php | 75 -- .../Google/Cloud/Batch/V1/ComputeResource.php | 248 ------- .../Cloud/Batch/V1/CreateJobRequest.php | 278 ------- .../Cloud/Batch/V1/DeleteJobRequest.php | 188 ----- .../src/Google/Cloud/Batch/V1/Environment.php | 158 ---- .../Cloud/Batch/V1/Environment/KMSEnvMap.php | 102 --- .../proto/src/Google/Cloud/Batch/V1/GCS.php | 71 -- .../Google/Cloud/Batch/V1/GetJobRequest.php | 81 -- .../Google/Cloud/Batch/V1/GetTaskRequest.php | 81 -- .../proto/src/Google/Cloud/Batch/V1/Job.php | 513 ------------- .../Google/Cloud/Batch/V1/JobNotification.php | 155 ---- .../Batch/V1/JobNotification/Message.php | 144 ---- .../Cloud/Batch/V1/JobNotification/Type.php | 64 -- .../src/Google/Cloud/Batch/V1/JobStatus.php | 183 ----- .../Batch/V1/JobStatus/InstanceStatus.php | 182 ----- .../Google/Cloud/Batch/V1/JobStatus/State.php | 96 --- .../Batch/V1/JobStatus/TaskGroupStatus.php | 108 --- .../Google/Cloud/Batch/V1/LifecyclePolicy.php | 128 ---- .../Cloud/Batch/V1/LifecyclePolicy/Action.php | 64 -- .../V1/LifecyclePolicy/ActionCondition.php | 82 -- .../Google/Cloud/Batch/V1/ListJobsRequest.php | 220 ------ .../Cloud/Batch/V1/ListJobsResponse.php | 135 ---- .../Cloud/Batch/V1/ListTasksRequest.php | 201 ----- .../Cloud/Batch/V1/ListTasksResponse.php | 135 ---- .../src/Google/Cloud/Batch/V1/LogsPolicy.php | 158 ---- .../V1/LogsPolicy/CloudLoggingOption.php | 99 --- .../Cloud/Batch/V1/LogsPolicy/Destination.php | 64 -- .../proto/src/Google/Cloud/Batch/V1/NFS.php | 101 --- .../Cloud/Batch/V1/OperationMetadata.php | 307 -------- .../src/Google/Cloud/Batch/V1/Runnable.php | 452 ----------- .../Cloud/Batch/V1/Runnable/Barrier.php | 74 -- .../Cloud/Batch/V1/Runnable/Container.php | 546 -------------- .../Google/Cloud/Batch/V1/Runnable/Script.php | 147 ---- .../Google/Cloud/Batch/V1/ServiceAccount.php | 101 --- .../src/Google/Cloud/Batch/V1/StatusEvent.php | 235 ------ .../proto/src/Google/Cloud/Batch/V1/Task.php | 123 --- .../Google/Cloud/Batch/V1/TaskExecution.php | 100 --- .../src/Google/Cloud/Batch/V1/TaskGroup.php | 479 ------------ .../Batch/V1/TaskGroup/SchedulingPolicy.php | 66 -- .../src/Google/Cloud/Batch/V1/TaskSpec.php | 440 ----------- .../src/Google/Cloud/Batch/V1/TaskStatus.php | 101 --- .../Cloud/Batch/V1/TaskStatus/State.php | 92 --- .../src/Google/Cloud/Batch/V1/Volume.php | 268 ------- .../V1/BatchServiceClient/create_job.php | 81 -- .../V1/BatchServiceClient/delete_job.php | 66 -- .../samples/V1/BatchServiceClient/get_job.php | 71 -- .../V1/BatchServiceClient/get_location.php | 57 -- .../V1/BatchServiceClient/get_task.php | 77 -- .../V1/BatchServiceClient/list_jobs.php | 62 -- .../V1/BatchServiceClient/list_locations.php | 62 -- .../V1/BatchServiceClient/list_tasks.php | 83 --- .../v1/src/V1/Client/BatchServiceClient.php | 558 -------------- .../Batch/v1/src/V1/gapic_metadata.json | 58 -- .../batch_service_client_config.json | 84 --- .../batch_service_descriptor_config.php | 163 ---- .../batch_service_rest_client_config.php | 167 ----- .../Unit/V1/Client/BatchServiceClientTest.php | 701 ------------------ 73 files changed, 26 insertions(+), 12213 deletions(-) delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php delete mode 100644 owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php delete mode 100644 owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php delete mode 100644 owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json delete mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php delete mode 100644 owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php delete mode 100644 owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php diff --git a/Batch/src/V1/StatusEvent.php b/Batch/src/V1/StatusEvent.php index 293cb8c7bc93..1a199e88f2ff 100644 --- a/Batch/src/V1/StatusEvent.php +++ b/Batch/src/V1/StatusEvent.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Status event + * Status event. * * Generated from protobuf message google.cloud.batch.v1.StatusEvent */ @@ -34,13 +34,16 @@ class StatusEvent extends \Google\Protobuf\Internal\Message */ protected $event_time = null; /** - * Task Execution + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. * * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; */ protected $task_execution = null; /** - * Task State + * Task State. + * This field is only defined for task-level status events. * * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; */ @@ -59,9 +62,12 @@ class StatusEvent extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Timestamp $event_time * The time this event occurred. * @type \Google\Cloud\Batch\V1\TaskExecution $task_execution - * Task Execution + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. * @type int $task_state - * Task State + * Task State. + * This field is only defined for task-level status events. * } */ public function __construct($data = NULL) { @@ -158,7 +164,9 @@ public function setEventTime($var) } /** - * Task Execution + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. * * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; * @return \Google\Cloud\Batch\V1\TaskExecution|null @@ -179,7 +187,9 @@ public function clearTaskExecution() } /** - * Task Execution + * Task Execution. + * This field is only defined for task-level status events where the task + * fails. * * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; * @param \Google\Cloud\Batch\V1\TaskExecution $var @@ -194,7 +204,8 @@ public function setTaskExecution($var) } /** - * Task State + * Task State. + * This field is only defined for task-level status events. * * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; * @return int @@ -205,7 +216,8 @@ public function getTaskState() } /** - * Task State + * Task State. + * This field is only defined for task-level status events. * * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; * @param int $var diff --git a/Batch/src/V1/TaskStatus.php b/Batch/src/V1/TaskStatus.php index d450092f3978..8caeb3d3d49d 100644 --- a/Batch/src/V1/TaskStatus.php +++ b/Batch/src/V1/TaskStatus.php @@ -9,14 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Status of a task + * Status of a task. * * Generated from protobuf message google.cloud.batch.v1.TaskStatus */ class TaskStatus extends \Google\Protobuf\Internal\Message { /** - * Task state + * Task state. * * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; */ @@ -35,7 +35,7 @@ class TaskStatus extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $state - * Task state + * Task state. * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events * Detailed info about why the state is reached. * } @@ -46,7 +46,7 @@ public function __construct($data = NULL) { } /** - * Task state + * Task state. * * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; * @return int @@ -57,7 +57,7 @@ public function getState() } /** - * Task state + * Task state. * * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; * @param int $var diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php deleted file mode 100644 index 7f21496cde09..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Batch.php +++ /dev/null @@ -1,93 +0,0 @@ -internalAddGeneratedFile( - ' -† -!google/cloud/batch/v1/batch.protogoogle.cloud.batch.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.protogoogle/cloud/batch/v1/job.proto google/cloud/batch/v1/task.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"› -CreateJobRequest0 -parent ( B àAúAbatch.googleapis.com/Job -job_id ( , -job ( 2.google.cloud.batch.v1.JobBàA - -request_id ( BàA"? - GetJobRequest. -name ( B àAúA -batch.googleapis.com/Job"N -DeleteJobRequest -name (  -reason ( BàA - -request_id ( BàA"o -ListJobsRequest -parent (  -filter (  -order_by ( BàA - page_size ( - -page_token ( "j -ListJobsResponse( -jobs ( 2.google.cloud.batch.v1.Job -next_page_token (  - unreachable ( " -ListTasksRequest6 -parent ( B&àAúA -batch.googleapis.com/TaskGroup -filter (  - page_size ( - -page_token ( "m -ListTasksResponse* -tasks ( 2.google.cloud.batch.v1.Task -next_page_token (  - unreachable ( "A -GetTaskRequest/ -name ( B!àAúA -batch.googleapis.com/Task"€ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàA2¶ - BatchService› - CreateJob\'.google.cloud.batch.v1.CreateJobRequest.google.cloud.batch.v1.Job"IÚAparent,job,job_id‚Óä“/"(/v1/{parent=projects/*/locations/*}/jobs:jobƒ -GetJob$.google.cloud.batch.v1.GetJobRequest.google.cloud.batch.v1.Job"7ÚAname‚Óä“*(/v1/{name=projects/*/locations/*/jobs/*}Ï - DeleteJob\'.google.cloud.batch.v1.DeleteJobRequest.google.longrunning.Operation"zÊA@ -google.protobuf.Empty\'google.cloud.batch.v1.OperationMetadataÚAname‚Óä“**(/v1/{name=projects/*/locations/*/jobs/*}– -ListJobs&.google.cloud.batch.v1.ListJobsRequest\'.google.cloud.batch.v1.ListJobsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*/locations/*}/jobs› -GetTask%.google.cloud.batch.v1.GetTaskRequest.google.cloud.batch.v1.Task"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}® - ListTasks\'.google.cloud.batch.v1.ListTasksRequest(.google.cloud.batch.v1.ListTasksResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasksHÊAbatch.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB« -com.google.cloud.batch.v1B -BatchProtoPZ/cloud.google.com/go/batch/apiv1/batchpb;batchpb¢GCBªGoogle.Cloud.Batch.V1ÊGoogle\\Cloud\\Batch\\V1êGoogle::Cloud::Batch::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Job.php deleted file mode 100644 index 470c2cabe016fc4335aeb554b4d5af988fe1d960..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5994 zcmbtY-E$h(6%U{fI7kSszc6m?HA!n_5<^51C&6|czJzcjAObm)4l~?hSYPfP%ibZAZO8H~%`)WP=-_}kvStl!-C#~umMcxU(d@|8O1*OzMO|y; zXsjR)ENft}oMu>~ey*o_+F|Z!Gxyx;Ww|Z@QyntbRy8KqTBTj)seRQ`yEQJ>Et6Qc zL}J}%n-2jrLv>yGsnvtmAmg7s>KVEwyPoRd#|OHr=%()Js-gb|PyJXvPz{%%-1)T! zBUAHq%alo=X=-faLs{sgwIA3P-tw^=9Hd1T$4htXrpFvpHM$k%YL0Gumeazeg~EV& zV{_4yjSu~8Nu7QmZ-_G%3g-^_SoWL|o7`QN9p;T3^C3SsDL5H_>t0}{qOEtgbY}ER z>`*<@EvHa8z169bS)zN)_txA}XZ_OcsP2pTw;bEDGQ!|O7yJ*R9UY^_Q-}7&vfO?5 zzt(+c75n|MZ?-UAH^$Z^+unnpHsH=X0#&*u7G!xOXL%%Nk2cdceL2!MbV~ zmc~7(*cPVYacUXW#`E2KGgK7E0xiB?dH_p?+GB>Bit@dGIYSWdnBCzEtET51OP|9M zrPIhw#rTf1&Wv(xzE0TWGl**rLqJo=kf}JAO$U1hR?d!tYb-Ug5tV$YmHDI|K-{nf zZeW>JE_FB9>ueNdcW|X|lE<)WTAqHO3(LBx#Jeohm{^{^5AjJu#Ub*79gDb-R$=i- zHAYMXMIroUsPNsJVgphlnuXgjklifedXC~Mk2ZPEG|$bw_P?Fv0-xiv;OhwiI{wE0 zCz-#80VeKKf_NWORX2H{@RKC+_upxUEaGb*gy9_%wp6`Cad_!_xXNv);ERE74iw8K zDB*z}&wuuA{T#yZoFv@jvgGYhdJClUucS}l{gKO*0To1DQ+U=4Evy`t!}>~)`22QJ zt|wE2_~aFC!Hr6_-KjT^Iu2YPr5uuU3-p;r&+2JI(!yveT^9>Wx}5Bt>DN zRqSjh!dL4FzG8;C9#pKup?%AE?SXtJu|~jLbggv zrRqf>@yQIq@j*}F!WAi-gB53FDgnZ!7I{M44D^hXFDMG>e}o`WH}TY1o5gvgtFSUu zwL{&+R6MqQxRdrlLg^#jMgLPI46Qyhc$g&eUj_Q75^fravaJaXyQF}Ej=LGT$qOGZ zpFpf+89UuOYOjtW{t=vA?}k$Gc;acTA?9Z=HkN4 zC5Y+1(E=yu-l_1cnF&KCRnEqc2w_NCo4Awj>@y-yCSfO@zeMPW`_U$u*RV*xm~;)+ z+nr*kI+a2IOW*BR_c5J9h;y-adAnNK-@%_@DGtkf`;7+WRfNCWFPE#;3cg#AP;9GM zr*(@`3a(bFJ5`>a^@h^gYu5Iv?RIi0^Pe!Rq4_6)mSPdfr#tE?o@MKr53x^R8HtIj z4g|=?^V!+PpH!FK6;kQHgkahKj!C;P4)a9*qd7HoFf$~oBJ8E|-0CSVhYR8X^TWjx zNRT*>e<4qVAu+qMQ&0Epb@*bcWdZ%T4g4Em$_0_tJ7+_|)w4 zd9^fzm~Ww{5W`z(Y={LR1swRkm{(IP5cG8+SM}6^i|i{RxN0c<5hSKua#OI&msnf_ zCkuRxrGJD4!cu7s7WE+|8Ub-^`#nj5sB5aWduVyQy3n(gi4=;V$g+!#p)%<4@(_`( zLxQjzn?~&F4)B7hB~n&eMbd(8s3Q8J^zTEkQuI75J*?07{sy9yA0+F?-lggQ9_$9J zvR67$oPkioi8{WxLVSsb4QKR}cd-&cRQ2~yA3_{sgkjgMBKw%SAyPaMYosnB-GM8- z8W@H$ut!SY(T|wp@@f_>g;OEv78-y*ROkf}C~i$bg?<+~t-!wXrYkT%H6mwnsGEw0 zTTt*HSk92|5t~t)X^;P_HrHVVlPa)*i|!^iGk1zi+V4zFkK(~DS<^957by;03>`Ye zEb4hKPtOEY3gSp25dj2Crap@IaUr5XshJ?N4NJD@yr}cL1OlGbh+%gN)_J5L*-|_o z!vxjlFK365blaE27_)3w!Hh(VAP);7Tv~@UamKOU^!JeT@ueOl9_3~LRlJMEbOx-h z!7~wPx8b^JDeRS)!6>?|sQo?~&JXD{gVnRZ)d9)ZaGK)*(fV>;1oKsn&zgP&YtyKP zX^V5Q0IPg9z_aBQ*vX725uuic~);@Gl9fL*=-_qnW9815XA!9 zs1)~z6k$WrZZ$i|ht?q8+N)M~Tb+7or<#mp{s~}kgXFLuN4mq5L(BDC z7eq&Mk1T%&%$p9{Qhu3`c6^(x1cEYJ8rY<(+-D zMDyhAv(3K-&%6Gh*`GAysQFDeB}57ZE>kFQp+e!=W^V~?qmNg4nE diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Task.php deleted file mode 100644 index 8bac0e2979dfcdf792061b2ffe0587f0a437420b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3962 zcmbVP&2k$>5RN2Uwp#wnKoVJ1kc|k$0kXnMRRRi0kYvTElE}i6%}=RnYqT2Mi&wkL z?yM6*`31P}1{^r%4Y+aU!UJ&OoFjLt=$YA-Wntlf57zE%e>45_b@%kg54{5q-qJRi z!+gqFU+WDue!w)(ce!i2w$=;x_L#4k?!dEb=Iffav86S)I$C|B(Yc1uzzuzqm9>4> z-M3lMwB4{@>``tW6pz-6oCb%w+zh~>0~UDHWZGt{`jm0nr<`^-C9Yc&xNcS8y1VQ5 z08E<(f!0Ahd98z<02Im{T7Or%lnLv941!QZbrw7 z?W{d*P3c%J|3k_98uvpse!8aljEBB+PwFi;I37K9&+t>lv$~HgX7{V?fF4<{UoM|m zb+XAc=r)Vu^~$Kzf$8qLb~s?Ke(1=X8zB-5gYZ9~9Se!W>A*W1D+74zffa?T((jL= z^9VV+Hu9(N?hW`k2j`NNTvBw_C7pFiXZ>hBzZ$WedREboT&d`tFPxnKN77%B%$t#n zObDb{u^%}l`hIotJC7|_0);JDu3;vIoW+487a?PMp)s&*+sY-h#9E3FfB_r0{t#Dt zxujgX1dBb_^7UAjU}j0Q zNGX<^MdVVcd*ffA${Jn#utEVAPj83bV$UsZm~Nj*du9uNCIEzx0+Ks0tIiU>{10c5 zk6=*%!@!X43D7kuG_x>8S9P59df^+G6|an3f{X1=rBgR{n(bD-)_ByYZ>(G(S(t0p zn;VVh=1KxXG+$}A8=Fo1loX$~cbZM{DTQ%QKdLmI;D;Hq2$}XytyZsZ;Oi_|0@!KR zzo^%CI{2P0{FsLM?a*;(&t~KSa>#W!wXh3FuVhO%r>Grc^jZw~^aA-1(yBs6ba>}H za9h?>M3!N$M}6PIbJLO)Q)4?ixT@q4yb23QXV0cXL-ZERYb0$o^+zQ^@<6P8$MqS~ z4#TYiBUwE!(xXSs!+qZkoxUWaT%-0gIt&aybR^B@$z8}Y=g9J1XMl9i%}M>Hg|mJl zN#2DyksEHvbMq3k8v7$od_As)$nUgGd&~}U8A+G-V$q4L7@7Y>O4l9k5A(kzATx@C zs07x4?lU9wRVB!f6`04)J)lls(J>>8M`Qe<=VHB#(tH`_RGA9U$Q0&1F1VgZ)j%4M zA#cLvp6!|z z(Shac=N7~sGH&_XkXGD4!p?YDj||L zlfMPoF?V6Eqz>6IDr1WS4f9vOVjdWvbNubl>vP&C~3rj(`JU};$_NWG3};l^dttfg#3^^hJ~@52ry}dE7qsDB6goXmK}kl zZZ(-pU?(}nyKL!=Df_5P$7Di^be~>d$Bsl+T^xH=8l1<5!uLs7o;3eHq^Z10N)j!V zZcR~m0;g9bh_qlu!7(mQA1|-i3`Kj+mhSwgjWFjGI{!8-tG!1{GQ;B*7oeW0wb{Z$ zNJlDM22!bY8e7eY7K8m^yWZLU(&$v$kFm>O`w*=}y(SC4Bw$8F^K^odbu9d{=S5~* zn_|XEe=R?IS>dp%ZdB^hfS0L2$4n{813t$Z`86|nQ2Z`>Ixb@Ak#|R2iyx1RU%Neg z$N$H2%Gktm?%@I#cMVb7J+&S!9T$E`L3WGqH&@fb|sjWLqPDK5Woz^z zN-~x|)hcCu6!$yR@(!49oRrr52e34u&^dK8e+OPa(~xs;)fWj^#kiksQ8gpz&=SK~ zEAf?@D@T$@mVGyxGLb$wXi7qPy?fE`Ps!9~t@qG zMuR6#o-dO*1u2&$rd*bwa(Q>XmzM4O_Knd%@xB`8#-=}!4VHPvN7e0B`S0Dl80 CUcli1 diff --git a/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/GPBMetadata/Google/Cloud/Batch/V1/Volume.php deleted file mode 100644 index fa8ca8061c1c73d2e747bfcc335cfc3d120737af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1026 zcmaiz-Hy^g6vqXW$Pm52kkq|8;wB45OIYuUXk>A5FI-66aABH|VK~4fZKs(|N!0K% zUT%C6U&O?xa6Yfp5*D99Z4go^lwcx)MZQ|0 z1SaB?M<{)O(FD#X7w~R$cJV}8Gm%S%0jz~sN7!YN$d}y(RczDU_PSdUq^r_mm!LeDyYt6rvNd_8)2mMD}7jlvOT zO!8C-In~l2Sfkosnu)YKMOl-Mub}OE41ya?4nWBquU7|BskXjC9R1ukugn_{2z?q`t&0XE-+~cvWqw>2QOPSmcSCr&MjcyC$lo4_r*7 zW^b8y4=U~2@II+J;#$v0Mb~dU)B%)Rl(yGe;}NM#jD_CrZy#}3clTj|n3g^{zV})Ych{nzou*s^Z|^c)^o#RbSr;B&mYWW8-$L$N$o*OG z$5lKm=r8cs{QoL@&JqOH69m>21hd|vYJaDfNBiABcSv0$@UQe)r2}n8c7*%}XQevv diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php deleted file mode 100644 index f438a67a782e..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy.php +++ /dev/null @@ -1,400 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy - */ -class AllocationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Location where compute resources should be allocated for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; - */ - protected $location = null; - /** - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; - */ - private $instances; - /** - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * - * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; - */ - protected $service_account = null; - /** - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 6; - */ - private $labels; - /** - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; - */ - protected $network = null; - /** - * The placement policy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; - */ - protected $placement = null; - /** - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $location - * Location where compute resources should be allocated for the Job. - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $instances - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * @type \Google\Cloud\Batch\V1\ServiceAccount $service_account - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $network - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $placement - * The placement policy. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Location where compute resources should be allocated for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy|null - */ - public function getLocation() - { - return $this->location; - } - - public function hasLocation() - { - return isset($this->location); - } - - public function clearLocation() - { - unset($this->location); - } - - /** - * Location where compute resources should be allocated for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\LocationPolicy::class); - $this->location = $var; - - return $this; - } - - /** - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Describe instances that can be created by this AllocationPolicy. - * Only instances[0] is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicyOrTemplate::class); - $this->instances = $arr; - - return $this; - } - - /** - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * - * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; - * @return \Google\Cloud\Batch\V1\ServiceAccount|null - */ - public function getServiceAccount() - { - return $this->service_account; - } - - public function hasServiceAccount() - { - return isset($this->service_account); - } - - public function clearServiceAccount() - { - unset($this->service_account); - } - - /** - * Defines the service account for Batch-created VMs. If omitted, the [default - * Compute Engine service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. Must match the service account specified in any used instance - * template configured in the Batch job. - * Includes the following fields: - * * email: The service account's email address. If not set, the default - * Compute Engine service account is used. - * * scopes: Additional OAuth scopes to grant the service account, beyond the - * default cloud-platform scope. (list of strings) - * - * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; - * @param \Google\Cloud\Batch\V1\ServiceAccount $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ServiceAccount::class); - $this->service_account = $var; - - return $this; - } - - /** - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels applied to all VM instances and other resources - * created by AllocationPolicy. - * Labels could be user provided or system generated. - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * 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; - } - - /** - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * The network policy. - * If you define an instance template in the `InstancePolicyOrTemplate` field, - * Batch will use the network settings in the instance template instead of - * this field. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkPolicy::class); - $this->network = $var; - - return $this; - } - - /** - * The placement policy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy|null - */ - public function getPlacement() - { - return $this->placement; - } - - public function hasPlacement() - { - return isset($this->placement); - } - - public function clearPlacement() - { - unset($this->placement); - } - - /** - * The placement policy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy $var - * @return $this - */ - public function setPlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\PlacementPolicy::class); - $this->placement = $var; - - return $this; - } - - /** - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Tags applied to the VM instances. - * The tags identify valid sources or targets for network firewalls. - * Each tag must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field repeated string tags = 11 [(.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; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php deleted file mode 100644 index a035df7f534c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Accelerator.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.Accelerator - */ -class Accelerator extends \Google\Protobuf\Internal\Message -{ - /** - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * The number of accelerators of this type. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - /** - * Deprecated: please use instances[0].install_gpu_drivers instead. - * - * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; - * @deprecated - */ - protected $install_gpu_drivers = false; - /** - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * - * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $driver_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * @type int|string $count - * The number of accelerators of this type. - * @type bool $install_gpu_drivers - * Deprecated: please use instances[0].install_gpu_drivers instead. - * @type string $driver_version - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The accelerator type. For example, "nvidia-tesla-t4". - * See `gcloud compute accelerator-types list`. - * - * 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; - } - - /** - * The number of accelerators of this type. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * The number of accelerators of this type. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Deprecated: please use instances[0].install_gpu_drivers instead. - * - * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getInstallGpuDrivers() - { - @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); - return $this->install_gpu_drivers; - } - - /** - * Deprecated: please use instances[0].install_gpu_drivers instead. - * - * Generated from protobuf field bool install_gpu_drivers = 3 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setInstallGpuDrivers($var) - { - @trigger_error('install_gpu_drivers is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->install_gpu_drivers = $var; - - return $this; - } - - /** - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * - * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDriverVersion() - { - return $this->driver_version; - } - - /** - * Optional. The NVIDIA GPU driver version that should be installed for this - * type. - * You can define the specific driver version such as "470.103.01", - * following the driver version requirements in - * https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. - * Batch will install the specific accelerator driver if qualified. - * - * Generated from protobuf field string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDriverVersion($var) - { - GPBUtil::checkString($var, True); - $this->driver_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Accelerator::class, \Google\Cloud\Batch\V1\AllocationPolicy_Accelerator::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php deleted file mode 100644 index d57b97912d09..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/AttachedDisk.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.AttachedDisk - */ -class AttachedDisk extends \Google\Protobuf\Internal\Message -{ - /** - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * - * Generated from protobuf field string device_name = 3; - */ - protected $device_name = ''; - protected $attached; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $new_disk - * @type string $existing_disk - * Name of an existing PD. - * @type string $device_name - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null - */ - public function getNewDisk() - { - return $this->readOneof(1); - } - - public function hasNewDisk() - { - return $this->hasOneof(1); - } - - /** - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var - * @return $this - */ - public function setNewDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Name of an existing PD. - * - * Generated from protobuf field string existing_disk = 2; - * @return string - */ - public function getExistingDisk() - { - return $this->readOneof(2); - } - - public function hasExistingDisk() - { - return $this->hasOneof(2); - } - - /** - * Name of an existing PD. - * - * Generated from protobuf field string existing_disk = 2; - * @param string $var - * @return $this - */ - public function setExistingDisk($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * - * Generated from protobuf field string device_name = 3; - * @return string - */ - public function getDeviceName() - { - return $this->device_name; - } - - /** - * Device name that the guest operating system will see. - * It is used by Runnable.volumes field to mount disks. So please specify - * the device_name if you want Batch to help mount the disk, and it should - * match the device_name field in volumes. - * - * Generated from protobuf field string device_name = 3; - * @param string $var - * @return $this - */ - public function setDeviceName($var) - { - GPBUtil::checkString($var, True); - $this->device_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getAttached() - { - return $this->whichOneof("attached"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttachedDisk::class, \Google\Cloud\Batch\V1\AllocationPolicy_AttachedDisk::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php deleted file mode 100644 index 4abf60b5f58d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/Disk.php +++ /dev/null @@ -1,355 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.Disk - */ -class Disk extends \Google\Protobuf\Internal\Message -{ - /** - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * - * Generated from protobuf field int64 size_gb = 2; - */ - protected $size_gb = 0; - /** - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * - * Generated from protobuf field string disk_interface = 6; - */ - protected $disk_interface = ''; - protected $data_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image - * URL for a VM image to use as the data source for this disk. - * For example, the following are all valid URLs: - * * Specify the image by its family name: - * projects/{project}/global/images/family/{image_family} - * * Specify the image version: - * projects/{project}/global/images/{image_version} - * You can also use Batch customized image in short names. - * The following image values are supported for a boot disk: - * * `batch-debian`: use Batch Debian images. - * * `batch-centos`: use Batch CentOS images. - * * `batch-cos`: use Batch Container-Optimized images. - * * `batch-hpc-centos`: use Batch HPC CentOS images. - * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - * @type string $snapshot - * Name of a snapshot used as the data source. - * Snapshot is not supported as boot disk now. - * @type string $type - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * @type int|string $size_gb - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * @type string $disk_interface - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * URL for a VM image to use as the data source for this disk. - * For example, the following are all valid URLs: - * * Specify the image by its family name: - * projects/{project}/global/images/family/{image_family} - * * Specify the image version: - * projects/{project}/global/images/{image_version} - * You can also use Batch customized image in short names. - * The following image values are supported for a boot disk: - * * `batch-debian`: use Batch Debian images. - * * `batch-centos`: use Batch CentOS images. - * * `batch-cos`: use Batch Container-Optimized images. - * * `batch-hpc-centos`: use Batch HPC CentOS images. - * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - * - * Generated from protobuf field string image = 4; - * @return string - */ - public function getImage() - { - return $this->readOneof(4); - } - - public function hasImage() - { - return $this->hasOneof(4); - } - - /** - * URL for a VM image to use as the data source for this disk. - * For example, the following are all valid URLs: - * * Specify the image by its family name: - * projects/{project}/global/images/family/{image_family} - * * Specify the image version: - * projects/{project}/global/images/{image_version} - * You can also use Batch customized image in short names. - * The following image values are supported for a boot disk: - * * `batch-debian`: use Batch Debian images. - * * `batch-centos`: use Batch CentOS images. - * * `batch-cos`: use Batch Container-Optimized images. - * * `batch-hpc-centos`: use Batch HPC CentOS images. - * * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. - * - * Generated from protobuf field string image = 4; - * @param string $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Name of a snapshot used as the data source. - * Snapshot is not supported as boot disk now. - * - * Generated from protobuf field string snapshot = 5; - * @return string - */ - public function getSnapshot() - { - return $this->readOneof(5); - } - - public function hasSnapshot() - { - return $this->hasOneof(5); - } - - /** - * Name of a snapshot used as the data source. - * Snapshot is not supported as boot disk now. - * - * Generated from protobuf field string snapshot = 5; - * @param string $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Disk type as shown in `gcloud compute disk-types list`. - * For example, local SSD uses type "local-ssd". - * Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" - * or "pd-standard". If not specified, "pd-standard" will be used as the - * default type for non-boot disks, "pd-balanced" will be used as the - * default type for boot disks. - * - * 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; - } - - /** - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * - * Generated from protobuf field int64 size_gb = 2; - * @return int|string - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * Disk size in GB. - * **Non-Boot Disk**: - * If the `type` specifies a persistent disk, this field - * is ignored if `data_source` is set as `image` or `snapshot`. - * If the `type` specifies a local SSD, this field should be a multiple of - * 375 GB, otherwise, the final size will be the next greater multiple of - * 375 GB. - * **Boot Disk**: - * Batch will calculate the boot disk size based on source - * image and task requirements if you do not speicify the size. - * If both this field and the `boot_disk_mib` field in task spec's - * `compute_resource` are defined, Batch will only honor this field. - * Also, this field should be no smaller than the source disk's - * size when the `data_source` is set as `snapshot` or `image`. - * For example, if you set an image as the `data_source` field and the - * image's default disk size 30 GB, you can only use this field to make the - * disk larger or equal to 30 GB. - * - * Generated from protobuf field int64 size_gb = 2; - * @param int|string $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->size_gb = $var; - - return $this; - } - - /** - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * - * Generated from protobuf field string disk_interface = 6; - * @return string - */ - public function getDiskInterface() - { - return $this->disk_interface; - } - - /** - * Local SSDs are available through both "SCSI" and "NVMe" interfaces. - * If not indicated, "NVMe" will be the default one for local ssds. - * This field is ignored for persistent disks as the interface is chosen - * automatically. See - * https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. - * - * Generated from protobuf field string disk_interface = 6; - * @param string $var - * @return $this - */ - public function setDiskInterface($var) - { - GPBUtil::checkString($var, True); - $this->disk_interface = $var; - - return $this; - } - - /** - * @return string - */ - public function getDataSource() - { - return $this->whichOneof("data_source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Disk::class, \Google\Cloud\Batch\V1\AllocationPolicy_Disk::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php deleted file mode 100644 index 23e02e3a0f2f..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicy.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.InstancePolicy - */ -class InstancePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 2; - */ - protected $machine_type = ''; - /** - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string min_cpu_platform = 3; - */ - protected $min_cpu_platform = ''; - /** - * The provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; - */ - protected $provisioning_model = 0; - /** - * The accelerators attached to each VM instance. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; - */ - private $accelerators; - /** - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; - */ - protected $boot_disk = null; - /** - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; - */ - private $disks; - /** - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * - * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reservation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * The Compute Engine machine type. - * @type string $min_cpu_platform - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * @type int $provisioning_model - * The provisioning model. - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $accelerators - * The accelerators attached to each VM instance. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $disks - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * @type string $reservation - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 2; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 2; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string min_cpu_platform = 3; - * @return string - */ - public function getMinCpuPlatform() - { - return $this->min_cpu_platform; - } - - /** - * The minimum CPU platform. - * See - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string min_cpu_platform = 3; - * @param string $var - * @return $this - */ - public function setMinCpuPlatform($var) - { - GPBUtil::checkString($var, True); - $this->min_cpu_platform = $var; - - return $this; - } - - /** - * The provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; - * @return int - */ - public function getProvisioningModel() - { - return $this->provisioning_model; - } - - /** - * The provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4; - * @param int $var - * @return $this - */ - public function setProvisioningModel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); - $this->provisioning_model = $var; - - return $this; - } - - /** - * The accelerators attached to each VM instance. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccelerators() - { - return $this->accelerators; - } - - /** - * The accelerators attached to each VM instance. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\Accelerator>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccelerators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\Accelerator::class); - $this->accelerators = $arr; - - return $this; - } - - /** - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null - */ - public function getBootDisk() - { - return $this->boot_disk; - } - - public function hasBootDisk() - { - return isset($this->boot_disk); - } - - public function clearBootDisk() - { - unset($this->boot_disk); - } - - /** - * Boot disk to be created and attached to each VM by this InstancePolicy. - * Boot disk will be deleted when the VM is deleted. - * Batch API now only supports booting from image. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var - * @return $this - */ - public function setBootDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); - $this->boot_disk = $var; - - return $this; - } - - /** - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDisks() - { - return $this->disks; - } - - /** - * Non-boot disks to be attached for each VM created by this InstancePolicy. - * New disks will be deleted when the VM is deleted. - * A non-boot disk is a disk that can be of a device with a - * file system or a raw storage drive that is not ready for data - * storage and accessing. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\AttachedDisk::class); - $this->disks = $arr; - - return $this; - } - - /** - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * - * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReservation() - { - return $this->reservation; - } - - /** - * Optional. If specified, VMs will consume only the specified reservation. - * If not specified (default), VMs will consume any applicable reservation. - * - * Generated from protobuf field string reservation = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReservation($var) - { - GPBUtil::checkString($var, True); - $this->reservation = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstancePolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php deleted file mode 100644 index 1946698543b7..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/InstancePolicyOrTemplate.php +++ /dev/null @@ -1,224 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate - */ -class InstancePolicyOrTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * - * Generated from protobuf field bool install_gpu_drivers = 3; - */ - protected $install_gpu_drivers = false; - /** - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * - * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $install_ops_agent = false; - protected $policy_template; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $policy - * InstancePolicy. - * @type string $instance_template - * Name of an instance template used to create VMs. - * Named the field as 'instance_template' instead of 'template' to avoid - * c++ keyword conflict. - * @type bool $install_gpu_drivers - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * @type bool $install_ops_agent - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * InstancePolicy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy|null - */ - public function getPolicy() - { - return $this->readOneof(1); - } - - public function hasPolicy() - { - return $this->hasOneof(1); - } - - /** - * InstancePolicy. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\InstancePolicy::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Name of an instance template used to create VMs. - * Named the field as 'instance_template' instead of 'template' to avoid - * c++ keyword conflict. - * - * Generated from protobuf field string instance_template = 2; - * @return string - */ - public function getInstanceTemplate() - { - return $this->readOneof(2); - } - - public function hasInstanceTemplate() - { - return $this->hasOneof(2); - } - - /** - * Name of an instance template used to create VMs. - * Named the field as 'instance_template' instead of 'template' to avoid - * c++ keyword conflict. - * - * Generated from protobuf field string instance_template = 2; - * @param string $var - * @return $this - */ - public function setInstanceTemplate($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * - * Generated from protobuf field bool install_gpu_drivers = 3; - * @return bool - */ - public function getInstallGpuDrivers() - { - return $this->install_gpu_drivers; - } - - /** - * Set this field true if you want Batch to help fetch drivers from a third - * party location and install them for GPUs specified in - * `policy.accelerators` or `instance_template` on your behalf. Default is - * false. - * For Container-Optimized Image cases, Batch will install the - * accelerator driver following milestones of - * https://cloud.google.com/container-optimized-os/docs/release-notes. For - * non Container-Optimized Image cases, following - * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. - * - * Generated from protobuf field bool install_gpu_drivers = 3; - * @param bool $var - * @return $this - */ - public function setInstallGpuDrivers($var) - { - GPBUtil::checkBool($var); - $this->install_gpu_drivers = $var; - - return $this; - } - - /** - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * - * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getInstallOpsAgent() - { - return $this->install_ops_agent; - } - - /** - * Optional. Set this field true if you want Batch to install Ops Agent on - * your behalf. Default is false. - * - * Generated from protobuf field bool install_ops_agent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setInstallOpsAgent($var) - { - GPBUtil::checkBool($var); - $this->install_ops_agent = $var; - - return $this; - } - - /** - * @return string - */ - public function getPolicyTemplate() - { - return $this->whichOneof("policy_template"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstancePolicyOrTemplate::class, \Google\Cloud\Batch\V1\AllocationPolicy_InstancePolicyOrTemplate::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php deleted file mode 100644 index cb5fbeb79a66..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/LocationPolicy.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.LocationPolicy - */ -class LocationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * - * Generated from protobuf field repeated string allowed_locations = 1; - */ - private $allowed_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_locations - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * - * Generated from protobuf field repeated string allowed_locations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedLocations() - { - return $this->allowed_locations; - } - - /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. - * - * Generated from protobuf field repeated string allowed_locations = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_locations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LocationPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_LocationPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php deleted file mode 100644 index 1c4b064ed7e0..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkInterface.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.NetworkInterface - */ -class NetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * - * Generated from protobuf field string subnetwork = 2; - */ - protected $subnetwork = ''; - /** - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * - * Generated from protobuf field bool no_external_ip_address = 3; - */ - protected $no_external_ip_address = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * @type string $subnetwork - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * @type bool $no_external_ip_address - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The URL of an existing network resource. - * You can specify the network as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - * * projects/{project}/global/networks/{network} - * * global/networks/{network} - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * - * Generated from protobuf field string subnetwork = 2; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * The URL of an existing subnetwork resource in the network. - * You can specify the subnetwork as a full or partial URL. - * For example, the following are all valid URLs: - * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * projects/{project}/regions/{region}/subnetworks/{subnetwork} - * * regions/{region}/subnetworks/{subnetwork} - * - * Generated from protobuf field string subnetwork = 2; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * - * Generated from protobuf field bool no_external_ip_address = 3; - * @return bool - */ - public function getNoExternalIpAddress() - { - return $this->no_external_ip_address; - } - - /** - * Default is false (with an external IP address). Required if - * no external public IP address is attached to the VM. If no external - * public IP address, additional configuration is required to allow the VM - * to access Google Services. See - * https://cloud.google.com/vpc/docs/configure-private-google-access and - * https://cloud.google.com/nat/docs/gce-example#create-nat for more - * information. - * - * Generated from protobuf field bool no_external_ip_address = 3; - * @param bool $var - * @return $this - */ - public function setNoExternalIpAddress($var) - { - GPBUtil::checkBool($var); - $this->no_external_ip_address = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkInterface::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkInterface::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php deleted file mode 100644 index f402f3e8e3d2..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/NetworkPolicy.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.NetworkPolicy - */ -class NetworkPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Network configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; - */ - private $network_interfaces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * Network configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Network configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * Network configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.AllocationPolicy.NetworkInterface network_interfaces = 1; - * @param array<\Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\AllocationPolicy\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_NetworkPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php deleted file mode 100644 index 2b9777719d46..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/PlacementPolicy.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.PlacementPolicy - */ -class PlacementPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * - * Generated from protobuf field string collocation = 1; - */ - protected $collocation = ''; - /** - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * - * Generated from protobuf field int64 max_distance = 2; - */ - protected $max_distance = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collocation - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * @type int|string $max_distance - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * - * Generated from protobuf field string collocation = 1; - * @return string - */ - public function getCollocation() - { - return $this->collocation; - } - - /** - * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you - * want VMs to be located close to each other for low network latency - * between the VMs. No placement policy will be generated when collocation - * is UNSPECIFIED. - * - * Generated from protobuf field string collocation = 1; - * @param string $var - * @return $this - */ - public function setCollocation($var) - { - GPBUtil::checkString($var, True); - $this->collocation = $var; - - return $this; - } - - /** - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * - * Generated from protobuf field int64 max_distance = 2; - * @return int|string - */ - public function getMaxDistance() - { - return $this->max_distance; - } - - /** - * When specified, causes the job to fail if more than max_distance logical - * switches are required between VMs. Batch uses the most compact possible - * placement of VMs even when max_distance is not specified. An explicit - * max_distance makes that level of compactness a strict requirement. - * Not yet implemented - * - * Generated from protobuf field int64 max_distance = 2; - * @param int|string $var - * @return $this - */ - public function setMaxDistance($var) - { - GPBUtil::checkInt64($var); - $this->max_distance = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PlacementPolicy::class, \Google\Cloud\Batch\V1\AllocationPolicy_PlacementPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php deleted file mode 100644 index 62a6191c61cb..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/AllocationPolicy/ProvisioningModel.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.batch.v1.AllocationPolicy.ProvisioningModel - */ -class ProvisioningModel -{ - /** - * Unspecified. - * - * Generated from protobuf enum PROVISIONING_MODEL_UNSPECIFIED = 0; - */ - const PROVISIONING_MODEL_UNSPECIFIED = 0; - /** - * Standard VM. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * SPOT VM. - * - * Generated from protobuf enum SPOT = 2; - */ - const SPOT = 2; - /** - * Preemptible VM (PVM). - * Above SPOT VM is the preferable model for preemptible VM instances: the - * old preemptible VM model (indicated by this field) is the older model, - * and has been migrated to use the SPOT model as the underlying technology. - * This old model will still be supported. - * - * Generated from protobuf enum PREEMPTIBLE = 3; - */ - const PREEMPTIBLE = 3; - - private static $valueToName = [ - self::PROVISIONING_MODEL_UNSPECIFIED => 'PROVISIONING_MODEL_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::SPOT => 'SPOT', - self::PREEMPTIBLE => 'PREEMPTIBLE', - ]; - - 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(ProvisioningModel::class, \Google\Cloud\Batch\V1\AllocationPolicy_ProvisioningModel::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php deleted file mode 100644 index 71cfcd4d50f6..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ComputeResource.php +++ /dev/null @@ -1,248 +0,0 @@ -google.cloud.batch.v1.ComputeResource - */ -class ComputeResource extends \Google\Protobuf\Internal\Message -{ - /** - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * - * Generated from protobuf field int64 cpu_milli = 1; - */ - protected $cpu_milli = 0; - /** - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * - * Generated from protobuf field int64 memory_mib = 2; - */ - protected $memory_mib = 0; - /** - * Extra boot disk size in MiB for each task. - * - * Generated from protobuf field int64 boot_disk_mib = 4; - */ - protected $boot_disk_mib = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $cpu_milli - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * @type int|string $memory_mib - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * @type int|string $boot_disk_mib - * Extra boot disk size in MiB for each task. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * - * Generated from protobuf field int64 cpu_milli = 1; - * @return int|string - */ - public function getCpuMilli() - { - return $this->cpu_milli; - } - - /** - * The milliCPU count. - * `cpuMilli` defines the amount of CPU resources per task in milliCPU units. - * For example, `1000` corresponds to 1 vCPU per task. If undefined, the - * default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the CPU resources for both fields are compatible with each - * other and with how many tasks you want to allow to run on the same VM at - * the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 2 - * vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or - * you are recommended to run two tasks on the same VM if you set `cpuMilli` - * to `1000` or less. - * - * Generated from protobuf field int64 cpu_milli = 1; - * @param int|string $var - * @return $this - */ - public function setCpuMilli($var) - { - GPBUtil::checkInt64($var); - $this->cpu_milli = $var; - - return $this; - } - - /** - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * - * Generated from protobuf field int64 memory_mib = 2; - * @return int|string - */ - public function getMemoryMib() - { - return $this->memory_mib; - } - - /** - * Memory in MiB. - * `memoryMib` defines the amount of memory per task in MiB units. - * If undefined, the default value is `2000`. - * If you also define the VM's machine type using the `machineType` in - * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) - * field or inside the `instanceTemplate` in the - * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) - * field, make sure the memory resources for both fields are compatible with - * each other and with how many tasks you want to allow to run on the same VM - * at the same time. - * For example, if you specify the `n2-standard-2` machine type, which has 8 - * GiB each, you are recommended to set `memoryMib` to no more than `8192`, - * or you are recommended to run two tasks on the same VM if you set - * `memoryMib` to `4096` or less. - * - * Generated from protobuf field int64 memory_mib = 2; - * @param int|string $var - * @return $this - */ - public function setMemoryMib($var) - { - GPBUtil::checkInt64($var); - $this->memory_mib = $var; - - return $this; - } - - /** - * Extra boot disk size in MiB for each task. - * - * Generated from protobuf field int64 boot_disk_mib = 4; - * @return int|string - */ - public function getBootDiskMib() - { - return $this->boot_disk_mib; - } - - /** - * Extra boot disk size in MiB for each task. - * - * Generated from protobuf field int64 boot_disk_mib = 4; - * @param int|string $var - * @return $this - */ - public function setBootDiskMib($var) - { - GPBUtil::checkInt64($var); - $this->boot_disk_mib = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php deleted file mode 100644 index fdec8fae5402..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/CreateJobRequest.php +++ /dev/null @@ -1,278 +0,0 @@ -google.cloud.batch.v1.CreateJobRequest - */ -class CreateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * Generated from protobuf field string job_id = 2; - */ - protected $job_id = ''; - /** - * Required. The Job to create. - * - * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * Please see {@see BatchServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Batch\V1\Job $job Required. The Job to create. - * @param string $jobId ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * @return \Google\Cloud\Batch\V1\CreateJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Batch\V1\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 parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * @type string $job_id - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * @type \Google\Cloud\Batch\V1\Job $job - * Required. The Job to create. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * - * 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 parent resource name where the Job will be created. - * Pattern: "projects/{project}/locations/{location}" - * - * 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; - } - - /** - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * Generated from protobuf field string job_id = 2; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * ID used to uniquely identify the Job within its parent scope. - * This field should contain at most 63 characters and must start with - * lowercase characters. - * Only lowercase characters, numbers and '-' are accepted. - * The '-' character cannot be the first or the last one. - * A system generated ID will be used if the field is not set. - * The job.name field in the request will be ignored and the created resource - * name of the Job will be "{parent}/jobs/{job_id}". - * - * Generated from protobuf field string job_id = 2; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * Required. The Job to create. - * - * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Batch\V1\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 create. - * - * Generated from protobuf field .google.cloud.batch.v1.Job job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Batch\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Job::class); - $this->job = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php deleted file mode 100644 index 0acc2dfbbac6..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/DeleteJobRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.batch.v1.DeleteJobRequest - */ -class DeleteJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Job name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. Reason for this deletion. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reason = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Job name. - * - * @return \Google\Cloud\Batch\V1\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 - * Job name. - * @type string $reason - * Optional. Reason for this deletion. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Job name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Job name. - * - * 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. Reason for this deletion. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Optional. Reason for this deletion. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php deleted file mode 100644 index 058a8d4ccc90..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.batch.v1.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * A map of environment variable names to values. - * - * Generated from protobuf field map variables = 1; - */ - private $variables; - /** - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * - * Generated from protobuf field map secret_variables = 2; - */ - private $secret_variables; - /** - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; - */ - protected $encrypted_variables = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $variables - * A map of environment variable names to values. - * @type array|\Google\Protobuf\Internal\MapField $secret_variables - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * @type \Google\Cloud\Batch\V1\Environment\KMSEnvMap $encrypted_variables - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * A map of environment variable names to values. - * - * Generated from protobuf field map variables = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVariables() - { - return $this->variables; - } - - /** - * A map of environment variable names to values. - * - * Generated from protobuf field map variables = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->variables = $arr; - - return $this; - } - - /** - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * - * Generated from protobuf field map secret_variables = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSecretVariables() - { - return $this->secret_variables; - } - - /** - * A map of environment variable names to Secret Manager secret names. - * The VM will access the named secrets to set the value of each environment - * variable. - * - * Generated from protobuf field map secret_variables = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSecretVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->secret_variables = $arr; - - return $this; - } - - /** - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; - * @return \Google\Cloud\Batch\V1\Environment\KMSEnvMap|null - */ - public function getEncryptedVariables() - { - return $this->encrypted_variables; - } - - public function hasEncryptedVariables() - { - return isset($this->encrypted_variables); - } - - public function clearEncryptedVariables() - { - unset($this->encrypted_variables); - } - - /** - * An encrypted JSON dictionary where the key/value pairs correspond to - * environment variable names and their values. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3; - * @param \Google\Cloud\Batch\V1\Environment\KMSEnvMap $var - * @return $this - */ - public function setEncryptedVariables($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment\KMSEnvMap::class); - $this->encrypted_variables = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php deleted file mode 100644 index 91b995831e11..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Environment/KMSEnvMap.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.batch.v1.Environment.KMSEnvMap - */ -class KMSEnvMap extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the KMS key that will be used to decrypt the cipher text. - * - * Generated from protobuf field string key_name = 1; - */ - protected $key_name = ''; - /** - * The value of the cipherText response from the `encrypt` method. - * - * Generated from protobuf field string cipher_text = 2; - */ - protected $cipher_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_name - * The name of the KMS key that will be used to decrypt the cipher text. - * @type string $cipher_text - * The value of the cipherText response from the `encrypt` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The name of the KMS key that will be used to decrypt the cipher text. - * - * Generated from protobuf field string key_name = 1; - * @return string - */ - public function getKeyName() - { - return $this->key_name; - } - - /** - * The name of the KMS key that will be used to decrypt the cipher text. - * - * Generated from protobuf field string key_name = 1; - * @param string $var - * @return $this - */ - public function setKeyName($var) - { - GPBUtil::checkString($var, True); - $this->key_name = $var; - - return $this; - } - - /** - * The value of the cipherText response from the `encrypt` method. - * - * Generated from protobuf field string cipher_text = 2; - * @return string - */ - public function getCipherText() - { - return $this->cipher_text; - } - - /** - * The value of the cipherText response from the `encrypt` method. - * - * Generated from protobuf field string cipher_text = 2; - * @param string $var - * @return $this - */ - public function setCipherText($var) - { - GPBUtil::checkString($var, True); - $this->cipher_text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KMSEnvMap::class, \Google\Cloud\Batch\V1\Environment_KMSEnvMap::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php deleted file mode 100644 index af7bffd938ba..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GCS.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.batch.v1.GCS - */ -class GCS extends \Google\Protobuf\Internal\Message -{ - /** - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * - * Generated from protobuf field string remote_path = 1; - */ - protected $remote_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $remote_path - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * - * Generated from protobuf field string remote_path = 1; - * @return string - */ - public function getRemotePath() - { - return $this->remote_path; - } - - /** - * Remote path, either a bucket name or a subdirectory of a bucket, e.g.: - * bucket_name, bucket_name/subdirectory/ - * - * Generated from protobuf field string remote_path = 1; - * @param string $var - * @return $this - */ - public function setRemotePath($var) - { - GPBUtil::checkString($var, True); - $this->remote_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php deleted file mode 100644 index ae27090d4139..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.batch.v1.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Job name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Job name. Please see - * {@see BatchServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Batch\V1\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. Job name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. Job name. - * - * 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. Job 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php deleted file mode 100644 index 6271a4460bce..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/GetTaskRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.batch.v1.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Task name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Task name. Please see - * {@see BatchServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Batch\V1\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. Task name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. Task name. - * - * 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. Task 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/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php deleted file mode 100644 index 6c7254f33660..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Job.php +++ /dev/null @@ -1,513 +0,0 @@ -google.cloud.batch.v1.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. A system generated unique ID for the Job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * - * Generated from protobuf field int64 priority = 3; - */ - protected $priority = 0; - /** - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $task_groups; - /** - * Compute resource allocation for all TaskGroups in the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; - */ - protected $allocation_policy = null; - /** - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Output only. Job status. It is read only for users. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. When the Job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the Job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Log preservation policy for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; - */ - protected $logs_policy = null; - /** - * Notification configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; - */ - private $notifications; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * @type string $uid - * Output only. A system generated unique ID for the Job. - * @type int|string $priority - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * @type array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $task_groups - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * @type \Google\Cloud\Batch\V1\AllocationPolicy $allocation_policy - * Compute resource allocation for all TaskGroups in the Job. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * @type \Google\Cloud\Batch\V1\JobStatus $status - * Output only. Job status. It is read only for users. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Job was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the Job was updated. - * @type \Google\Cloud\Batch\V1\LogsPolicy $logs_policy - * Log preservation policy for the Job. - * @type array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $notifications - * Notification configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Job name. - * For example: "projects/123456/locations/us-central1/jobs/job01". - * - * 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. A system generated unique ID for the Job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A system generated unique ID for the Job. - * - * 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; - } - - /** - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * - * Generated from protobuf field int64 priority = 3; - * @return int|string - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Priority of the Job. - * The valid value range is [0, 100). Default value is 0. - * Higher value indicates higher priority. - * A job with higher priority value is more likely to run earlier if all other - * requirements are satisfied. - * - * Generated from protobuf field int64 priority = 3; - * @param int|string $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt64($var); - $this->priority = $var; - - return $this; - } - - /** - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaskGroups() - { - return $this->task_groups; - } - - /** - * Required. TaskGroups in the Job. Only one TaskGroup is supported now. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Batch\V1\TaskGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaskGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\TaskGroup::class); - $this->task_groups = $arr; - - return $this; - } - - /** - * Compute resource allocation for all TaskGroups in the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; - * @return \Google\Cloud\Batch\V1\AllocationPolicy|null - */ - public function getAllocationPolicy() - { - return $this->allocation_policy; - } - - public function hasAllocationPolicy() - { - return isset($this->allocation_policy); - } - - public function clearAllocationPolicy() - { - unset($this->allocation_policy); - } - - /** - * Compute resource allocation for all TaskGroups in the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy allocation_policy = 7; - * @param \Google\Cloud\Batch\V1\AllocationPolicy $var - * @return $this - */ - public function setAllocationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy::class); - $this->allocation_policy = $var; - - return $this; - } - - /** - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels for the Job. Labels could be user provided or system generated. - * For example, - * "labels": { - * "department": "finance", - * "environment": "test" - * } - * You can assign up to 64 labels. [Google Compute Engine label - * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) - * apply. - * Label names that start with "goog-" or "google-" are reserved. - * - * Generated from protobuf field map labels = 8; - * @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. Job status. It is read only for users. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Batch\V1\JobStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Job status. It is read only for users. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Batch\V1\JobStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. When the Job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. When the Job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 time the Job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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 time the Job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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; - } - - /** - * Log preservation policy for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; - * @return \Google\Cloud\Batch\V1\LogsPolicy|null - */ - public function getLogsPolicy() - { - return $this->logs_policy; - } - - public function hasLogsPolicy() - { - return isset($this->logs_policy); - } - - public function clearLogsPolicy() - { - unset($this->logs_policy); - } - - /** - * Log preservation policy for the Job. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy logs_policy = 13; - * @param \Google\Cloud\Batch\V1\LogsPolicy $var - * @return $this - */ - public function setLogsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy::class); - $this->logs_policy = $var; - - return $this; - } - - /** - * Notification configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotifications() - { - return $this->notifications; - } - - /** - * Notification configurations. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobNotification notifications = 14; - * @param array<\Google\Cloud\Batch\V1\JobNotification>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobNotification::class); - $this->notifications = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php deleted file mode 100644 index a84bc5653ad3..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.batch.v1.JobNotification - */ -class JobNotification extends \Google\Protobuf\Internal\Message -{ - /** - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * - * Generated from protobuf field string pubsub_topic = 1; - */ - protected $pubsub_topic = ''; - /** - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; - */ - protected $message = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pubsub_topic - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * @type \Google\Cloud\Batch\V1\JobNotification\Message $message - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * - * Generated from protobuf field string pubsub_topic = 1; - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * The Pub/Sub topic where notifications for the job, like state - * changes, will be published. If undefined, no Pub/Sub notifications - * are sent for this job. - * Specify the topic using the following format: - * `projects/{project}/topics/{topic}`. - * Notably, if you want to specify a Pub/Sub topic that is in a - * different project than the job, your administrator must grant your - * project's Batch service agent permission to publish to that topic. - * For more information about configuring Pub/Sub notifications for - * a job, see - * https://cloud.google.com/batch/docs/enable-notifications. - * - * Generated from protobuf field string pubsub_topic = 1; - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; - * @return \Google\Cloud\Batch\V1\JobNotification\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * The attribute requirements of messages to be sent to this Pub/Sub topic. - * Without this field, no message will be sent. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Message message = 2; - * @param \Google\Cloud\Batch\V1\JobNotification\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobNotification\Message::class); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php deleted file mode 100644 index 2dc572817132..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Message.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.batch.v1.JobNotification.Message - */ -class Message extends \Google\Protobuf\Internal\Message -{ - /** - * The message type. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; - */ - protected $type = 0; - /** - * The new job state. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; - */ - protected $new_job_state = 0; - /** - * The new task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; - */ - protected $new_task_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The message type. - * @type int $new_job_state - * The new job state. - * @type int $new_task_state - * The new task state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The message type. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The message type. - * - * Generated from protobuf field .google.cloud.batch.v1.JobNotification.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobNotification\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The new job state. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; - * @return int - */ - public function getNewJobState() - { - return $this->new_job_state; - } - - /** - * The new job state. - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State new_job_state = 2; - * @param int $var - * @return $this - */ - public function setNewJobState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); - $this->new_job_state = $var; - - return $this; - } - - /** - * The new task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; - * @return int - */ - public function getNewTaskState() - { - return $this->new_task_state; - } - - /** - * The new task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State new_task_state = 3; - * @param int $var - * @return $this - */ - public function setNewTaskState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); - $this->new_task_state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Message::class, \Google\Cloud\Batch\V1\JobNotification_Message::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php deleted file mode 100644 index 28ccf868f4c0..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobNotification/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.batch.v1.JobNotification.Type - */ -class Type -{ - /** - * Unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Notify users that the job state has changed. - * - * Generated from protobuf enum JOB_STATE_CHANGED = 1; - */ - const JOB_STATE_CHANGED = 1; - /** - * Notify users that the task state has changed. - * - * Generated from protobuf enum TASK_STATE_CHANGED = 2; - */ - const TASK_STATE_CHANGED = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::JOB_STATE_CHANGED => 'JOB_STATE_CHANGED', - self::TASK_STATE_CHANGED => 'TASK_STATE_CHANGED', - ]; - - 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(Type::class, \Google\Cloud\Batch\V1\JobNotification_Type::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php deleted file mode 100644 index 44e61d9713b6..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.batch.v1.JobStatus - */ -class JobStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Job state - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; - */ - protected $state = 0; - /** - * Job status events - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - */ - private $status_events; - /** - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * - * Generated from protobuf field map task_groups = 4; - */ - private $task_groups; - /** - * The duration of time that the Job spent in status RUNNING. - * - * Generated from protobuf field .google.protobuf.Duration run_duration = 5; - */ - protected $run_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Job state - * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events - * Job status events - * @type array|\Google\Protobuf\Internal\MapField $task_groups - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * @type \Google\Protobuf\Duration $run_duration - * The duration of time that the Job spent in status RUNNING. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Job state - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Job state - * - * Generated from protobuf field .google.cloud.batch.v1.JobStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Job status events - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusEvents() - { - return $this->status_events; - } - - /** - * Job status events - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); - $this->status_events = $arr; - - return $this; - } - - /** - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * - * Generated from protobuf field map task_groups = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTaskGroups() - { - return $this->task_groups; - } - - /** - * Aggregated task status for each TaskGroup in the Job. - * The map key is TaskGroup ID. - * - * Generated from protobuf field map task_groups = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTaskGroups($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\TaskGroupStatus::class); - $this->task_groups = $arr; - - return $this; - } - - /** - * The duration of time that the Job spent in status RUNNING. - * - * Generated from protobuf field .google.protobuf.Duration run_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getRunDuration() - { - return $this->run_duration; - } - - public function hasRunDuration() - { - return isset($this->run_duration); - } - - public function clearRunDuration() - { - unset($this->run_duration); - } - - /** - * The duration of time that the Job spent in status RUNNING. - * - * Generated from protobuf field .google.protobuf.Duration run_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRunDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->run_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php deleted file mode 100644 index 4073a44ab3bc..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/InstanceStatus.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.batch.v1.JobStatus.InstanceStatus - */ -class InstanceStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 1; - */ - protected $machine_type = ''; - /** - * The VM instance provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; - */ - protected $provisioning_model = 0; - /** - * The max number of tasks can be assigned to this instance type. - * - * Generated from protobuf field int64 task_pack = 3; - */ - protected $task_pack = 0; - /** - * The VM boot disk. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; - */ - protected $boot_disk = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * The Compute Engine machine type. - * @type int $provisioning_model - * The VM instance provisioning model. - * @type int|string $task_pack - * The max number of tasks can be assigned to this instance type. - * @type \Google\Cloud\Batch\V1\AllocationPolicy\Disk $boot_disk - * The VM boot disk. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 1; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 1; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * The VM instance provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; - * @return int - */ - public function getProvisioningModel() - { - return $this->provisioning_model; - } - - /** - * The VM instance provisioning model. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 2; - * @param int $var - * @return $this - */ - public function setProvisioningModel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\AllocationPolicy\ProvisioningModel::class); - $this->provisioning_model = $var; - - return $this; - } - - /** - * The max number of tasks can be assigned to this instance type. - * - * Generated from protobuf field int64 task_pack = 3; - * @return int|string - */ - public function getTaskPack() - { - return $this->task_pack; - } - - /** - * The max number of tasks can be assigned to this instance type. - * - * Generated from protobuf field int64 task_pack = 3; - * @param int|string $var - * @return $this - */ - public function setTaskPack($var) - { - GPBUtil::checkInt64($var); - $this->task_pack = $var; - - return $this; - } - - /** - * The VM boot disk. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; - * @return \Google\Cloud\Batch\V1\AllocationPolicy\Disk|null - */ - public function getBootDisk() - { - return $this->boot_disk; - } - - public function hasBootDisk() - { - return isset($this->boot_disk); - } - - public function clearBootDisk() - { - unset($this->boot_disk); - } - - /** - * The VM boot disk. - * - * Generated from protobuf field .google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 4; - * @param \Google\Cloud\Batch\V1\AllocationPolicy\Disk $var - * @return $this - */ - public function setBootDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\AllocationPolicy\Disk::class); - $this->boot_disk = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstanceStatus::class, \Google\Cloud\Batch\V1\JobStatus_InstanceStatus::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php deleted file mode 100644 index 88b1b714c63f..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.batch.v1.JobStatus.State - */ -class State -{ - /** - * Job state unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Job is admitted (validated and persisted) and waiting for resources. - * - * Generated from protobuf enum QUEUED = 1; - */ - const QUEUED = 1; - /** - * Job is scheduled to run as soon as resource allocation is ready. - * The resource allocation may happen at a later time but with a high - * chance to succeed. - * - * Generated from protobuf enum SCHEDULED = 2; - */ - const SCHEDULED = 2; - /** - * Resource allocation has been successful. At least one Task in the Job is - * RUNNING. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * All Tasks in the Job have finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * At least one Task in the Job has failed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The Job will be deleted, but has not been deleted yet. Typically this is - * because resources used by the Job are still being cleaned up. - * - * Generated from protobuf enum DELETION_IN_PROGRESS = 6; - */ - const DELETION_IN_PROGRESS = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::QUEUED => 'QUEUED', - self::SCHEDULED => 'SCHEDULED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DELETION_IN_PROGRESS => 'DELETION_IN_PROGRESS', - ]; - - 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\Batch\V1\JobStatus_State::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php deleted file mode 100644 index 54e870456e18..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/JobStatus/TaskGroupStatus.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.batch.v1.JobStatus.TaskGroupStatus - */ -class TaskGroupStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * - * Generated from protobuf field map counts = 1; - */ - private $counts; - /** - * Status of instances allocated for the TaskGroup. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; - */ - private $instances; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $counts - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * @type array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $instances - * Status of instances allocated for the TaskGroup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * - * Generated from protobuf field map counts = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCounts() - { - return $this->counts; - } - - /** - * Count of task in each state in the TaskGroup. - * The map key is task state name. - * - * Generated from protobuf field map counts = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCounts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->counts = $arr; - - return $this; - } - - /** - * Status of instances allocated for the TaskGroup. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Status of instances allocated for the TaskGroup. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.JobStatus.InstanceStatus instances = 2; - * @param array<\Google\Cloud\Batch\V1\JobStatus\InstanceStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\JobStatus\InstanceStatus::class); - $this->instances = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TaskGroupStatus::class, \Google\Cloud\Batch\V1\JobStatus_TaskGroupStatus::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php deleted file mode 100644 index 50bf332faf2d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.batch.v1.LifecyclePolicy - */ -class LifecyclePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; - */ - protected $action = 0; - /** - * Conditions that decide why a task failure is dealt with a specific action. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; - */ - protected $action_condition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * @type \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $action_condition - * Conditions that decide why a task failure is dealt with a specific action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Action to execute when ActionCondition is true. - * When RETRY_TASK is specified, we will retry failed tasks - * if we notice any exit code match and fail tasks if no match is found. - * Likewise, when FAIL_TASK is specified, we will fail tasks - * if we notice any exit code match and retry tasks if no match is found. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.Action action = 1; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LifecyclePolicy\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Conditions that decide why a task failure is dealt with a specific action. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; - * @return \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition|null - */ - public function getActionCondition() - { - return $this->action_condition; - } - - public function hasActionCondition() - { - return isset($this->action_condition); - } - - public function clearActionCondition() - { - unset($this->action_condition); - } - - /** - * Conditions that decide why a task failure is dealt with a specific action. - * - * Generated from protobuf field .google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2; - * @param \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $var - * @return $this - */ - public function setActionCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition::class); - $this->action_condition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php deleted file mode 100644 index 08419071bb67..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/Action.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.batch.v1.LifecyclePolicy.Action - */ -class Action -{ - /** - * Action unspecified. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Action that tasks in the group will be scheduled to re-execute. - * - * Generated from protobuf enum RETRY_TASK = 1; - */ - const RETRY_TASK = 1; - /** - * Action that tasks in the group will be stopped immediately. - * - * Generated from protobuf enum FAIL_TASK = 2; - */ - const FAIL_TASK = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::RETRY_TASK => 'RETRY_TASK', - self::FAIL_TASK => 'FAIL_TASK', - ]; - - 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(Action::class, \Google\Cloud\Batch\V1\LifecyclePolicy_Action::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php deleted file mode 100644 index acffa97a9300..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LifecyclePolicy/ActionCondition.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.batch.v1.LifecyclePolicy.ActionCondition - */ -class ActionCondition extends \Google\Protobuf\Internal\Message -{ - /** - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * - * Generated from protobuf field repeated int32 exit_codes = 1; - */ - private $exit_codes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $exit_codes - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * - * Generated from protobuf field repeated int32 exit_codes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExitCodes() - { - return $this->exit_codes; - } - - /** - * Exit codes of a task execution. - * If there are more than 1 exit codes, - * when task executes with any of the exit code in the list, - * the condition is met and the action will be executed. - * - * Generated from protobuf field repeated int32 exit_codes = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExitCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->exit_codes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ActionCondition::class, \Google\Cloud\Batch\V1\LifecyclePolicy_ActionCondition::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php deleted file mode 100644 index 172ee92ea293..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.batch.v1.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Parent path. - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Parent path. - * - * @return \Google\Cloud\Batch\V1\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 - * Parent path. - * @type string $filter - * List filter. - * @type string $order_by - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * @type int $page_size - * Page size. - * @type string $page_token - * Page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Parent path. - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Parent path. - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Sort results. Supported are "name", "name desc", "create_time", - * and "create_time desc". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. - * - * 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; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php deleted file mode 100644 index 9874dbeed530..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListJobsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.batch.v1.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Jobs. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; - */ - private $jobs; - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * Jobs. - * @type string $next_page_token - * Next page token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Jobs. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Jobs. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Job jobs = 1; - * @param array<\Google\Cloud\Batch\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Next page token. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @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/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php deleted file mode 100644 index bd42658dcae9..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.batch.v1.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Page token. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * Please see {@see BatchServiceClient::taskGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Batch\V1\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. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * @type string $filter - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * @type int $page_size - * Page size. - * @type string $page_token - * Page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * - * 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. Name of a TaskGroup from which Tasks are being requested. - * Pattern: - * "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" - * - * 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; - } - - /** - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Task filter, null filter matches all Tasks. - * Filter string should be of the format State=TaskStatus.State e.g. - * State=RUNNING - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Page size. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php deleted file mode 100644 index 7209c2e30a9f..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ListTasksResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.batch.v1.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Tasks. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; - */ - private $tasks; - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * Tasks. - * @type string $next_page_token - * Next page token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Tasks. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * Tasks. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Task tasks = 1; - * @param array<\Google\Cloud\Batch\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * Next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Next page token. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @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/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php deleted file mode 100644 index 3815935a8403..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.batch.v1.LogsPolicy - */ -class LogsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Where logs should be saved. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; - */ - protected $destination = 0; - /** - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * - * Generated from protobuf field string logs_path = 2; - */ - protected $logs_path = ''; - /** - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cloud_logging_option = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $destination - * Where logs should be saved. - * @type string $logs_path - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * @type \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $cloud_logging_option - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Where logs should be saved. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; - * @return int - */ - public function getDestination() - { - return $this->destination; - } - - /** - * Where logs should be saved. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.Destination destination = 1; - * @param int $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LogsPolicy\Destination::class); - $this->destination = $var; - - return $this; - } - - /** - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * - * Generated from protobuf field string logs_path = 2; - * @return string - */ - public function getLogsPath() - { - return $this->logs_path; - } - - /** - * The path to which logs are saved when the destination = PATH. This can be a - * local file path on the VM, or under the mount point of a Persistent Disk or - * Filestore, or a Cloud Storage path. - * - * Generated from protobuf field string logs_path = 2; - * @param string $var - * @return $this - */ - public function setLogsPath($var) - { - GPBUtil::checkString($var, True); - $this->logs_path = $var; - - return $this; - } - - /** - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption|null - */ - public function getCloudLoggingOption() - { - return $this->cloud_logging_option; - } - - public function hasCloudLoggingOption() - { - return isset($this->cloud_logging_option); - } - - public function clearCloudLoggingOption() - { - unset($this->cloud_logging_option); - } - - /** - * Optional. Additional settings for Cloud Logging. It will only take effect - * when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. - * - * Generated from protobuf field .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption $var - * @return $this - */ - public function setCloudLoggingOption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LogsPolicy\CloudLoggingOption::class); - $this->cloud_logging_option = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php deleted file mode 100644 index 6004643bec5a..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/CloudLoggingOption.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.batch.v1.LogsPolicy.CloudLoggingOption - */ -class CloudLoggingOption extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * - * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $use_generic_task_monitored_resource = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $use_generic_task_monitored_resource - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * - * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUseGenericTaskMonitoredResource() - { - return $this->use_generic_task_monitored_resource; - } - - /** - * Optional. Set this flag to true to change the [monitored resource - * type](https://cloud.google.com/monitoring/api/resources) for - * Cloud Logging logs generated by this Batch job from - * the - * [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) - * type to the formerly used - * [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) - * type. - * - * Generated from protobuf field bool use_generic_task_monitored_resource = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUseGenericTaskMonitoredResource($var) - { - GPBUtil::checkBool($var); - $this->use_generic_task_monitored_resource = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudLoggingOption::class, \Google\Cloud\Batch\V1\LogsPolicy_CloudLoggingOption::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php deleted file mode 100644 index 1f87d09d632d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/LogsPolicy/Destination.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.batch.v1.LogsPolicy.Destination - */ -class Destination -{ - /** - * Logs are not preserved. - * - * Generated from protobuf enum DESTINATION_UNSPECIFIED = 0; - */ - const DESTINATION_UNSPECIFIED = 0; - /** - * Logs are streamed to Cloud Logging. - * - * Generated from protobuf enum CLOUD_LOGGING = 1; - */ - const CLOUD_LOGGING = 1; - /** - * Logs are saved to a file path. - * - * Generated from protobuf enum PATH = 2; - */ - const PATH = 2; - - private static $valueToName = [ - self::DESTINATION_UNSPECIFIED => 'DESTINATION_UNSPECIFIED', - self::CLOUD_LOGGING => 'CLOUD_LOGGING', - self::PATH => 'PATH', - ]; - - 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(Destination::class, \Google\Cloud\Batch\V1\LogsPolicy_Destination::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php deleted file mode 100644 index b4c6e4bb1506..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/NFS.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.batch.v1.NFS - */ -class NFS extends \Google\Protobuf\Internal\Message -{ - /** - * The IP address of the NFS. - * - * Generated from protobuf field string server = 1; - */ - protected $server = ''; - /** - * Remote source path exported from the NFS, e.g., "/share". - * - * Generated from protobuf field string remote_path = 2; - */ - protected $remote_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $server - * The IP address of the NFS. - * @type string $remote_path - * Remote source path exported from the NFS, e.g., "/share". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The IP address of the NFS. - * - * Generated from protobuf field string server = 1; - * @return string - */ - public function getServer() - { - return $this->server; - } - - /** - * The IP address of the NFS. - * - * 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; - } - - /** - * Remote source path exported from the NFS, e.g., "/share". - * - * Generated from protobuf field string remote_path = 2; - * @return string - */ - public function getRemotePath() - { - return $this->remote_path; - } - - /** - * Remote source path exported from the NFS, e.g., "/share". - * - * Generated from protobuf field string remote_path = 2; - * @param string $var - * @return $this - */ - public function setRemotePath($var) - { - GPBUtil::checkString($var, True); - $this->remote_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php deleted file mode 100644 index 6a98d039d45c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.batch.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Batch::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php deleted file mode 100644 index 90befbe91d56..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable.php +++ /dev/null @@ -1,452 +0,0 @@ -google.cloud.batch.v1.Runnable - */ -class Runnable extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * - * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Normally, a non-zero exit status causes the Task to fail. This flag allows - * execution of other Runnables to continue instead. - * - * Generated from protobuf field bool ignore_exit_status = 3; - */ - protected $ignore_exit_status = false; - /** - * This flag allows a Runnable to continue running in the background while the - * Task executes subsequent Runnables. This is useful to provide services to - * other Runnables (or to provide debugging support tools like SSH servers). - * - * Generated from protobuf field bool background = 4; - */ - protected $background = false; - /** - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * - * Generated from protobuf field bool always_run = 5; - */ - protected $always_run = false; - /** - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; - */ - protected $environment = null; - /** - * Timeout for this Runnable. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - */ - protected $timeout = null; - /** - * Labels for this Runnable. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - protected $executable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\Runnable\Container $container - * Container runnable. - * @type \Google\Cloud\Batch\V1\Runnable\Script $script - * Script runnable. - * @type \Google\Cloud\Batch\V1\Runnable\Barrier $barrier - * Barrier runnable. - * @type string $display_name - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * @type bool $ignore_exit_status - * Normally, a non-zero exit status causes the Task to fail. This flag allows - * execution of other Runnables to continue instead. - * @type bool $background - * This flag allows a Runnable to continue running in the background while the - * Task executes subsequent Runnables. This is useful to provide services to - * other Runnables (or to provide debugging support tools like SSH servers). - * @type bool $always_run - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * @type \Google\Cloud\Batch\V1\Environment $environment - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * @type \Google\Protobuf\Duration $timeout - * Timeout for this Runnable. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels for this Runnable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Container runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; - * @return \Google\Cloud\Batch\V1\Runnable\Container|null - */ - public function getContainer() - { - return $this->readOneof(1); - } - - public function hasContainer() - { - return $this->hasOneof(1); - } - - /** - * Container runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1; - * @param \Google\Cloud\Batch\V1\Runnable\Container $var - * @return $this - */ - public function setContainer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Container::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Script runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; - * @return \Google\Cloud\Batch\V1\Runnable\Script|null - */ - public function getScript() - { - return $this->readOneof(2); - } - - public function hasScript() - { - return $this->hasOneof(2); - } - - /** - * Script runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2; - * @param \Google\Cloud\Batch\V1\Runnable\Script $var - * @return $this - */ - public function setScript($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Script::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Barrier runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; - * @return \Google\Cloud\Batch\V1\Runnable\Barrier|null - */ - public function getBarrier() - { - return $this->readOneof(6); - } - - public function hasBarrier() - { - return $this->hasOneof(6); - } - - /** - * Barrier runnable. - * - * Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6; - * @param \Google\Cloud\Batch\V1\Runnable\Barrier $var - * @return $this - */ - public function setBarrier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Runnable\Barrier::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * - * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. DisplayName is an optional field that can be provided by the - * caller. If provided, it will be used in logs and other outputs to identify - * the script, making it easier for users to understand the logs. If not - * provided the index of the runnable will be used for outputs. - * - * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Normally, a non-zero exit status causes the Task to fail. This flag allows - * execution of other Runnables to continue instead. - * - * Generated from protobuf field bool ignore_exit_status = 3; - * @return bool - */ - public function getIgnoreExitStatus() - { - return $this->ignore_exit_status; - } - - /** - * Normally, a non-zero exit status causes the Task to fail. This flag allows - * execution of other Runnables to continue instead. - * - * Generated from protobuf field bool ignore_exit_status = 3; - * @param bool $var - * @return $this - */ - public function setIgnoreExitStatus($var) - { - GPBUtil::checkBool($var); - $this->ignore_exit_status = $var; - - return $this; - } - - /** - * This flag allows a Runnable to continue running in the background while the - * Task executes subsequent Runnables. This is useful to provide services to - * other Runnables (or to provide debugging support tools like SSH servers). - * - * Generated from protobuf field bool background = 4; - * @return bool - */ - public function getBackground() - { - return $this->background; - } - - /** - * This flag allows a Runnable to continue running in the background while the - * Task executes subsequent Runnables. This is useful to provide services to - * other Runnables (or to provide debugging support tools like SSH servers). - * - * Generated from protobuf field bool background = 4; - * @param bool $var - * @return $this - */ - public function setBackground($var) - { - GPBUtil::checkBool($var); - $this->background = $var; - - return $this; - } - - /** - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * - * Generated from protobuf field bool always_run = 5; - * @return bool - */ - public function getAlwaysRun() - { - return $this->always_run; - } - - /** - * By default, after a Runnable fails, no further Runnable are executed. This - * flag indicates that this Runnable must be run even if the Task has already - * failed. This is useful for Runnables that copy output files off of the VM - * or for debugging. - * The always_run flag does not override the Task's overall max_run_duration. - * If the max_run_duration has expired then no further Runnables will execute, - * not even always_run Runnables. - * - * Generated from protobuf field bool always_run = 5; - * @param bool $var - * @return $this - */ - public function setAlwaysRun($var) - { - GPBUtil::checkBool($var); - $this->always_run = $var; - - return $this; - } - - /** - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; - * @return \Google\Cloud\Batch\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Environment variables for this Runnable (overrides variables set for the - * whole Task or TaskGroup). - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7; - * @param \Google\Cloud\Batch\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Timeout for this Runnable. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Timeout for this Runnable. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Labels for this Runnable. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels for this Runnable. - * - * Generated from protobuf field map labels = 9; - * @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; - } - - /** - * @return string - */ - public function getExecutable() - { - return $this->whichOneof("executable"); - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php deleted file mode 100644 index 189d5e8cb44c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Barrier.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.batch.v1.Runnable.Barrier - */ -class Barrier extends \Google\Protobuf\Internal\Message -{ - /** - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Barriers are identified by their index in runnable list. - * Names are not required, but if present should be an identifier. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Barrier::class, \Google\Cloud\Batch\V1\Runnable_Barrier::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php deleted file mode 100644 index 6ce82d28921a..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Container.php +++ /dev/null @@ -1,546 +0,0 @@ -google.cloud.batch.v1.Runnable.Container - */ -class Container extends \Google\Protobuf\Internal\Message -{ - /** - * The URI to pull the container image from. - * - * Generated from protobuf field string image_uri = 1; - */ - protected $image_uri = ''; - /** - * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT - * (either in the container image or with the entrypoint field below) then - * commands are appended as arguments to the ENTRYPOINT. - * - * Generated from protobuf field repeated string commands = 2; - */ - private $commands; - /** - * Overrides the `ENTRYPOINT` specified in the container. - * - * Generated from protobuf field string entrypoint = 3; - */ - protected $entrypoint = ''; - /** - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match docker run's --volume option, - * e.g. /foo:/bar, or /foo:/bar:ro - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (ro) for existing persistent disks and - * read-write (rw) for other volume types, regardless of the original mount - * options specified in `TaskSpec.Volumes`. If you need different mount - * settings, you can explicitly configure them in this field. - * - * Generated from protobuf field repeated string volumes = 7; - */ - private $volumes; - /** - * Arbitrary additional options to include in the "docker run" command when - * running this container, e.g. "--network host". - * - * Generated from protobuf field string options = 8; - */ - protected $options = ''; - /** - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * - * Generated from protobuf field bool block_external_network = 9; - */ - protected $block_external_network = false; - /** - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string username = 10; - */ - protected $username = ''; - /** - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string password = 11; - */ - protected $password = ''; - /** - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * - * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_image_streaming = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_uri - * The URI to pull the container image from. - * @type array|\Google\Protobuf\Internal\RepeatedField $commands - * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT - * (either in the container image or with the entrypoint field below) then - * commands are appended as arguments to the ENTRYPOINT. - * @type string $entrypoint - * Overrides the `ENTRYPOINT` specified in the container. - * @type array|\Google\Protobuf\Internal\RepeatedField $volumes - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match docker run's --volume option, - * e.g. /foo:/bar, or /foo:/bar:ro - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (ro) for existing persistent disks and - * read-write (rw) for other volume types, regardless of the original mount - * options specified in `TaskSpec.Volumes`. If you need different mount - * settings, you can explicitly configure them in this field. - * @type string $options - * Arbitrary additional options to include in the "docker run" command when - * running this container, e.g. "--network host". - * @type bool $block_external_network - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * @type string $username - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * @type string $password - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * @type bool $enable_image_streaming - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The URI to pull the container image from. - * - * Generated from protobuf field string image_uri = 1; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * The URI to pull the container image from. - * - * Generated from protobuf field string image_uri = 1; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT - * (either in the container image or with the entrypoint field below) then - * commands are appended as arguments to the ENTRYPOINT. - * - * Generated from protobuf field repeated string commands = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCommands() - { - return $this->commands; - } - - /** - * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT - * (either in the container image or with the entrypoint field below) then - * commands are appended as arguments to the ENTRYPOINT. - * - * Generated from protobuf field repeated string commands = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCommands($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->commands = $arr; - - return $this; - } - - /** - * Overrides the `ENTRYPOINT` specified in the container. - * - * Generated from protobuf field string entrypoint = 3; - * @return string - */ - public function getEntrypoint() - { - return $this->entrypoint; - } - - /** - * Overrides the `ENTRYPOINT` specified in the container. - * - * Generated from protobuf field string entrypoint = 3; - * @param string $var - * @return $this - */ - public function setEntrypoint($var) - { - GPBUtil::checkString($var, True); - $this->entrypoint = $var; - - return $this; - } - - /** - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match docker run's --volume option, - * e.g. /foo:/bar, or /foo:/bar:ro - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (ro) for existing persistent disks and - * read-write (rw) for other volume types, regardless of the original mount - * options specified in `TaskSpec.Volumes`. If you need different mount - * settings, you can explicitly configure them in this field. - * - * Generated from protobuf field repeated string volumes = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Volumes to mount (bind mount) from the host machine files or directories - * into the container, formatted to match docker run's --volume option, - * e.g. /foo:/bar, or /foo:/bar:ro - * If the `TaskSpec.Volumes` field is specified but this field is not, Batch - * will mount each volume from the host machine to the container with the - * same mount path by default. In this case, the default mount option for - * containers will be read-only (ro) for existing persistent disks and - * read-write (rw) for other volume types, regardless of the original mount - * options specified in `TaskSpec.Volumes`. If you need different mount - * settings, you can explicitly configure them in this field. - * - * Generated from protobuf field repeated string volumes = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->volumes = $arr; - - return $this; - } - - /** - * Arbitrary additional options to include in the "docker run" command when - * running this container, e.g. "--network host". - * - * Generated from protobuf field string options = 8; - * @return string - */ - public function getOptions() - { - return $this->options; - } - - /** - * Arbitrary additional options to include in the "docker run" command when - * running this container, e.g. "--network host". - * - * Generated from protobuf field string options = 8; - * @param string $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkString($var, True); - $this->options = $var; - - return $this; - } - - /** - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * - * Generated from protobuf field bool block_external_network = 9; - * @return bool - */ - public function getBlockExternalNetwork() - { - return $this->block_external_network; - } - - /** - * If set to true, external network access to and from container will be - * blocked, containers that are with block_external_network as true can - * still communicate with each other, network cannot be specified in the - * `container.options` field. - * - * Generated from protobuf field bool block_external_network = 9; - * @param bool $var - * @return $this - */ - public function setBlockExternalNetwork($var) - { - GPBUtil::checkBool($var); - $this->block_external_network = $var; - - return $this; - } - - /** - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string username = 10; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required if the container image is from a private Docker registry. The - * username to login to the Docker registry that contains the image. - * You can either specify the username directly by using plain text or - * specify an encrypted username by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. However, using a secret is - * recommended for enhanced security. - * Caution: If you specify the username using plain text, you risk the - * username being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the username instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string username = 10; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string password = 11; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Required if the container image is from a private Docker registry. The - * password to login to the Docker registry that contains the image. - * For security, it is strongly recommended to specify an - * encrypted password by using a Secret Manager secret: - * `projects/*/secrets/*/versions/*`. - * Warning: If you specify the password using plain text, you risk the - * password being exposed to any users who can view the job or its logs. - * To avoid this risk, specify a secret that contains the password instead. - * Learn more about [Secret - * Manager](https://cloud.google.com/secret-manager/docs/) and [using - * Secret Manager with - * Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). - * - * Generated from protobuf field string password = 11; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * - * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableImageStreaming() - { - return $this->enable_image_streaming; - } - - /** - * Optional. If set to true, this container runnable uses Image streaming. - * Use Image streaming to allow the runnable to initialize without - * waiting for the entire container image to download, which can - * significantly reduce startup time for large container images. - * When `enableImageStreaming` is set to true, the container - * runtime is [containerd](https://containerd.io/) instead of Docker. - * Additionally, this container runnable only supports the following - * `container` subfields: `imageUri`, - * `commands[]`, `entrypoint`, and - * `volumes[]`; any other `container` subfields are ignored. - * For more information about the requirements and limitations for using - * Image streaming with Batch, see the [`image-streaming` - * sample on - * GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). - * - * Generated from protobuf field bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableImageStreaming($var) - { - GPBUtil::checkBool($var); - $this->enable_image_streaming = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Container::class, \Google\Cloud\Batch\V1\Runnable_Container::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php deleted file mode 100644 index 1982a46b0335..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Runnable/Script.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.batch.v1.Runnable.Script - */ -class Script extends \Google\Protobuf\Internal\Message -{ - protected $command; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Script file path on the host VM. - * To specify an interpreter, please add a `#!`(also known as - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the - * first line of the file.(For example, to execute the script using bash, - * `#!/bin/bash` should be the first line of the file. To execute the - * script using`Python3`, `#!/usr/bin/env python3` should be the first - * line of the file.) Otherwise, the file will by default be executed by - * `/bin/sh`. - * @type string $text - * Shell script text. - * To specify an interpreter, please add a `#!\n` at the - * beginning of the text.(For example, to execute the script using bash, - * `#!/bin/bash\n` should be added. To execute the script using`Python3`, - * `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will - * by default be executed by `/bin/sh`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Script file path on the host VM. - * To specify an interpreter, please add a `#!`(also known as - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the - * first line of the file.(For example, to execute the script using bash, - * `#!/bin/bash` should be the first line of the file. To execute the - * script using`Python3`, `#!/usr/bin/env python3` should be the first - * line of the file.) Otherwise, the file will by default be executed by - * `/bin/sh`. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->readOneof(1); - } - - public function hasPath() - { - return $this->hasOneof(1); - } - - /** - * Script file path on the host VM. - * To specify an interpreter, please add a `#!`(also known as - * [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the - * first line of the file.(For example, to execute the script using bash, - * `#!/bin/bash` should be the first line of the file. To execute the - * script using`Python3`, `#!/usr/bin/env python3` should be the first - * line of the file.) Otherwise, the file will by default be executed by - * `/bin/sh`. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Shell script text. - * To specify an interpreter, please add a `#!\n` at the - * beginning of the text.(For example, to execute the script using bash, - * `#!/bin/bash\n` should be added. To execute the script using`Python3`, - * `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will - * by default be executed by `/bin/sh`. - * - * Generated from protobuf field string text = 2; - * @return string - */ - public function getText() - { - return $this->readOneof(2); - } - - public function hasText() - { - return $this->hasOneof(2); - } - - /** - * Shell script text. - * To specify an interpreter, please add a `#!\n` at the - * beginning of the text.(For example, to execute the script using bash, - * `#!/bin/bash\n` should be added. To execute the script using`Python3`, - * `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will - * by default be executed by `/bin/sh`. - * - * Generated from protobuf field string text = 2; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getCommand() - { - return $this->whichOneof("command"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Script::class, \Google\Cloud\Batch\V1\Runnable_Script::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php deleted file mode 100644 index 2a315346b647..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/ServiceAccount.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.batch.v1.ServiceAccount - */ -class ServiceAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - */ - protected $email = ''; - /** - * List of scopes to be enabled for this service account. - * - * Generated from protobuf field repeated string scopes = 2; - */ - private $scopes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Email address of the service account. - * @type array|\Google\Protobuf\Internal\RepeatedField $scopes - * List of scopes to be enabled for this service account. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * List of scopes to be enabled for this service account. - * - * Generated from protobuf field repeated string scopes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * List of scopes to be enabled for this service account. - * - * Generated from protobuf field repeated string scopes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scopes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php deleted file mode 100644 index 1a199e88f2ff..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/StatusEvent.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.batch.v1.StatusEvent - */ -class StatusEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the event. - * - * Generated from protobuf field string type = 3; - */ - protected $type = ''; - /** - * Description of the event. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - /** - * The time this event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; - */ - protected $event_time = null; - /** - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; - */ - protected $task_execution = null; - /** - * Task State. - * This field is only defined for task-level status events. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; - */ - protected $task_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Type of the event. - * @type string $description - * Description of the event. - * @type \Google\Protobuf\Timestamp $event_time - * The time this event occurred. - * @type \Google\Cloud\Batch\V1\TaskExecution $task_execution - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * @type int $task_state - * Task State. - * This field is only defined for task-level status events. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Type of the event. - * - * Generated from protobuf field string type = 3; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the event. - * - * Generated from protobuf field string type = 3; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Description of the event. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the event. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The time this event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * The time this event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; - * @return \Google\Cloud\Batch\V1\TaskExecution|null - */ - public function getTaskExecution() - { - return $this->task_execution; - } - - public function hasTaskExecution() - { - return isset($this->task_execution); - } - - public function clearTaskExecution() - { - unset($this->task_execution); - } - - /** - * Task Execution. - * This field is only defined for task-level status events where the task - * fails. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskExecution task_execution = 4; - * @param \Google\Cloud\Batch\V1\TaskExecution $var - * @return $this - */ - public function setTaskExecution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskExecution::class); - $this->task_execution = $var; - - return $this; - } - - /** - * Task State. - * This field is only defined for task-level status events. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; - * @return int - */ - public function getTaskState() - { - return $this->task_state; - } - - /** - * Task State. - * This field is only defined for task-level status events. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State task_state = 5; - * @param int $var - * @return $this - */ - public function setTaskState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); - $this->task_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php deleted file mode 100644 index c034a667462e..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Task.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.batch.v1.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Task Status. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * @type \Google\Cloud\Batch\V1\TaskStatus $status - * Task Status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Task name. - * The name is generated from the parent TaskGroup name and 'id' field. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". - * - * 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; - } - - /** - * Task Status. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; - * @return \Google\Cloud\Batch\V1\TaskStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Task Status. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus status = 2; - * @param \Google\Cloud\Batch\V1\TaskStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskStatus::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php deleted file mode 100644 index 3a06c25ccab4..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskExecution.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.batch.v1.TaskExecution - */ -class TaskExecution extends \Google\Protobuf\Internal\Message -{ - /** - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * - * Generated from protobuf field int32 exit_code = 1; - */ - protected $exit_code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $exit_code - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * - * Generated from protobuf field int32 exit_code = 1; - * @return int - */ - public function getExitCode() - { - return $this->exit_code; - } - - /** - * The exit code of a finished task. - * If the task succeeded, the exit code will be 0. If the task failed but not - * due to the following reasons, the exit code will be 50000. - * Otherwise, it can be from different sources: - * * Batch known failures: - * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. - * * Batch runnable execution failures; you can rely on Batch logs to further - * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If - * there are multiple runnables failures, Batch only exposes the first error. - * - * Generated from protobuf field int32 exit_code = 1; - * @param int $var - * @return $this - */ - public function setExitCode($var) - { - GPBUtil::checkInt32($var); - $this->exit_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php deleted file mode 100644 index 9a71f100436d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup.php +++ /dev/null @@ -1,479 +0,0 @@ -google.cloud.batch.v1.TaskGroup - */ -class TaskGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Tasks in the group share the same task spec. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task_spec = null; - /** - * Number of Tasks in the TaskGroup. - * Default is 1. - * - * Generated from protobuf field int64 task_count = 4; - */ - protected $task_count = 0; - /** - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * - * Generated from protobuf field int64 parallelism = 5; - */ - protected $parallelism = 0; - /** - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; - */ - protected $scheduling_policy = 0; - /** - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; - */ - private $task_environments; - /** - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * - * Generated from protobuf field int64 task_count_per_node = 10; - */ - protected $task_count_per_node = 0; - /** - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * - * Generated from protobuf field bool require_hosts_file = 11; - */ - protected $require_hosts_file = false; - /** - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * - * Generated from protobuf field bool permissive_ssh = 12; - */ - protected $permissive_ssh = false; - /** - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * - * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $run_as_non_root = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * @type \Google\Cloud\Batch\V1\TaskSpec $task_spec - * Required. Tasks in the group share the same task spec. - * @type int|string $task_count - * Number of Tasks in the TaskGroup. - * Default is 1. - * @type int|string $parallelism - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * @type int $scheduling_policy - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * @type array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $task_environments - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * @type int|string $task_count_per_node - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * @type bool $require_hosts_file - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * @type bool $permissive_ssh - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * @type bool $run_as_non_root - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce(); - parent::__construct($data); - } - - /** - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. TaskGroup name. - * The system generates this field based on parent Job name. - * For example: - * "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". - * - * 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; - } - - /** - * Required. Tasks in the group share the same task spec. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Batch\V1\TaskSpec|null - */ - public function getTaskSpec() - { - return $this->task_spec; - } - - public function hasTaskSpec() - { - return isset($this->task_spec); - } - - public function clearTaskSpec() - { - unset($this->task_spec); - } - - /** - * Required. Tasks in the group share the same task spec. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Batch\V1\TaskSpec $var - * @return $this - */ - public function setTaskSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskSpec::class); - $this->task_spec = $var; - - return $this; - } - - /** - * Number of Tasks in the TaskGroup. - * Default is 1. - * - * Generated from protobuf field int64 task_count = 4; - * @return int|string - */ - public function getTaskCount() - { - return $this->task_count; - } - - /** - * Number of Tasks in the TaskGroup. - * Default is 1. - * - * Generated from protobuf field int64 task_count = 4; - * @param int|string $var - * @return $this - */ - public function setTaskCount($var) - { - GPBUtil::checkInt64($var); - $this->task_count = $var; - - return $this; - } - - /** - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * - * Generated from protobuf field int64 parallelism = 5; - * @return int|string - */ - public function getParallelism() - { - return $this->parallelism; - } - - /** - * Max number of tasks that can run in parallel. - * Default to min(task_count, parallel tasks per job limit). - * See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). - * Field parallelism must be 1 if the scheduling_policy is IN_ORDER. - * - * Generated from protobuf field int64 parallelism = 5; - * @param int|string $var - * @return $this - */ - public function setParallelism($var) - { - GPBUtil::checkInt64($var); - $this->parallelism = $var; - - return $this; - } - - /** - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; - * @return int - */ - public function getSchedulingPolicy() - { - return $this->scheduling_policy; - } - - /** - * Scheduling policy for Tasks in the TaskGroup. - * The default value is AS_SOON_AS_POSSIBLE. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6; - * @param int $var - * @return $this - */ - public function setSchedulingPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskGroup\SchedulingPolicy::class); - $this->scheduling_policy = $var; - - return $this; - } - - /** - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaskEnvironments() - { - return $this->task_environments; - } - - /** - * An array of environment variable mappings, which are passed to Tasks with - * matching indices. If task_environments is used then task_count should - * not be specified in the request (and will be ignored). Task count will be - * the length of task_environments. - * Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in - * addition to any environment variables set in task_environments, specifying - * the number of Tasks in the Task's parent TaskGroup, and the specific Task's - * index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Environment task_environments = 9; - * @param array<\Google\Cloud\Batch\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaskEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Environment::class); - $this->task_environments = $arr; - - return $this; - } - - /** - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * - * Generated from protobuf field int64 task_count_per_node = 10; - * @return int|string - */ - public function getTaskCountPerNode() - { - return $this->task_count_per_node; - } - - /** - * Max number of tasks that can be run on a VM at the same time. - * If not specified, the system will decide a value based on available - * compute resources on a VM and task requirements. - * - * Generated from protobuf field int64 task_count_per_node = 10; - * @param int|string $var - * @return $this - */ - public function setTaskCountPerNode($var) - { - GPBUtil::checkInt64($var); - $this->task_count_per_node = $var; - - return $this; - } - - /** - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * - * Generated from protobuf field bool require_hosts_file = 11; - * @return bool - */ - public function getRequireHostsFile() - { - return $this->require_hosts_file; - } - - /** - * When true, Batch will populate a file with a list of all VMs assigned to - * the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path - * of that file. Defaults to false. The host file supports up to 1000 VMs. - * - * Generated from protobuf field bool require_hosts_file = 11; - * @param bool $var - * @return $this - */ - public function setRequireHostsFile($var) - { - GPBUtil::checkBool($var); - $this->require_hosts_file = $var; - - return $this; - } - - /** - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * - * Generated from protobuf field bool permissive_ssh = 12; - * @return bool - */ - public function getPermissiveSsh() - { - return $this->permissive_ssh; - } - - /** - * When true, Batch will configure SSH to allow passwordless login between - * VMs running the Batch tasks in the same TaskGroup. - * - * Generated from protobuf field bool permissive_ssh = 12; - * @param bool $var - * @return $this - */ - public function setPermissiveSsh($var) - { - GPBUtil::checkBool($var); - $this->permissive_ssh = $var; - - return $this; - } - - /** - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * - * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRunAsNonRoot() - { - return $this->run_as_non_root; - } - - /** - * Optional. If not set or set to false, Batch uses the root user to execute - * runnables. If set to true, Batch runs the runnables using a non-root user. - * Currently, the non-root user Batch used is generated by OS Login. For more - * information, see [About OS - * Login](https://cloud.google.com/compute/docs/oslogin). - * - * Generated from protobuf field bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRunAsNonRoot($var) - { - GPBUtil::checkBool($var); - $this->run_as_non_root = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php deleted file mode 100644 index df18ec4557bc..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskGroup/SchedulingPolicy.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.batch.v1.TaskGroup.SchedulingPolicy - */ -class SchedulingPolicy -{ - /** - * Unspecified. - * - * Generated from protobuf enum SCHEDULING_POLICY_UNSPECIFIED = 0; - */ - const SCHEDULING_POLICY_UNSPECIFIED = 0; - /** - * Run Tasks as soon as resources are available. - * Tasks might be executed in parallel depending on parallelism and - * task_count values. - * - * Generated from protobuf enum AS_SOON_AS_POSSIBLE = 1; - */ - const AS_SOON_AS_POSSIBLE = 1; - /** - * Run Tasks sequentially with increased task index. - * - * Generated from protobuf enum IN_ORDER = 2; - */ - const IN_ORDER = 2; - - private static $valueToName = [ - self::SCHEDULING_POLICY_UNSPECIFIED => 'SCHEDULING_POLICY_UNSPECIFIED', - self::AS_SOON_AS_POSSIBLE => 'AS_SOON_AS_POSSIBLE', - self::IN_ORDER => 'IN_ORDER', - ]; - - 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(SchedulingPolicy::class, \Google\Cloud\Batch\V1\TaskGroup_SchedulingPolicy::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php deleted file mode 100644 index ff38c4b463ba..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskSpec.php +++ /dev/null @@ -1,440 +0,0 @@ -google.cloud.batch.v1.TaskSpec - */ -class TaskSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The sequence of scripts or containers to run for this Task. Each Task using - * this TaskSpec executes its list of runnables in order. The Task succeeds if - * all of its runnables either exit with a zero status or any that exit with a - * non-zero status have the ignore_exit_status flag. - * Background runnables are killed automatically (if they have not already - * exited) a short time after all foreground runnables have completed. Even - * though this is likely to result in a non-zero exit status for the - * background runnable, these automatic kills are not treated as Task - * failures. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; - */ - private $runnables; - /** - * ComputeResource requirements. - * - * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; - */ - protected $compute_resource = null; - /** - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * - * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; - */ - protected $max_run_duration = null; - /** - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * - * Generated from protobuf field int32 max_retry_count = 5; - */ - protected $max_retry_count = 0; - /** - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; - */ - private $lifecycle_policies; - /** - * Deprecated: please use environment(non-plural) instead. - * - * Generated from protobuf field map environments = 6 [deprecated = true]; - * @deprecated - */ - private $environments; - /** - * Volumes to mount before running Tasks using this TaskSpec. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; - */ - private $volumes; - /** - * Environment variables to set before running the Task. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; - */ - protected $environment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $runnables - * The sequence of scripts or containers to run for this Task. Each Task using - * this TaskSpec executes its list of runnables in order. The Task succeeds if - * all of its runnables either exit with a zero status or any that exit with a - * non-zero status have the ignore_exit_status flag. - * Background runnables are killed automatically (if they have not already - * exited) a short time after all foreground runnables have completed. Even - * though this is likely to result in a non-zero exit status for the - * background runnable, these automatic kills are not treated as Task - * failures. - * @type \Google\Cloud\Batch\V1\ComputeResource $compute_resource - * ComputeResource requirements. - * @type \Google\Protobuf\Duration $max_run_duration - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * @type int $max_retry_count - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * @type array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $lifecycle_policies - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * @type array|\Google\Protobuf\Internal\MapField $environments - * Deprecated: please use environment(non-plural) instead. - * @type array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * Volumes to mount before running Tasks using this TaskSpec. - * @type \Google\Cloud\Batch\V1\Environment $environment - * Environment variables to set before running the Task. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * The sequence of scripts or containers to run for this Task. Each Task using - * this TaskSpec executes its list of runnables in order. The Task succeeds if - * all of its runnables either exit with a zero status or any that exit with a - * non-zero status have the ignore_exit_status flag. - * Background runnables are killed automatically (if they have not already - * exited) a short time after all foreground runnables have completed. Even - * though this is likely to result in a non-zero exit status for the - * background runnable, these automatic kills are not treated as Task - * failures. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRunnables() - { - return $this->runnables; - } - - /** - * The sequence of scripts or containers to run for this Task. Each Task using - * this TaskSpec executes its list of runnables in order. The Task succeeds if - * all of its runnables either exit with a zero status or any that exit with a - * non-zero status have the ignore_exit_status flag. - * Background runnables are killed automatically (if they have not already - * exited) a short time after all foreground runnables have completed. Even - * though this is likely to result in a non-zero exit status for the - * background runnable, these automatic kills are not treated as Task - * failures. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Runnable runnables = 8; - * @param array<\Google\Cloud\Batch\V1\Runnable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRunnables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Runnable::class); - $this->runnables = $arr; - - return $this; - } - - /** - * ComputeResource requirements. - * - * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; - * @return \Google\Cloud\Batch\V1\ComputeResource|null - */ - public function getComputeResource() - { - return $this->compute_resource; - } - - public function hasComputeResource() - { - return isset($this->compute_resource); - } - - public function clearComputeResource() - { - unset($this->compute_resource); - } - - /** - * ComputeResource requirements. - * - * Generated from protobuf field .google.cloud.batch.v1.ComputeResource compute_resource = 3; - * @param \Google\Cloud\Batch\V1\ComputeResource $var - * @return $this - */ - public function setComputeResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\ComputeResource::class); - $this->compute_resource = $var; - - return $this; - } - - /** - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * - * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxRunDuration() - { - return $this->max_run_duration; - } - - public function hasMaxRunDuration() - { - return isset($this->max_run_duration); - } - - public function clearMaxRunDuration() - { - unset($this->max_run_duration); - } - - /** - * Maximum duration the task should run before being automatically retried - * (if enabled) or automatically failed. Format the value of this field - * as a time limit in seconds followed by `s`—for example, `3600s` - * for 1 hour. The field accepts any value between 0 and the maximum listed - * for the `Duration` field type at - * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, - * the actual maximum run time for a job will be limited to the maximum run - * time for a job listed at - * https://cloud.google.com/batch/quotas#max-job-duration. - * - * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxRunDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_run_duration = $var; - - return $this; - } - - /** - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * - * Generated from protobuf field int32 max_retry_count = 5; - * @return int - */ - public function getMaxRetryCount() - { - return $this->max_retry_count; - } - - /** - * Maximum number of retries on failures. - * The default, 0, which means never retry. - * The valid value range is [0, 10]. - * - * Generated from protobuf field int32 max_retry_count = 5; - * @param int $var - * @return $this - */ - public function setMaxRetryCount($var) - { - GPBUtil::checkInt32($var); - $this->max_retry_count = $var; - - return $this; - } - - /** - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLifecyclePolicies() - { - return $this->lifecycle_policies; - } - - /** - * Lifecycle management schema when any task in a task group is failed. - * Currently we only support one lifecycle policy. - * When the lifecycle policy condition is met, - * the action in the policy will execute. - * If task execution result does not meet with the defined lifecycle - * policy, we consider it as the default policy. - * Default policy means if the exit code is 0, exit task. - * If task ends with non-zero exit code, retry the task with max_retry_count. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9; - * @param array<\Google\Cloud\Batch\V1\LifecyclePolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLifecyclePolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\LifecyclePolicy::class); - $this->lifecycle_policies = $arr; - - return $this; - } - - /** - * Deprecated: please use environment(non-plural) instead. - * - * Generated from protobuf field map environments = 6 [deprecated = true]; - * @return \Google\Protobuf\Internal\MapField - * @deprecated - */ - public function getEnvironments() - { - @trigger_error('environments is deprecated.', E_USER_DEPRECATED); - return $this->environments; - } - - /** - * Deprecated: please use environment(non-plural) instead. - * - * Generated from protobuf field map environments = 6 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - * @deprecated - */ - public function setEnvironments($var) - { - @trigger_error('environments is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environments = $arr; - - return $this; - } - - /** - * Volumes to mount before running Tasks using this TaskSpec. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * Volumes to mount before running Tasks using this TaskSpec. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.Volume volumes = 7; - * @param array<\Google\Cloud\Batch\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * Environment variables to set before running the Task. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; - * @return \Google\Cloud\Batch\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Environment variables to set before running the Task. - * - * Generated from protobuf field .google.cloud.batch.v1.Environment environment = 10; - * @param \Google\Cloud\Batch\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\Environment::class); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php deleted file mode 100644 index 8caeb3d3d49d..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.batch.v1.TaskStatus - */ -class TaskStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; - */ - protected $state = 0; - /** - * Detailed info about why the state is reached. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - */ - private $status_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Task state. - * @type array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $status_events - * Detailed info about why the state is reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce(); - parent::__construct($data); - } - - /** - * Task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Task state. - * - * Generated from protobuf field .google.cloud.batch.v1.TaskStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Detailed info about why the state is reached. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusEvents() - { - return $this->status_events; - } - - /** - * Detailed info about why the state is reached. - * - * Generated from protobuf field repeated .google.cloud.batch.v1.StatusEvent status_events = 2; - * @param array<\Google\Cloud\Batch\V1\StatusEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Batch\V1\StatusEvent::class); - $this->status_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php deleted file mode 100644 index d74433bd3301..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/TaskStatus/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.batch.v1.TaskStatus.State - */ -class State -{ - /** - * Unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Task is created and waiting for resources. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The Task is assigned to at least one VM. - * - * Generated from protobuf enum ASSIGNED = 2; - */ - const ASSIGNED = 2; - /** - * The Task is running. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * The Task has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The Task has succeeded. - * - * Generated from protobuf enum SUCCEEDED = 5; - */ - const SUCCEEDED = 5; - /** - * The Task has not been executed when the Job finishes. - * - * Generated from protobuf enum UNEXECUTED = 6; - */ - const UNEXECUTED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ASSIGNED => 'ASSIGNED', - self::RUNNING => 'RUNNING', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - self::UNEXECUTED => 'UNEXECUTED', - ]; - - 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\Batch\V1\TaskStatus_State::class); - diff --git a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php b/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php deleted file mode 100644 index c13f144d732c..000000000000 --- a/owl-bot-staging/Batch/v1/proto/src/Google/Cloud/Batch/V1/Volume.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.batch.v1.Volume - */ -class Volume extends \Google\Protobuf\Internal\Message -{ - /** - * The mount path for the volume, e.g. /mnt/disks/share. - * - * Generated from protobuf field string mount_path = 4; - */ - protected $mount_path = ''; - /** - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * - * Generated from protobuf field repeated string mount_options = 5; - */ - private $mount_options; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Batch\V1\NFS $nfs - * A Network File System (NFS) volume. For example, a - * Filestore file share. - * @type \Google\Cloud\Batch\V1\GCS $gcs - * A Google Cloud Storage (GCS) volume. - * @type string $device_name - * Device name of an attached disk volume, which should align with a - * device_name specified by - * job.allocation_policy.instances[0].policy.disks[i].device_name or - * defined by the given instance template in - * job.allocation_policy.instances[0].instance_template. - * @type string $mount_path - * The mount path for the volume, e.g. /mnt/disks/share. - * @type array|\Google\Protobuf\Internal\RepeatedField $mount_options - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Batch\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * A Network File System (NFS) volume. For example, a - * Filestore file share. - * - * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; - * @return \Google\Cloud\Batch\V1\NFS|null - */ - public function getNfs() - { - return $this->readOneof(1); - } - - public function hasNfs() - { - return $this->hasOneof(1); - } - - /** - * A Network File System (NFS) volume. For example, a - * Filestore file share. - * - * Generated from protobuf field .google.cloud.batch.v1.NFS nfs = 1; - * @param \Google\Cloud\Batch\V1\NFS $var - * @return $this - */ - public function setNfs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\NFS::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A Google Cloud Storage (GCS) volume. - * - * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; - * @return \Google\Cloud\Batch\V1\GCS|null - */ - public function getGcs() - { - return $this->readOneof(3); - } - - public function hasGcs() - { - return $this->hasOneof(3); - } - - /** - * A Google Cloud Storage (GCS) volume. - * - * Generated from protobuf field .google.cloud.batch.v1.GCS gcs = 3; - * @param \Google\Cloud\Batch\V1\GCS $var - * @return $this - */ - public function setGcs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\GCS::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Device name of an attached disk volume, which should align with a - * device_name specified by - * job.allocation_policy.instances[0].policy.disks[i].device_name or - * defined by the given instance template in - * job.allocation_policy.instances[0].instance_template. - * - * Generated from protobuf field string device_name = 6; - * @return string - */ - public function getDeviceName() - { - return $this->readOneof(6); - } - - public function hasDeviceName() - { - return $this->hasOneof(6); - } - - /** - * Device name of an attached disk volume, which should align with a - * device_name specified by - * job.allocation_policy.instances[0].policy.disks[i].device_name or - * defined by the given instance template in - * job.allocation_policy.instances[0].instance_template. - * - * Generated from protobuf field string device_name = 6; - * @param string $var - * @return $this - */ - public function setDeviceName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The mount path for the volume, e.g. /mnt/disks/share. - * - * Generated from protobuf field string mount_path = 4; - * @return string - */ - public function getMountPath() - { - return $this->mount_path; - } - - /** - * The mount path for the volume, e.g. /mnt/disks/share. - * - * Generated from protobuf field string mount_path = 4; - * @param string $var - * @return $this - */ - public function setMountPath($var) - { - GPBUtil::checkString($var, True); - $this->mount_path = $var; - - return $this; - } - - /** - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * - * Generated from protobuf field repeated string mount_options = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMountOptions() - { - return $this->mount_options; - } - - /** - * Mount options vary based on the type of storage volume: - * * For a Cloud Storage bucket, all the mount options provided - * by - * the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) - * are supported. - * * For an existing persistent disk, all mount options provided by the - * [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) - * except writing are supported. This is due to restrictions of - * [multi-writer - * mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). - * * For any other disk or a Network File System (NFS), all the - * mount options provided by the `mount` command are supported. - * - * Generated from protobuf field repeated string mount_options = 5; - * @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; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php deleted file mode 100644 index 78181b5873de..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/create_job.php +++ /dev/null @@ -1,81 +0,0 @@ -setTaskSpec($jobTaskGroupsTaskSpec); - $jobTaskGroups = [$taskGroup,]; - $job = (new Job()) - ->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $batchServiceClient->createJob($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 -{ - $formattedParent = BatchServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_job_sample($formattedParent); -} -// [END batch_v1_generated_BatchService_CreateJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php deleted file mode 100644 index 2f18d5dabdf6..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/delete_job.php +++ /dev/null @@ -1,66 +0,0 @@ -deleteJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 batch_v1_generated_BatchService_DeleteJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php deleted file mode 100644 index df59d0831359..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_job.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $batchServiceClient->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 = BatchServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - get_job_sample($formattedName); -} -// [END batch_v1_generated_BatchService_GetJob_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php deleted file mode 100644 index 7a7ba7f1f70b..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END batch_v1_generated_BatchService_GetLocation_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php deleted file mode 100644 index 757f3239fecb..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/get_task.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $batchServiceClient->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 = BatchServiceClient::taskName( - '[PROJECT]', - '[LOCATION]', - '[JOB]', - '[TASK_GROUP]', - '[TASK]' - ); - - get_task_sample($formattedName); -} -// [END batch_v1_generated_BatchService_GetTask_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php deleted file mode 100644 index 98fb7d71673e..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_jobs.php +++ /dev/null @@ -1,62 +0,0 @@ -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()); - } -} -// [END batch_v1_generated_BatchService_ListJobs_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php deleted file mode 100644 index 044396d5d16e..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $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()); - } -} -// [END batch_v1_generated_BatchService_ListLocations_sync] diff --git a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php b/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php deleted file mode 100644 index 68b45472d029..000000000000 --- a/owl-bot-staging/Batch/v1/samples/V1/BatchServiceClient/list_tasks.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $batchServiceClient->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 = BatchServiceClient::taskGroupName( - '[PROJECT]', - '[LOCATION]', - '[JOB]', - '[TASK_GROUP]' - ); - - list_tasks_sample($formattedParent); -} -// [END batch_v1_generated_BatchService_ListTasks_sync] diff --git a/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php b/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php deleted file mode 100644 index 2179f2485c98..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/Client/BatchServiceClient.php +++ /dev/null @@ -1,558 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/batch_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/batch_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/batch_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/batch_service_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 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 task - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $taskGroup - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName(string $project, string $location, string $job, string $taskGroup, string $task): string - { - return self::getPathTemplate('task')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'task_group' => $taskGroup, - 'task' => $task, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task_group - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $taskGroup - * - * @return string The formatted task_group resource. - */ - public static function taskGroupName(string $project, string $location, string $job, string $taskGroup): string - { - return self::getPathTemplate('taskGroup')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'task_group' => $taskGroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - job: projects/{project}/locations/{location}/jobs/{job} - * - location: projects/{project}/locations/{location} - * - task: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task} - * - taskGroup: projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group} - * - * 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 $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 'batch.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Create a Job. - * - * The async variant is {@see BatchServiceClient::createJobAsync()} . - * - * @example samples/V1/BatchServiceClient/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 Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function createJob(CreateJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); - } - - /** - * Delete a Job. - * - * The async variant is {@see BatchServiceClient::deleteJobAsync()} . - * - * @example samples/V1/BatchServiceClient/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(); - } - - /** - * Get a Job specified by its resource name. - * - * The async variant is {@see BatchServiceClient::getJobAsync()} . - * - * @example samples/V1/BatchServiceClient/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(); - } - - /** - * Return a single Task. - * - * The async variant is {@see BatchServiceClient::getTaskAsync()} . - * - * @example samples/V1/BatchServiceClient/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(); - } - - /** - * List all Jobs for a project within a region. - * - * The async variant is {@see BatchServiceClient::listJobsAsync()} . - * - * @example samples/V1/BatchServiceClient/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); - } - - /** - * List Tasks associated with a job. - * - * The async variant is {@see BatchServiceClient::listTasksAsync()} . - * - * @example samples/V1/BatchServiceClient/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); - } - - /** - * Gets information about a location. - * - * The async variant is {@see BatchServiceClient::getLocationAsync()} . - * - * @example samples/V1/BatchServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see BatchServiceClient::listLocationsAsync()} . - * - * @example samples/V1/BatchServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json deleted file mode 100644 index eae7f15d2f08..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.batch.v1", - "libraryPackage": "Google\\Cloud\\Batch\\V1", - "services": { - "BatchService": { - "clients": { - "grpc": { - "libraryClient": "BatchServiceGapicClient", - "rpcs": { - "CreateJob": { - "methods": [ - "createJob" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "ListJobs": { - "methods": [ - "listJobs" - ] - }, - "ListTasks": { - "methods": [ - "listTasks" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json deleted file mode 100644 index 4fae7bea9f19..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.batch.v1.BatchService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTask": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTasks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php deleted file mode 100644 index 8618662401e1..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_descriptor_config.php +++ /dev/null @@ -1,163 +0,0 @@ - [ - 'google.cloud.batch.v1.BatchService' => [ - 'DeleteJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Batch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\Task', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Batch\V1\ListTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'job' => 'projects/{project}/locations/{location}/jobs/{job}', - 'location' => 'projects/{project}/locations/{location}', - 'task' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}', - 'taskGroup' => 'projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php b/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php deleted file mode 100644 index 53dc86dfd5dc..000000000000 --- a/owl-bot-staging/Batch/v1/src/V1/resources/batch_service_rest_client_config.php +++ /dev/null @@ -1,167 +0,0 @@ - [ - 'google.cloud.batch.v1.BatchService' => [ - 'CreateJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'body' => 'job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*/taskGroups/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/jobs/*/taskGroups/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php b/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php deleted file mode 100644 index 524f1fafb188..000000000000 --- a/owl-bot-staging/Batch/v1/tests/Unit/V1/Client/BatchServiceClientTest.php +++ /dev/null @@ -1,701 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BatchServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BatchServiceClient($options); - } - - /** @test */ - public function createJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $priority = 1165461084; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPriority($priority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $jobTaskGroups = []; - $job->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJob($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.batch.v1.BatchService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobExceptionTest() - { - $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]'); - $job = new Job(); - $jobTaskGroups = []; - $job->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - try { - $gapicClient->createJob($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 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); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new DeleteJobRequest(); - $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.batch.v1.BatchService/DeleteJob', $actualApiFuncCall); - $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); - $request = new DeleteJobRequest(); - $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 getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $priority = 1165461084; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setPriority($priority); - $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.batch.v1.BatchService/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 getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]', '[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.batch.v1.BatchService/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]', '[TASK_GROUP]', '[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 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); - $request = new ListJobsRequest(); - $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.batch.v1.BatchService/ListJobs', $actualFuncCall); - $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); - $request = new ListJobsRequest(); - 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 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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); - $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.batch.v1.BatchService/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->taskGroupName('[PROJECT]', '[LOCATION]', '[JOB]', '[TASK_GROUP]'); - $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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 createJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $priority = 1165461084; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPriority($priority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $jobTaskGroups = []; - $job->setTaskGroups($jobTaskGroups); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJobAsync($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.batch.v1.BatchService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}