DeploymentManager.php 19 KB

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