1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service; 19 20use Google\Client; 21 22/** 23 * Service definition for CloudRun (v2). 24 * 25 * <p> 26 * Deploy and manage user provided container images that scale automatically 27 * based on incoming requests. The Cloud Run Admin API v1 follows the Knative 28 * Serving API specification, while v2 is aligned with Google Cloud AIP-based 29 * API standards, as described in https://google.aip.dev/.</p> 30 * 31 * <p> 32 * For more information about this service, see the API 33 * <a href="https://cloud.google.com/run/" target="_blank">Documentation</a> 34 * </p> 35 * 36 * @author Google, Inc. 37 */ 38class CloudRun extends \Google\Service 39{ 40 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ 41 const CLOUD_PLATFORM = 42 "https://www.googleapis.com/auth/cloud-platform"; 43 44 public $projects_locations_jobs; 45 public $projects_locations_jobs_executions; 46 public $projects_locations_jobs_executions_tasks; 47 public $projects_locations_operations; 48 public $projects_locations_services; 49 public $projects_locations_services_revisions; 50 51 /** 52 * Constructs the internal representation of the CloudRun service. 53 * 54 * @param Client|array $clientOrConfig The client used to deliver requests, or a 55 * config array to pass to a new Client instance. 56 * @param string $rootUrl The root URL used for requests to the service. 57 */ 58 public function __construct($clientOrConfig = [], $rootUrl = null) 59 { 60 parent::__construct($clientOrConfig); 61 $this->rootUrl = $rootUrl ?: 'https://run.googleapis.com/'; 62 $this->servicePath = ''; 63 $this->batchPath = 'batch'; 64 $this->version = 'v2'; 65 $this->serviceName = 'run'; 66 67 $this->projects_locations_jobs = new CloudRun\Resource\ProjectsLocationsJobs( 68 $this, 69 $this->serviceName, 70 'jobs', 71 [ 72 'methods' => [ 73 'create' => [ 74 'path' => 'v2/{+parent}/jobs', 75 'httpMethod' => 'POST', 76 'parameters' => [ 77 'parent' => [ 78 'location' => 'path', 79 'type' => 'string', 80 'required' => true, 81 ], 82 'jobId' => [ 83 'location' => 'query', 84 'type' => 'string', 85 ], 86 'validateOnly' => [ 87 'location' => 'query', 88 'type' => 'boolean', 89 ], 90 ], 91 ],'delete' => [ 92 'path' => 'v2/{+name}', 93 'httpMethod' => 'DELETE', 94 'parameters' => [ 95 'name' => [ 96 'location' => 'path', 97 'type' => 'string', 98 'required' => true, 99 ], 100 'etag' => [ 101 'location' => 'query', 102 'type' => 'string', 103 ], 104 'force' => [ 105 'location' => 'query', 106 'type' => 'boolean', 107 ], 108 'validateOnly' => [ 109 'location' => 'query', 110 'type' => 'boolean', 111 ], 112 ], 113 ],'get' => [ 114 'path' => 'v2/{+name}', 115 'httpMethod' => 'GET', 116 'parameters' => [ 117 'name' => [ 118 'location' => 'path', 119 'type' => 'string', 120 'required' => true, 121 ], 122 ], 123 ],'getIamPolicy' => [ 124 'path' => 'v2/{+resource}:getIamPolicy', 125 'httpMethod' => 'GET', 126 'parameters' => [ 127 'resource' => [ 128 'location' => 'path', 129 'type' => 'string', 130 'required' => true, 131 ], 132 'options.requestedPolicyVersion' => [ 133 'location' => 'query', 134 'type' => 'integer', 135 ], 136 ], 137 ],'list' => [ 138 'path' => 'v2/{+parent}/jobs', 139 'httpMethod' => 'GET', 140 'parameters' => [ 141 'parent' => [ 142 'location' => 'path', 143 'type' => 'string', 144 'required' => true, 145 ], 146 'pageSize' => [ 147 'location' => 'query', 148 'type' => 'integer', 149 ], 150 'pageToken' => [ 151 'location' => 'query', 152 'type' => 'string', 153 ], 154 'showDeleted' => [ 155 'location' => 'query', 156 'type' => 'boolean', 157 ], 158 ], 159 ],'patch' => [ 160 'path' => 'v2/{+name}', 161 'httpMethod' => 'PATCH', 162 'parameters' => [ 163 'name' => [ 164 'location' => 'path', 165 'type' => 'string', 166 'required' => true, 167 ], 168 'allowMissing' => [ 169 'location' => 'query', 170 'type' => 'boolean', 171 ], 172 'updateMask' => [ 173 'location' => 'query', 174 'type' => 'string', 175 ], 176 'validateOnly' => [ 177 'location' => 'query', 178 'type' => 'boolean', 179 ], 180 ], 181 ],'run' => [ 182 'path' => 'v2/{+name}:run', 183 'httpMethod' => 'POST', 184 'parameters' => [ 185 'name' => [ 186 'location' => 'path', 187 'type' => 'string', 188 'required' => true, 189 ], 190 ], 191 ],'setIamPolicy' => [ 192 'path' => 'v2/{+resource}:setIamPolicy', 193 'httpMethod' => 'POST', 194 'parameters' => [ 195 'resource' => [ 196 'location' => 'path', 197 'type' => 'string', 198 'required' => true, 199 ], 200 ], 201 ],'testIamPermissions' => [ 202 'path' => 'v2/{+resource}:testIamPermissions', 203 'httpMethod' => 'POST', 204 'parameters' => [ 205 'resource' => [ 206 'location' => 'path', 207 'type' => 'string', 208 'required' => true, 209 ], 210 ], 211 ], 212 ] 213 ] 214 ); 215 $this->projects_locations_jobs_executions = new CloudRun\Resource\ProjectsLocationsJobsExecutions( 216 $this, 217 $this->serviceName, 218 'executions', 219 [ 220 'methods' => [ 221 'delete' => [ 222 'path' => 'v2/{+name}', 223 'httpMethod' => 'DELETE', 224 'parameters' => [ 225 'name' => [ 226 'location' => 'path', 227 'type' => 'string', 228 'required' => true, 229 ], 230 'etag' => [ 231 'location' => 'query', 232 'type' => 'string', 233 ], 234 'validateOnly' => [ 235 'location' => 'query', 236 'type' => 'boolean', 237 ], 238 ], 239 ],'get' => [ 240 'path' => 'v2/{+name}', 241 'httpMethod' => 'GET', 242 'parameters' => [ 243 'name' => [ 244 'location' => 'path', 245 'type' => 'string', 246 'required' => true, 247 ], 248 ], 249 ],'list' => [ 250 'path' => 'v2/{+parent}/executions', 251 'httpMethod' => 'GET', 252 'parameters' => [ 253 'parent' => [ 254 'location' => 'path', 255 'type' => 'string', 256 'required' => true, 257 ], 258 'pageSize' => [ 259 'location' => 'query', 260 'type' => 'integer', 261 ], 262 'pageToken' => [ 263 'location' => 'query', 264 'type' => 'string', 265 ], 266 'showDeleted' => [ 267 'location' => 'query', 268 'type' => 'boolean', 269 ], 270 ], 271 ], 272 ] 273 ] 274 ); 275 $this->projects_locations_jobs_executions_tasks = new CloudRun\Resource\ProjectsLocationsJobsExecutionsTasks( 276 $this, 277 $this->serviceName, 278 'tasks', 279 [ 280 'methods' => [ 281 'get' => [ 282 'path' => 'v2/{+name}', 283 'httpMethod' => 'GET', 284 'parameters' => [ 285 'name' => [ 286 'location' => 'path', 287 'type' => 'string', 288 'required' => true, 289 ], 290 ], 291 ],'list' => [ 292 'path' => 'v2/{+parent}/tasks', 293 'httpMethod' => 'GET', 294 'parameters' => [ 295 'parent' => [ 296 'location' => 'path', 297 'type' => 'string', 298 'required' => true, 299 ], 300 'pageSize' => [ 301 'location' => 'query', 302 'type' => 'integer', 303 ], 304 'pageToken' => [ 305 'location' => 'query', 306 'type' => 'string', 307 ], 308 'showDeleted' => [ 309 'location' => 'query', 310 'type' => 'boolean', 311 ], 312 ], 313 ], 314 ] 315 ] 316 ); 317 $this->projects_locations_operations = new CloudRun\Resource\ProjectsLocationsOperations( 318 $this, 319 $this->serviceName, 320 'operations', 321 [ 322 'methods' => [ 323 'delete' => [ 324 'path' => 'v2/{+name}', 325 'httpMethod' => 'DELETE', 326 'parameters' => [ 327 'name' => [ 328 'location' => 'path', 329 'type' => 'string', 330 'required' => true, 331 ], 332 ], 333 ],'get' => [ 334 'path' => 'v2/{+name}', 335 'httpMethod' => 'GET', 336 'parameters' => [ 337 'name' => [ 338 'location' => 'path', 339 'type' => 'string', 340 'required' => true, 341 ], 342 ], 343 ],'list' => [ 344 'path' => 'v2/{+name}/operations', 345 'httpMethod' => 'GET', 346 'parameters' => [ 347 'name' => [ 348 'location' => 'path', 349 'type' => 'string', 350 'required' => true, 351 ], 352 'filter' => [ 353 'location' => 'query', 354 'type' => 'string', 355 ], 356 'pageSize' => [ 357 'location' => 'query', 358 'type' => 'integer', 359 ], 360 'pageToken' => [ 361 'location' => 'query', 362 'type' => 'string', 363 ], 364 ], 365 ], 366 ] 367 ] 368 ); 369 $this->projects_locations_services = new CloudRun\Resource\ProjectsLocationsServices( 370 $this, 371 $this->serviceName, 372 'services', 373 [ 374 'methods' => [ 375 'create' => [ 376 'path' => 'v2/{+parent}/services', 377 'httpMethod' => 'POST', 378 'parameters' => [ 379 'parent' => [ 380 'location' => 'path', 381 'type' => 'string', 382 'required' => true, 383 ], 384 'serviceId' => [ 385 'location' => 'query', 386 'type' => 'string', 387 ], 388 'validateOnly' => [ 389 'location' => 'query', 390 'type' => 'boolean', 391 ], 392 ], 393 ],'delete' => [ 394 'path' => 'v2/{+name}', 395 'httpMethod' => 'DELETE', 396 'parameters' => [ 397 'name' => [ 398 'location' => 'path', 399 'type' => 'string', 400 'required' => true, 401 ], 402 'etag' => [ 403 'location' => 'query', 404 'type' => 'string', 405 ], 406 'validateOnly' => [ 407 'location' => 'query', 408 'type' => 'boolean', 409 ], 410 ], 411 ],'get' => [ 412 'path' => 'v2/{+name}', 413 'httpMethod' => 'GET', 414 'parameters' => [ 415 'name' => [ 416 'location' => 'path', 417 'type' => 'string', 418 'required' => true, 419 ], 420 ], 421 ],'getIamPolicy' => [ 422 'path' => 'v2/{+resource}:getIamPolicy', 423 'httpMethod' => 'GET', 424 'parameters' => [ 425 'resource' => [ 426 'location' => 'path', 427 'type' => 'string', 428 'required' => true, 429 ], 430 'options.requestedPolicyVersion' => [ 431 'location' => 'query', 432 'type' => 'integer', 433 ], 434 ], 435 ],'list' => [ 436 'path' => 'v2/{+parent}/services', 437 'httpMethod' => 'GET', 438 'parameters' => [ 439 'parent' => [ 440 'location' => 'path', 441 'type' => 'string', 442 'required' => true, 443 ], 444 'pageSize' => [ 445 'location' => 'query', 446 'type' => 'integer', 447 ], 448 'pageToken' => [ 449 'location' => 'query', 450 'type' => 'string', 451 ], 452 'showDeleted' => [ 453 'location' => 'query', 454 'type' => 'boolean', 455 ], 456 ], 457 ],'patch' => [ 458 'path' => 'v2/{+name}', 459 'httpMethod' => 'PATCH', 460 'parameters' => [ 461 'name' => [ 462 'location' => 'path', 463 'type' => 'string', 464 'required' => true, 465 ], 466 'allowMissing' => [ 467 'location' => 'query', 468 'type' => 'boolean', 469 ], 470 'updateMask' => [ 471 'location' => 'query', 472 'type' => 'string', 473 ], 474 'validateOnly' => [ 475 'location' => 'query', 476 'type' => 'boolean', 477 ], 478 ], 479 ],'setIamPolicy' => [ 480 'path' => 'v2/{+resource}:setIamPolicy', 481 'httpMethod' => 'POST', 482 'parameters' => [ 483 'resource' => [ 484 'location' => 'path', 485 'type' => 'string', 486 'required' => true, 487 ], 488 ], 489 ],'testIamPermissions' => [ 490 'path' => 'v2/{+resource}:testIamPermissions', 491 'httpMethod' => 'POST', 492 'parameters' => [ 493 'resource' => [ 494 'location' => 'path', 495 'type' => 'string', 496 'required' => true, 497 ], 498 ], 499 ], 500 ] 501 ] 502 ); 503 $this->projects_locations_services_revisions = new CloudRun\Resource\ProjectsLocationsServicesRevisions( 504 $this, 505 $this->serviceName, 506 'revisions', 507 [ 508 'methods' => [ 509 'delete' => [ 510 'path' => 'v2/{+name}', 511 'httpMethod' => 'DELETE', 512 'parameters' => [ 513 'name' => [ 514 'location' => 'path', 515 'type' => 'string', 516 'required' => true, 517 ], 518 'etag' => [ 519 'location' => 'query', 520 'type' => 'string', 521 ], 522 'validateOnly' => [ 523 'location' => 'query', 524 'type' => 'boolean', 525 ], 526 ], 527 ],'get' => [ 528 'path' => 'v2/{+name}', 529 'httpMethod' => 'GET', 530 'parameters' => [ 531 'name' => [ 532 'location' => 'path', 533 'type' => 'string', 534 'required' => true, 535 ], 536 ], 537 ],'list' => [ 538 'path' => 'v2/{+parent}/revisions', 539 'httpMethod' => 'GET', 540 'parameters' => [ 541 'parent' => [ 542 'location' => 'path', 543 'type' => 'string', 544 'required' => true, 545 ], 546 'pageSize' => [ 547 'location' => 'query', 548 'type' => 'integer', 549 ], 550 'pageToken' => [ 551 'location' => 'query', 552 'type' => 'string', 553 ], 554 'showDeleted' => [ 555 'location' => 'query', 556 'type' => 'boolean', 557 ], 558 ], 559 ], 560 ] 561 ] 562 ); 563 } 564} 565 566// Adding a class alias for backwards compatibility with the previous class name. 567class_alias(CloudRun::class, 'Google_Service_CloudRun'); 568