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 AccessApproval (v1).
24 *
25 * <p>
26 * An API for controlling access to data by Google personnel.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/cloud-provider-access-management/access-approval/docs" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class AccessApproval extends \Google\Service
36{
37  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
38  const CLOUD_PLATFORM =
39      "https://www.googleapis.com/auth/cloud-platform";
40
41  public $folders;
42  public $folders_approvalRequests;
43  public $organizations;
44  public $organizations_approvalRequests;
45  public $projects;
46  public $projects_approvalRequests;
47
48  /**
49   * Constructs the internal representation of the AccessApproval service.
50   *
51   * @param Client|array $clientOrConfig The client used to deliver requests, or a
52   *                                     config array to pass to a new Client instance.
53   * @param string $rootUrl The root URL used for requests to the service.
54   */
55  public function __construct($clientOrConfig = [], $rootUrl = null)
56  {
57    parent::__construct($clientOrConfig);
58    $this->rootUrl = $rootUrl ?: 'https://accessapproval.googleapis.com/';
59    $this->servicePath = '';
60    $this->batchPath = 'batch';
61    $this->version = 'v1';
62    $this->serviceName = 'accessapproval';
63
64    $this->folders = new AccessApproval\Resource\Folders(
65        $this,
66        $this->serviceName,
67        'folders',
68        [
69          'methods' => [
70            'deleteAccessApprovalSettings' => [
71              'path' => 'v1/{+name}',
72              'httpMethod' => 'DELETE',
73              'parameters' => [
74                'name' => [
75                  'location' => 'path',
76                  'type' => 'string',
77                  'required' => true,
78                ],
79              ],
80            ],'getAccessApprovalSettings' => [
81              'path' => 'v1/{+name}',
82              'httpMethod' => 'GET',
83              'parameters' => [
84                'name' => [
85                  'location' => 'path',
86                  'type' => 'string',
87                  'required' => true,
88                ],
89              ],
90            ],'getServiceAccount' => [
91              'path' => 'v1/{+name}',
92              'httpMethod' => 'GET',
93              'parameters' => [
94                'name' => [
95                  'location' => 'path',
96                  'type' => 'string',
97                  'required' => true,
98                ],
99              ],
100            ],'updateAccessApprovalSettings' => [
101              'path' => 'v1/{+name}',
102              'httpMethod' => 'PATCH',
103              'parameters' => [
104                'name' => [
105                  'location' => 'path',
106                  'type' => 'string',
107                  'required' => true,
108                ],
109                'updateMask' => [
110                  'location' => 'query',
111                  'type' => 'string',
112                ],
113              ],
114            ],
115          ]
116        ]
117    );
118    $this->folders_approvalRequests = new AccessApproval\Resource\FoldersApprovalRequests(
119        $this,
120        $this->serviceName,
121        'approvalRequests',
122        [
123          'methods' => [
124            'approve' => [
125              'path' => 'v1/{+name}:approve',
126              'httpMethod' => 'POST',
127              'parameters' => [
128                'name' => [
129                  'location' => 'path',
130                  'type' => 'string',
131                  'required' => true,
132                ],
133              ],
134            ],'dismiss' => [
135              'path' => 'v1/{+name}:dismiss',
136              'httpMethod' => 'POST',
137              'parameters' => [
138                'name' => [
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ],
143              ],
144            ],'get' => [
145              'path' => 'v1/{+name}',
146              'httpMethod' => 'GET',
147              'parameters' => [
148                'name' => [
149                  'location' => 'path',
150                  'type' => 'string',
151                  'required' => true,
152                ],
153              ],
154            ],'list' => [
155              'path' => 'v1/{+parent}/approvalRequests',
156              'httpMethod' => 'GET',
157              'parameters' => [
158                'parent' => [
159                  'location' => 'path',
160                  'type' => 'string',
161                  'required' => true,
162                ],
163                'filter' => [
164                  'location' => 'query',
165                  'type' => 'string',
166                ],
167                'pageSize' => [
168                  'location' => 'query',
169                  'type' => 'integer',
170                ],
171                'pageToken' => [
172                  'location' => 'query',
173                  'type' => 'string',
174                ],
175              ],
176            ],
177          ]
178        ]
179    );
180    $this->organizations = new AccessApproval\Resource\Organizations(
181        $this,
182        $this->serviceName,
183        'organizations',
184        [
185          'methods' => [
186            'deleteAccessApprovalSettings' => [
187              'path' => 'v1/{+name}',
188              'httpMethod' => 'DELETE',
189              'parameters' => [
190                'name' => [
191                  'location' => 'path',
192                  'type' => 'string',
193                  'required' => true,
194                ],
195              ],
196            ],'getAccessApprovalSettings' => [
197              'path' => 'v1/{+name}',
198              'httpMethod' => 'GET',
199              'parameters' => [
200                'name' => [
201                  'location' => 'path',
202                  'type' => 'string',
203                  'required' => true,
204                ],
205              ],
206            ],'getServiceAccount' => [
207              'path' => 'v1/{+name}',
208              'httpMethod' => 'GET',
209              'parameters' => [
210                'name' => [
211                  'location' => 'path',
212                  'type' => 'string',
213                  'required' => true,
214                ],
215              ],
216            ],'updateAccessApprovalSettings' => [
217              'path' => 'v1/{+name}',
218              'httpMethod' => 'PATCH',
219              'parameters' => [
220                'name' => [
221                  'location' => 'path',
222                  'type' => 'string',
223                  'required' => true,
224                ],
225                'updateMask' => [
226                  'location' => 'query',
227                  'type' => 'string',
228                ],
229              ],
230            ],
231          ]
232        ]
233    );
234    $this->organizations_approvalRequests = new AccessApproval\Resource\OrganizationsApprovalRequests(
235        $this,
236        $this->serviceName,
237        'approvalRequests',
238        [
239          'methods' => [
240            'approve' => [
241              'path' => 'v1/{+name}:approve',
242              'httpMethod' => 'POST',
243              'parameters' => [
244                'name' => [
245                  'location' => 'path',
246                  'type' => 'string',
247                  'required' => true,
248                ],
249              ],
250            ],'dismiss' => [
251              'path' => 'v1/{+name}:dismiss',
252              'httpMethod' => 'POST',
253              'parameters' => [
254                'name' => [
255                  'location' => 'path',
256                  'type' => 'string',
257                  'required' => true,
258                ],
259              ],
260            ],'get' => [
261              'path' => 'v1/{+name}',
262              'httpMethod' => 'GET',
263              'parameters' => [
264                'name' => [
265                  'location' => 'path',
266                  'type' => 'string',
267                  'required' => true,
268                ],
269              ],
270            ],'list' => [
271              'path' => 'v1/{+parent}/approvalRequests',
272              'httpMethod' => 'GET',
273              'parameters' => [
274                'parent' => [
275                  'location' => 'path',
276                  'type' => 'string',
277                  'required' => true,
278                ],
279                'filter' => [
280                  'location' => 'query',
281                  'type' => 'string',
282                ],
283                'pageSize' => [
284                  'location' => 'query',
285                  'type' => 'integer',
286                ],
287                'pageToken' => [
288                  'location' => 'query',
289                  'type' => 'string',
290                ],
291              ],
292            ],
293          ]
294        ]
295    );
296    $this->projects = new AccessApproval\Resource\Projects(
297        $this,
298        $this->serviceName,
299        'projects',
300        [
301          'methods' => [
302            'deleteAccessApprovalSettings' => [
303              'path' => 'v1/{+name}',
304              'httpMethod' => 'DELETE',
305              'parameters' => [
306                'name' => [
307                  'location' => 'path',
308                  'type' => 'string',
309                  'required' => true,
310                ],
311              ],
312            ],'getAccessApprovalSettings' => [
313              'path' => 'v1/{+name}',
314              'httpMethod' => 'GET',
315              'parameters' => [
316                'name' => [
317                  'location' => 'path',
318                  'type' => 'string',
319                  'required' => true,
320                ],
321              ],
322            ],'getServiceAccount' => [
323              'path' => 'v1/{+name}',
324              'httpMethod' => 'GET',
325              'parameters' => [
326                'name' => [
327                  'location' => 'path',
328                  'type' => 'string',
329                  'required' => true,
330                ],
331              ],
332            ],'updateAccessApprovalSettings' => [
333              'path' => 'v1/{+name}',
334              'httpMethod' => 'PATCH',
335              'parameters' => [
336                'name' => [
337                  'location' => 'path',
338                  'type' => 'string',
339                  'required' => true,
340                ],
341                'updateMask' => [
342                  'location' => 'query',
343                  'type' => 'string',
344                ],
345              ],
346            ],
347          ]
348        ]
349    );
350    $this->projects_approvalRequests = new AccessApproval\Resource\ProjectsApprovalRequests(
351        $this,
352        $this->serviceName,
353        'approvalRequests',
354        [
355          'methods' => [
356            'approve' => [
357              'path' => 'v1/{+name}:approve',
358              'httpMethod' => 'POST',
359              'parameters' => [
360                'name' => [
361                  'location' => 'path',
362                  'type' => 'string',
363                  'required' => true,
364                ],
365              ],
366            ],'dismiss' => [
367              'path' => 'v1/{+name}:dismiss',
368              'httpMethod' => 'POST',
369              'parameters' => [
370                'name' => [
371                  'location' => 'path',
372                  'type' => 'string',
373                  'required' => true,
374                ],
375              ],
376            ],'get' => [
377              'path' => 'v1/{+name}',
378              'httpMethod' => 'GET',
379              'parameters' => [
380                'name' => [
381                  'location' => 'path',
382                  'type' => 'string',
383                  'required' => true,
384                ],
385              ],
386            ],'list' => [
387              'path' => 'v1/{+parent}/approvalRequests',
388              'httpMethod' => 'GET',
389              'parameters' => [
390                'parent' => [
391                  'location' => 'path',
392                  'type' => 'string',
393                  'required' => true,
394                ],
395                'filter' => [
396                  'location' => 'query',
397                  'type' => 'string',
398                ],
399                'pageSize' => [
400                  'location' => 'query',
401                  'type' => 'integer',
402                ],
403                'pageToken' => [
404                  'location' => 'query',
405                  'type' => 'string',
406                ],
407              ],
408            ],
409          ]
410        ]
411    );
412  }
413}
414
415// Adding a class alias for backwards compatibility with the previous class name.
416class_alias(AccessApproval::class, 'Google_Service_AccessApproval');
417