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
18/**
19 * Service definition for CloudResourceManager (v2).
20 *
21 * <p>
22 * Creates, reads, and updates metadata for Google Cloud Platform resource
23 * containers.</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://cloud.google.com/resource-manager" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_CloudResourceManager extends Google_Service
33{
34  /** View and manage your data across Google Cloud Platform services. */
35  const CLOUD_PLATFORM =
36      "https://www.googleapis.com/auth/cloud-platform";
37  /** View your data across Google Cloud Platform services. */
38  const CLOUD_PLATFORM_READ_ONLY =
39      "https://www.googleapis.com/auth/cloud-platform.read-only";
40
41  public $folders;
42  public $operations;
43
44  /**
45   * Constructs the internal representation of the CloudResourceManager service.
46   *
47   * @param Google_Client $client
48   */
49  public function __construct(Google_Client $client)
50  {
51    parent::__construct($client);
52    $this->rootUrl = 'https://cloudresourcemanager.googleapis.com/';
53    $this->servicePath = '';
54    $this->batchPath = 'batch';
55    $this->version = 'v2';
56    $this->serviceName = 'cloudresourcemanager';
57
58    $this->folders = new Google_Service_CloudResourceManager_Resource_Folders(
59        $this,
60        $this->serviceName,
61        'folders',
62        array(
63          'methods' => array(
64            'create' => array(
65              'path' => 'v2/folders',
66              'httpMethod' => 'POST',
67              'parameters' => array(
68                'parent' => array(
69                  'location' => 'query',
70                  'type' => 'string',
71                ),
72              ),
73            ),'delete' => array(
74              'path' => 'v2/{+name}',
75              'httpMethod' => 'DELETE',
76              'parameters' => array(
77                'name' => array(
78                  'location' => 'path',
79                  'type' => 'string',
80                  'required' => true,
81                ),
82              ),
83            ),'get' => array(
84              'path' => 'v2/{+name}',
85              'httpMethod' => 'GET',
86              'parameters' => array(
87                'name' => array(
88                  'location' => 'path',
89                  'type' => 'string',
90                  'required' => true,
91                ),
92              ),
93            ),'getIamPolicy' => array(
94              'path' => 'v2/{+resource}:getIamPolicy',
95              'httpMethod' => 'POST',
96              'parameters' => array(
97                'resource' => array(
98                  'location' => 'path',
99                  'type' => 'string',
100                  'required' => true,
101                ),
102              ),
103            ),'list' => array(
104              'path' => 'v2/folders',
105              'httpMethod' => 'GET',
106              'parameters' => array(
107                'showDeleted' => array(
108                  'location' => 'query',
109                  'type' => 'boolean',
110                ),
111                'pageToken' => array(
112                  'location' => 'query',
113                  'type' => 'string',
114                ),
115                'pageSize' => array(
116                  'location' => 'query',
117                  'type' => 'integer',
118                ),
119                'parent' => array(
120                  'location' => 'query',
121                  'type' => 'string',
122                ),
123              ),
124            ),'move' => array(
125              'path' => 'v2/{+name}:move',
126              'httpMethod' => 'POST',
127              'parameters' => array(
128                'name' => array(
129                  'location' => 'path',
130                  'type' => 'string',
131                  'required' => true,
132                ),
133              ),
134            ),'patch' => array(
135              'path' => 'v2/{+name}',
136              'httpMethod' => 'PATCH',
137              'parameters' => array(
138                'name' => array(
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ),
143                'updateMask' => array(
144                  'location' => 'query',
145                  'type' => 'string',
146                ),
147              ),
148            ),'search' => array(
149              'path' => 'v2/folders:search',
150              'httpMethod' => 'POST',
151              'parameters' => array(),
152            ),'setIamPolicy' => array(
153              'path' => 'v2/{+resource}:setIamPolicy',
154              'httpMethod' => 'POST',
155              'parameters' => array(
156                'resource' => array(
157                  'location' => 'path',
158                  'type' => 'string',
159                  'required' => true,
160                ),
161              ),
162            ),'testIamPermissions' => array(
163              'path' => 'v2/{+resource}:testIamPermissions',
164              'httpMethod' => 'POST',
165              'parameters' => array(
166                'resource' => array(
167                  'location' => 'path',
168                  'type' => 'string',
169                  'required' => true,
170                ),
171              ),
172            ),'undelete' => array(
173              'path' => 'v2/{+name}:undelete',
174              'httpMethod' => 'POST',
175              'parameters' => array(
176                'name' => array(
177                  'location' => 'path',
178                  'type' => 'string',
179                  'required' => true,
180                ),
181              ),
182            ),
183          )
184        )
185    );
186    $this->operations = new Google_Service_CloudResourceManager_Resource_Operations(
187        $this,
188        $this->serviceName,
189        'operations',
190        array(
191          'methods' => array(
192            'get' => array(
193              'path' => 'v1/{+name}',
194              'httpMethod' => 'GET',
195              'parameters' => array(
196                'name' => array(
197                  'location' => 'path',
198                  'type' => 'string',
199                  'required' => true,
200                ),
201              ),
202            ),
203          )
204        )
205    );
206  }
207}
208