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 DeploymentManager (v2). 24 * 25 * <p> 26 * The Google Cloud Deployment Manager v2 API provides services for configuring, 27 * deploying, and viewing Google Cloud services and APIs via templates which 28 * specify deployments of Cloud resources.</p> 29 * 30 * <p> 31 * For more information about this service, see the API 32 * <a href="https://cloud.google.com/deployment-manager" target="_blank">Documentation</a> 33 * </p> 34 * 35 * @author Google, Inc. 36 */ 37class DeploymentManager extends \Google\Service 38{ 39 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ 40 const CLOUD_PLATFORM = 41 "https://www.googleapis.com/auth/cloud-platform"; 42 /** View your data across Google Cloud services and see the email address of your Google Account. */ 43 const CLOUD_PLATFORM_READ_ONLY = 44 "https://www.googleapis.com/auth/cloud-platform.read-only"; 45 /** View and manage your Google Cloud Platform management resources and deployment status information. */ 46 const NDEV_CLOUDMAN = 47 "https://www.googleapis.com/auth/ndev.cloudman"; 48 /** View your Google Cloud Platform management resources and deployment status information. */ 49 const NDEV_CLOUDMAN_READONLY = 50 "https://www.googleapis.com/auth/ndev.cloudman.readonly"; 51 52 public $deployments; 53 public $manifests; 54 public $operations; 55 public $resources; 56 public $types; 57 58 /** 59 * Constructs the internal representation of the DeploymentManager service. 60 * 61 * @param Client|array $clientOrConfig The client used to deliver requests, or a 62 * config array to pass to a new Client instance. 63 * @param string $rootUrl The root URL used for requests to the service. 64 */ 65 public function __construct($clientOrConfig = [], $rootUrl = null) 66 { 67 parent::__construct($clientOrConfig); 68 $this->rootUrl = $rootUrl ?: 'https://deploymentmanager.googleapis.com/'; 69 $this->servicePath = ''; 70 $this->batchPath = 'batch'; 71 $this->version = 'v2'; 72 $this->serviceName = 'deploymentmanager'; 73 74 $this->deployments = new DeploymentManager\Resource\Deployments( 75 $this, 76 $this->serviceName, 77 'deployments', 78 [ 79 'methods' => [ 80 'cancelPreview' => [ 81 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/cancelPreview', 82 'httpMethod' => 'POST', 83 'parameters' => [ 84 'project' => [ 85 'location' => 'path', 86 'type' => 'string', 87 'required' => true, 88 ], 89 'deployment' => [ 90 'location' => 'path', 91 'type' => 'string', 92 'required' => true, 93 ], 94 ], 95 ],'delete' => [ 96 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}', 97 'httpMethod' => 'DELETE', 98 'parameters' => [ 99 'project' => [ 100 'location' => 'path', 101 'type' => 'string', 102 'required' => true, 103 ], 104 'deployment' => [ 105 'location' => 'path', 106 'type' => 'string', 107 'required' => true, 108 ], 109 'deletePolicy' => [ 110 'location' => 'query', 111 'type' => 'string', 112 ], 113 ], 114 ],'get' => [ 115 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}', 116 'httpMethod' => 'GET', 117 'parameters' => [ 118 'project' => [ 119 'location' => 'path', 120 'type' => 'string', 121 'required' => true, 122 ], 123 'deployment' => [ 124 'location' => 'path', 125 'type' => 'string', 126 'required' => true, 127 ], 128 ], 129 ],'getIamPolicy' => [ 130 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{resource}/getIamPolicy', 131 'httpMethod' => 'GET', 132 'parameters' => [ 133 'project' => [ 134 'location' => 'path', 135 'type' => 'string', 136 'required' => true, 137 ], 138 'resource' => [ 139 'location' => 'path', 140 'type' => 'string', 141 'required' => true, 142 ], 143 'optionsRequestedPolicyVersion' => [ 144 'location' => 'query', 145 'type' => 'integer', 146 ], 147 ], 148 ],'insert' => [ 149 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments', 150 'httpMethod' => 'POST', 151 'parameters' => [ 152 'project' => [ 153 'location' => 'path', 154 'type' => 'string', 155 'required' => true, 156 ], 157 'createPolicy' => [ 158 'location' => 'query', 159 'type' => 'string', 160 ], 161 'preview' => [ 162 'location' => 'query', 163 'type' => 'boolean', 164 ], 165 ], 166 ],'list' => [ 167 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments', 168 'httpMethod' => 'GET', 169 'parameters' => [ 170 'project' => [ 171 'location' => 'path', 172 'type' => 'string', 173 'required' => true, 174 ], 175 'filter' => [ 176 'location' => 'query', 177 'type' => 'string', 178 ], 179 'maxResults' => [ 180 'location' => 'query', 181 'type' => 'integer', 182 ], 183 'orderBy' => [ 184 'location' => 'query', 185 'type' => 'string', 186 ], 187 'pageToken' => [ 188 'location' => 'query', 189 'type' => 'string', 190 ], 191 ], 192 ],'patch' => [ 193 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}', 194 'httpMethod' => 'PATCH', 195 'parameters' => [ 196 'project' => [ 197 'location' => 'path', 198 'type' => 'string', 199 'required' => true, 200 ], 201 'deployment' => [ 202 'location' => 'path', 203 'type' => 'string', 204 'required' => true, 205 ], 206 'createPolicy' => [ 207 'location' => 'query', 208 'type' => 'string', 209 ], 210 'deletePolicy' => [ 211 'location' => 'query', 212 'type' => 'string', 213 ], 214 'preview' => [ 215 'location' => 'query', 216 'type' => 'boolean', 217 ], 218 ], 219 ],'setIamPolicy' => [ 220 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{resource}/setIamPolicy', 221 'httpMethod' => 'POST', 222 'parameters' => [ 223 'project' => [ 224 'location' => 'path', 225 'type' => 'string', 226 'required' => true, 227 ], 228 'resource' => [ 229 'location' => 'path', 230 'type' => 'string', 231 'required' => true, 232 ], 233 ], 234 ],'stop' => [ 235 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/stop', 236 'httpMethod' => 'POST', 237 'parameters' => [ 238 'project' => [ 239 'location' => 'path', 240 'type' => 'string', 241 'required' => true, 242 ], 243 'deployment' => [ 244 'location' => 'path', 245 'type' => 'string', 246 'required' => true, 247 ], 248 ], 249 ],'testIamPermissions' => [ 250 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{resource}/testIamPermissions', 251 'httpMethod' => 'POST', 252 'parameters' => [ 253 'project' => [ 254 'location' => 'path', 255 'type' => 'string', 256 'required' => true, 257 ], 258 'resource' => [ 259 'location' => 'path', 260 'type' => 'string', 261 'required' => true, 262 ], 263 ], 264 ],'update' => [ 265 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}', 266 'httpMethod' => 'PUT', 267 'parameters' => [ 268 'project' => [ 269 'location' => 'path', 270 'type' => 'string', 271 'required' => true, 272 ], 273 'deployment' => [ 274 'location' => 'path', 275 'type' => 'string', 276 'required' => true, 277 ], 278 'createPolicy' => [ 279 'location' => 'query', 280 'type' => 'string', 281 ], 282 'deletePolicy' => [ 283 'location' => 'query', 284 'type' => 'string', 285 ], 286 'preview' => [ 287 'location' => 'query', 288 'type' => 'boolean', 289 ], 290 ], 291 ], 292 ] 293 ] 294 ); 295 $this->manifests = new DeploymentManager\Resource\Manifests( 296 $this, 297 $this->serviceName, 298 'manifests', 299 [ 300 'methods' => [ 301 'get' => [ 302 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/manifests/{manifest}', 303 'httpMethod' => 'GET', 304 'parameters' => [ 305 'project' => [ 306 'location' => 'path', 307 'type' => 'string', 308 'required' => true, 309 ], 310 'deployment' => [ 311 'location' => 'path', 312 'type' => 'string', 313 'required' => true, 314 ], 315 'manifest' => [ 316 'location' => 'path', 317 'type' => 'string', 318 'required' => true, 319 ], 320 ], 321 ],'list' => [ 322 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/manifests', 323 'httpMethod' => 'GET', 324 'parameters' => [ 325 'project' => [ 326 'location' => 'path', 327 'type' => 'string', 328 'required' => true, 329 ], 330 'deployment' => [ 331 'location' => 'path', 332 'type' => 'string', 333 'required' => true, 334 ], 335 'filter' => [ 336 'location' => 'query', 337 'type' => 'string', 338 ], 339 'maxResults' => [ 340 'location' => 'query', 341 'type' => 'integer', 342 ], 343 'orderBy' => [ 344 'location' => 'query', 345 'type' => 'string', 346 ], 347 'pageToken' => [ 348 'location' => 'query', 349 'type' => 'string', 350 ], 351 ], 352 ], 353 ] 354 ] 355 ); 356 $this->operations = new DeploymentManager\Resource\Operations( 357 $this, 358 $this->serviceName, 359 'operations', 360 [ 361 'methods' => [ 362 'get' => [ 363 'path' => 'deploymentmanager/v2/projects/{project}/global/operations/{operation}', 364 'httpMethod' => 'GET', 365 'parameters' => [ 366 'project' => [ 367 'location' => 'path', 368 'type' => 'string', 369 'required' => true, 370 ], 371 'operation' => [ 372 'location' => 'path', 373 'type' => 'string', 374 'required' => true, 375 ], 376 ], 377 ],'list' => [ 378 'path' => 'deploymentmanager/v2/projects/{project}/global/operations', 379 'httpMethod' => 'GET', 380 'parameters' => [ 381 'project' => [ 382 'location' => 'path', 383 'type' => 'string', 384 'required' => true, 385 ], 386 'filter' => [ 387 'location' => 'query', 388 'type' => 'string', 389 ], 390 'maxResults' => [ 391 'location' => 'query', 392 'type' => 'integer', 393 ], 394 'orderBy' => [ 395 'location' => 'query', 396 'type' => 'string', 397 ], 398 'pageToken' => [ 399 'location' => 'query', 400 'type' => 'string', 401 ], 402 ], 403 ], 404 ] 405 ] 406 ); 407 $this->resources = new DeploymentManager\Resource\Resources( 408 $this, 409 $this->serviceName, 410 'resources', 411 [ 412 'methods' => [ 413 'get' => [ 414 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/resources/{resource}', 415 'httpMethod' => 'GET', 416 'parameters' => [ 417 'project' => [ 418 'location' => 'path', 419 'type' => 'string', 420 'required' => true, 421 ], 422 'deployment' => [ 423 'location' => 'path', 424 'type' => 'string', 425 'required' => true, 426 ], 427 'resource' => [ 428 'location' => 'path', 429 'type' => 'string', 430 'required' => true, 431 ], 432 ], 433 ],'list' => [ 434 'path' => 'deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/resources', 435 'httpMethod' => 'GET', 436 'parameters' => [ 437 'project' => [ 438 'location' => 'path', 439 'type' => 'string', 440 'required' => true, 441 ], 442 'deployment' => [ 443 'location' => 'path', 444 'type' => 'string', 445 'required' => true, 446 ], 447 'filter' => [ 448 'location' => 'query', 449 'type' => 'string', 450 ], 451 'maxResults' => [ 452 'location' => 'query', 453 'type' => 'integer', 454 ], 455 'orderBy' => [ 456 'location' => 'query', 457 'type' => 'string', 458 ], 459 'pageToken' => [ 460 'location' => 'query', 461 'type' => 'string', 462 ], 463 ], 464 ], 465 ] 466 ] 467 ); 468 $this->types = new DeploymentManager\Resource\Types( 469 $this, 470 $this->serviceName, 471 'types', 472 [ 473 'methods' => [ 474 'list' => [ 475 'path' => 'deploymentmanager/v2/projects/{project}/global/types', 476 'httpMethod' => 'GET', 477 'parameters' => [ 478 'project' => [ 479 'location' => 'path', 480 'type' => 'string', 481 'required' => true, 482 ], 483 'filter' => [ 484 'location' => 'query', 485 'type' => 'string', 486 ], 487 'maxResults' => [ 488 'location' => 'query', 489 'type' => 'integer', 490 ], 491 'orderBy' => [ 492 'location' => 'query', 493 'type' => 'string', 494 ], 495 'pageToken' => [ 496 'location' => 'query', 497 'type' => 'string', 498 ], 499 ], 500 ], 501 ] 502 ] 503 ); 504 } 505} 506 507// Adding a class alias for backwards compatibility with the previous class name. 508class_alias(DeploymentManager::class, 'Google_Service_DeploymentManager'); 509