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 CloudResourceManager (v3).
24 *
25 * <p>
26 * Creates, reads, and updates metadata for Google Cloud Platform resource
27 * containers.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/resource-manager" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class CloudResourceManager extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41  /** View your data across Google Cloud services and see the email address of your Google Account. */
42  const CLOUD_PLATFORM_READ_ONLY =
43      "https://www.googleapis.com/auth/cloud-platform.read-only";
44
45  public $folders;
46  public $liens;
47  public $operations;
48  public $organizations;
49  public $projects;
50  public $tagBindings;
51  public $tagKeys;
52  public $tagValues;
53  public $tagValues_tagHolds;
54
55  /**
56   * Constructs the internal representation of the CloudResourceManager service.
57   *
58   * @param Client|array $clientOrConfig The client used to deliver requests, or a
59   *                                     config array to pass to a new Client instance.
60   * @param string $rootUrl The root URL used for requests to the service.
61   */
62  public function __construct($clientOrConfig = [], $rootUrl = null)
63  {
64    parent::__construct($clientOrConfig);
65    $this->rootUrl = $rootUrl ?: 'https://cloudresourcemanager.googleapis.com/';
66    $this->servicePath = '';
67    $this->batchPath = 'batch';
68    $this->version = 'v3';
69    $this->serviceName = 'cloudresourcemanager';
70
71    $this->folders = new CloudResourceManager\Resource\Folders(
72        $this,
73        $this->serviceName,
74        'folders',
75        [
76          'methods' => [
77            'create' => [
78              'path' => 'v3/folders',
79              'httpMethod' => 'POST',
80              'parameters' => [],
81            ],'delete' => [
82              'path' => 'v3/{+name}',
83              'httpMethod' => 'DELETE',
84              'parameters' => [
85                'name' => [
86                  'location' => 'path',
87                  'type' => 'string',
88                  'required' => true,
89                ],
90              ],
91            ],'get' => [
92              'path' => 'v3/{+name}',
93              'httpMethod' => 'GET',
94              'parameters' => [
95                'name' => [
96                  'location' => 'path',
97                  'type' => 'string',
98                  'required' => true,
99                ],
100              ],
101            ],'getIamPolicy' => [
102              'path' => 'v3/{+resource}:getIamPolicy',
103              'httpMethod' => 'POST',
104              'parameters' => [
105                'resource' => [
106                  'location' => 'path',
107                  'type' => 'string',
108                  'required' => true,
109                ],
110              ],
111            ],'list' => [
112              'path' => 'v3/folders',
113              'httpMethod' => 'GET',
114              'parameters' => [
115                'pageSize' => [
116                  'location' => 'query',
117                  'type' => 'integer',
118                ],
119                'pageToken' => [
120                  'location' => 'query',
121                  'type' => 'string',
122                ],
123                'parent' => [
124                  'location' => 'query',
125                  'type' => 'string',
126                ],
127                'showDeleted' => [
128                  'location' => 'query',
129                  'type' => 'boolean',
130                ],
131              ],
132            ],'move' => [
133              'path' => 'v3/{+name}:move',
134              'httpMethod' => 'POST',
135              'parameters' => [
136                'name' => [
137                  'location' => 'path',
138                  'type' => 'string',
139                  'required' => true,
140                ],
141              ],
142            ],'patch' => [
143              'path' => 'v3/{+name}',
144              'httpMethod' => 'PATCH',
145              'parameters' => [
146                'name' => [
147                  'location' => 'path',
148                  'type' => 'string',
149                  'required' => true,
150                ],
151                'updateMask' => [
152                  'location' => 'query',
153                  'type' => 'string',
154                ],
155              ],
156            ],'search' => [
157              'path' => 'v3/folders:search',
158              'httpMethod' => 'GET',
159              'parameters' => [
160                'pageSize' => [
161                  'location' => 'query',
162                  'type' => 'integer',
163                ],
164                'pageToken' => [
165                  'location' => 'query',
166                  'type' => 'string',
167                ],
168                'query' => [
169                  'location' => 'query',
170                  'type' => 'string',
171                ],
172              ],
173            ],'setIamPolicy' => [
174              'path' => 'v3/{+resource}:setIamPolicy',
175              'httpMethod' => 'POST',
176              'parameters' => [
177                'resource' => [
178                  'location' => 'path',
179                  'type' => 'string',
180                  'required' => true,
181                ],
182              ],
183            ],'testIamPermissions' => [
184              'path' => 'v3/{+resource}:testIamPermissions',
185              'httpMethod' => 'POST',
186              'parameters' => [
187                'resource' => [
188                  'location' => 'path',
189                  'type' => 'string',
190                  'required' => true,
191                ],
192              ],
193            ],'undelete' => [
194              'path' => 'v3/{+name}:undelete',
195              'httpMethod' => 'POST',
196              'parameters' => [
197                'name' => [
198                  'location' => 'path',
199                  'type' => 'string',
200                  'required' => true,
201                ],
202              ],
203            ],
204          ]
205        ]
206    );
207    $this->liens = new CloudResourceManager\Resource\Liens(
208        $this,
209        $this->serviceName,
210        'liens',
211        [
212          'methods' => [
213            'create' => [
214              'path' => 'v3/liens',
215              'httpMethod' => 'POST',
216              'parameters' => [],
217            ],'delete' => [
218              'path' => 'v3/{+name}',
219              'httpMethod' => 'DELETE',
220              'parameters' => [
221                'name' => [
222                  'location' => 'path',
223                  'type' => 'string',
224                  'required' => true,
225                ],
226              ],
227            ],'get' => [
228              'path' => 'v3/{+name}',
229              'httpMethod' => 'GET',
230              'parameters' => [
231                'name' => [
232                  'location' => 'path',
233                  'type' => 'string',
234                  'required' => true,
235                ],
236              ],
237            ],'list' => [
238              'path' => 'v3/liens',
239              'httpMethod' => 'GET',
240              'parameters' => [
241                'pageSize' => [
242                  'location' => 'query',
243                  'type' => 'integer',
244                ],
245                'pageToken' => [
246                  'location' => 'query',
247                  'type' => 'string',
248                ],
249                'parent' => [
250                  'location' => 'query',
251                  'type' => 'string',
252                ],
253              ],
254            ],
255          ]
256        ]
257    );
258    $this->operations = new CloudResourceManager\Resource\Operations(
259        $this,
260        $this->serviceName,
261        'operations',
262        [
263          'methods' => [
264            'get' => [
265              'path' => 'v3/{+name}',
266              'httpMethod' => 'GET',
267              'parameters' => [
268                'name' => [
269                  'location' => 'path',
270                  'type' => 'string',
271                  'required' => true,
272                ],
273              ],
274            ],
275          ]
276        ]
277    );
278    $this->organizations = new CloudResourceManager\Resource\Organizations(
279        $this,
280        $this->serviceName,
281        'organizations',
282        [
283          'methods' => [
284            'get' => [
285              'path' => 'v3/{+name}',
286              'httpMethod' => 'GET',
287              'parameters' => [
288                'name' => [
289                  'location' => 'path',
290                  'type' => 'string',
291                  'required' => true,
292                ],
293              ],
294            ],'getIamPolicy' => [
295              'path' => 'v3/{+resource}:getIamPolicy',
296              'httpMethod' => 'POST',
297              'parameters' => [
298                'resource' => [
299                  'location' => 'path',
300                  'type' => 'string',
301                  'required' => true,
302                ],
303              ],
304            ],'search' => [
305              'path' => 'v3/organizations:search',
306              'httpMethod' => 'GET',
307              'parameters' => [
308                'pageSize' => [
309                  'location' => 'query',
310                  'type' => 'integer',
311                ],
312                'pageToken' => [
313                  'location' => 'query',
314                  'type' => 'string',
315                ],
316                'query' => [
317                  'location' => 'query',
318                  'type' => 'string',
319                ],
320              ],
321            ],'setIamPolicy' => [
322              'path' => 'v3/{+resource}:setIamPolicy',
323              'httpMethod' => 'POST',
324              'parameters' => [
325                'resource' => [
326                  'location' => 'path',
327                  'type' => 'string',
328                  'required' => true,
329                ],
330              ],
331            ],'testIamPermissions' => [
332              'path' => 'v3/{+resource}:testIamPermissions',
333              'httpMethod' => 'POST',
334              'parameters' => [
335                'resource' => [
336                  'location' => 'path',
337                  'type' => 'string',
338                  'required' => true,
339                ],
340              ],
341            ],
342          ]
343        ]
344    );
345    $this->projects = new CloudResourceManager\Resource\Projects(
346        $this,
347        $this->serviceName,
348        'projects',
349        [
350          'methods' => [
351            'create' => [
352              'path' => 'v3/projects',
353              'httpMethod' => 'POST',
354              'parameters' => [],
355            ],'delete' => [
356              'path' => 'v3/{+name}',
357              'httpMethod' => 'DELETE',
358              'parameters' => [
359                'name' => [
360                  'location' => 'path',
361                  'type' => 'string',
362                  'required' => true,
363                ],
364              ],
365            ],'get' => [
366              'path' => 'v3/{+name}',
367              'httpMethod' => 'GET',
368              'parameters' => [
369                'name' => [
370                  'location' => 'path',
371                  'type' => 'string',
372                  'required' => true,
373                ],
374              ],
375            ],'getIamPolicy' => [
376              'path' => 'v3/{+resource}:getIamPolicy',
377              'httpMethod' => 'POST',
378              'parameters' => [
379                'resource' => [
380                  'location' => 'path',
381                  'type' => 'string',
382                  'required' => true,
383                ],
384              ],
385            ],'list' => [
386              'path' => 'v3/projects',
387              'httpMethod' => 'GET',
388              'parameters' => [
389                'pageSize' => [
390                  'location' => 'query',
391                  'type' => 'integer',
392                ],
393                'pageToken' => [
394                  'location' => 'query',
395                  'type' => 'string',
396                ],
397                'parent' => [
398                  'location' => 'query',
399                  'type' => 'string',
400                ],
401                'showDeleted' => [
402                  'location' => 'query',
403                  'type' => 'boolean',
404                ],
405              ],
406            ],'move' => [
407              'path' => 'v3/{+name}:move',
408              'httpMethod' => 'POST',
409              'parameters' => [
410                'name' => [
411                  'location' => 'path',
412                  'type' => 'string',
413                  'required' => true,
414                ],
415              ],
416            ],'patch' => [
417              'path' => 'v3/{+name}',
418              'httpMethod' => 'PATCH',
419              'parameters' => [
420                'name' => [
421                  'location' => 'path',
422                  'type' => 'string',
423                  'required' => true,
424                ],
425                'updateMask' => [
426                  'location' => 'query',
427                  'type' => 'string',
428                ],
429              ],
430            ],'search' => [
431              'path' => 'v3/projects:search',
432              'httpMethod' => 'GET',
433              'parameters' => [
434                'pageSize' => [
435                  'location' => 'query',
436                  'type' => 'integer',
437                ],
438                'pageToken' => [
439                  'location' => 'query',
440                  'type' => 'string',
441                ],
442                'query' => [
443                  'location' => 'query',
444                  'type' => 'string',
445                ],
446              ],
447            ],'setIamPolicy' => [
448              'path' => 'v3/{+resource}:setIamPolicy',
449              'httpMethod' => 'POST',
450              'parameters' => [
451                'resource' => [
452                  'location' => 'path',
453                  'type' => 'string',
454                  'required' => true,
455                ],
456              ],
457            ],'testIamPermissions' => [
458              'path' => 'v3/{+resource}:testIamPermissions',
459              'httpMethod' => 'POST',
460              'parameters' => [
461                'resource' => [
462                  'location' => 'path',
463                  'type' => 'string',
464                  'required' => true,
465                ],
466              ],
467            ],'undelete' => [
468              'path' => 'v3/{+name}:undelete',
469              'httpMethod' => 'POST',
470              'parameters' => [
471                'name' => [
472                  'location' => 'path',
473                  'type' => 'string',
474                  'required' => true,
475                ],
476              ],
477            ],
478          ]
479        ]
480    );
481    $this->tagBindings = new CloudResourceManager\Resource\TagBindings(
482        $this,
483        $this->serviceName,
484        'tagBindings',
485        [
486          'methods' => [
487            'create' => [
488              'path' => 'v3/tagBindings',
489              'httpMethod' => 'POST',
490              'parameters' => [
491                'validateOnly' => [
492                  'location' => 'query',
493                  'type' => 'boolean',
494                ],
495              ],
496            ],'delete' => [
497              'path' => 'v3/{+name}',
498              'httpMethod' => 'DELETE',
499              'parameters' => [
500                'name' => [
501                  'location' => 'path',
502                  'type' => 'string',
503                  'required' => true,
504                ],
505              ],
506            ],'list' => [
507              'path' => 'v3/tagBindings',
508              'httpMethod' => 'GET',
509              'parameters' => [
510                'pageSize' => [
511                  'location' => 'query',
512                  'type' => 'integer',
513                ],
514                'pageToken' => [
515                  'location' => 'query',
516                  'type' => 'string',
517                ],
518                'parent' => [
519                  'location' => 'query',
520                  'type' => 'string',
521                ],
522              ],
523            ],
524          ]
525        ]
526    );
527    $this->tagKeys = new CloudResourceManager\Resource\TagKeys(
528        $this,
529        $this->serviceName,
530        'tagKeys',
531        [
532          'methods' => [
533            'create' => [
534              'path' => 'v3/tagKeys',
535              'httpMethod' => 'POST',
536              'parameters' => [
537                'validateOnly' => [
538                  'location' => 'query',
539                  'type' => 'boolean',
540                ],
541              ],
542            ],'delete' => [
543              'path' => 'v3/{+name}',
544              'httpMethod' => 'DELETE',
545              'parameters' => [
546                'name' => [
547                  'location' => 'path',
548                  'type' => 'string',
549                  'required' => true,
550                ],
551                'etag' => [
552                  'location' => 'query',
553                  'type' => 'string',
554                ],
555                'validateOnly' => [
556                  'location' => 'query',
557                  'type' => 'boolean',
558                ],
559              ],
560            ],'get' => [
561              'path' => 'v3/{+name}',
562              'httpMethod' => 'GET',
563              'parameters' => [
564                'name' => [
565                  'location' => 'path',
566                  'type' => 'string',
567                  'required' => true,
568                ],
569              ],
570            ],'getIamPolicy' => [
571              'path' => 'v3/{+resource}:getIamPolicy',
572              'httpMethod' => 'POST',
573              'parameters' => [
574                'resource' => [
575                  'location' => 'path',
576                  'type' => 'string',
577                  'required' => true,
578                ],
579              ],
580            ],'list' => [
581              'path' => 'v3/tagKeys',
582              'httpMethod' => 'GET',
583              'parameters' => [
584                'pageSize' => [
585                  'location' => 'query',
586                  'type' => 'integer',
587                ],
588                'pageToken' => [
589                  'location' => 'query',
590                  'type' => 'string',
591                ],
592                'parent' => [
593                  'location' => 'query',
594                  'type' => 'string',
595                ],
596              ],
597            ],'patch' => [
598              'path' => 'v3/{+name}',
599              'httpMethod' => 'PATCH',
600              'parameters' => [
601                'name' => [
602                  'location' => 'path',
603                  'type' => 'string',
604                  'required' => true,
605                ],
606                'updateMask' => [
607                  'location' => 'query',
608                  'type' => 'string',
609                ],
610                'validateOnly' => [
611                  'location' => 'query',
612                  'type' => 'boolean',
613                ],
614              ],
615            ],'setIamPolicy' => [
616              'path' => 'v3/{+resource}:setIamPolicy',
617              'httpMethod' => 'POST',
618              'parameters' => [
619                'resource' => [
620                  'location' => 'path',
621                  'type' => 'string',
622                  'required' => true,
623                ],
624              ],
625            ],'testIamPermissions' => [
626              'path' => 'v3/{+resource}:testIamPermissions',
627              'httpMethod' => 'POST',
628              'parameters' => [
629                'resource' => [
630                  'location' => 'path',
631                  'type' => 'string',
632                  'required' => true,
633                ],
634              ],
635            ],
636          ]
637        ]
638    );
639    $this->tagValues = new CloudResourceManager\Resource\TagValues(
640        $this,
641        $this->serviceName,
642        'tagValues',
643        [
644          'methods' => [
645            'create' => [
646              'path' => 'v3/tagValues',
647              'httpMethod' => 'POST',
648              'parameters' => [
649                'validateOnly' => [
650                  'location' => 'query',
651                  'type' => 'boolean',
652                ],
653              ],
654            ],'delete' => [
655              'path' => 'v3/{+name}',
656              'httpMethod' => 'DELETE',
657              'parameters' => [
658                'name' => [
659                  'location' => 'path',
660                  'type' => 'string',
661                  'required' => true,
662                ],
663                'etag' => [
664                  'location' => 'query',
665                  'type' => 'string',
666                ],
667                'validateOnly' => [
668                  'location' => 'query',
669                  'type' => 'boolean',
670                ],
671              ],
672            ],'get' => [
673              'path' => 'v3/{+name}',
674              'httpMethod' => 'GET',
675              'parameters' => [
676                'name' => [
677                  'location' => 'path',
678                  'type' => 'string',
679                  'required' => true,
680                ],
681              ],
682            ],'getIamPolicy' => [
683              'path' => 'v3/{+resource}:getIamPolicy',
684              'httpMethod' => 'POST',
685              'parameters' => [
686                'resource' => [
687                  'location' => 'path',
688                  'type' => 'string',
689                  'required' => true,
690                ],
691              ],
692            ],'list' => [
693              'path' => 'v3/tagValues',
694              'httpMethod' => 'GET',
695              'parameters' => [
696                'pageSize' => [
697                  'location' => 'query',
698                  'type' => 'integer',
699                ],
700                'pageToken' => [
701                  'location' => 'query',
702                  'type' => 'string',
703                ],
704                'parent' => [
705                  'location' => 'query',
706                  'type' => 'string',
707                ],
708              ],
709            ],'patch' => [
710              'path' => 'v3/{+name}',
711              'httpMethod' => 'PATCH',
712              'parameters' => [
713                'name' => [
714                  'location' => 'path',
715                  'type' => 'string',
716                  'required' => true,
717                ],
718                'updateMask' => [
719                  'location' => 'query',
720                  'type' => 'string',
721                ],
722                'validateOnly' => [
723                  'location' => 'query',
724                  'type' => 'boolean',
725                ],
726              ],
727            ],'setIamPolicy' => [
728              'path' => 'v3/{+resource}:setIamPolicy',
729              'httpMethod' => 'POST',
730              'parameters' => [
731                'resource' => [
732                  'location' => 'path',
733                  'type' => 'string',
734                  'required' => true,
735                ],
736              ],
737            ],'testIamPermissions' => [
738              'path' => 'v3/{+resource}:testIamPermissions',
739              'httpMethod' => 'POST',
740              'parameters' => [
741                'resource' => [
742                  'location' => 'path',
743                  'type' => 'string',
744                  'required' => true,
745                ],
746              ],
747            ],
748          ]
749        ]
750    );
751    $this->tagValues_tagHolds = new CloudResourceManager\Resource\TagValuesTagHolds(
752        $this,
753        $this->serviceName,
754        'tagHolds',
755        [
756          'methods' => [
757            'create' => [
758              'path' => 'v3/{+parent}/tagHolds',
759              'httpMethod' => 'POST',
760              'parameters' => [
761                'parent' => [
762                  'location' => 'path',
763                  'type' => 'string',
764                  'required' => true,
765                ],
766                'validateOnly' => [
767                  'location' => 'query',
768                  'type' => 'boolean',
769                ],
770              ],
771            ],'delete' => [
772              'path' => 'v3/{+name}',
773              'httpMethod' => 'DELETE',
774              'parameters' => [
775                'name' => [
776                  'location' => 'path',
777                  'type' => 'string',
778                  'required' => true,
779                ],
780                'validateOnly' => [
781                  'location' => 'query',
782                  'type' => 'boolean',
783                ],
784              ],
785            ],'list' => [
786              'path' => 'v3/{+parent}/tagHolds',
787              'httpMethod' => 'GET',
788              'parameters' => [
789                'parent' => [
790                  'location' => 'path',
791                  'type' => 'string',
792                  'required' => true,
793                ],
794                'filter' => [
795                  'location' => 'query',
796                  'type' => 'string',
797                ],
798                'pageSize' => [
799                  'location' => 'query',
800                  'type' => 'integer',
801                ],
802                'pageToken' => [
803                  'location' => 'query',
804                  'type' => 'string',
805                ],
806              ],
807            ],
808          ]
809        ]
810    );
811  }
812}
813
814// Adding a class alias for backwards compatibility with the previous class name.
815class_alias(CloudResourceManager::class, 'Google_Service_CloudResourceManager');
816