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 AccessContextManager (v1).
24 *
25 * <p>
26 * An API for setting attribute based access control to requests to GCP
27 * services.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/access-context-manager/docs/reference/rest/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class AccessContextManager 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
42  public $accessPolicies;
43  public $accessPolicies_accessLevels;
44  public $accessPolicies_servicePerimeters;
45  public $operations;
46  public $organizations_gcpUserAccessBindings;
47
48  /**
49   * Constructs the internal representation of the AccessContextManager 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://accesscontextmanager.googleapis.com/';
59    $this->servicePath = '';
60    $this->batchPath = 'batch';
61    $this->version = 'v1';
62    $this->serviceName = 'accesscontextmanager';
63
64    $this->accessPolicies = new AccessContextManager\Resource\AccessPolicies(
65        $this,
66        $this->serviceName,
67        'accessPolicies',
68        [
69          'methods' => [
70            'create' => [
71              'path' => 'v1/accessPolicies',
72              'httpMethod' => 'POST',
73              'parameters' => [],
74            ],'delete' => [
75              'path' => 'v1/{+name}',
76              'httpMethod' => 'DELETE',
77              'parameters' => [
78                'name' => [
79                  'location' => 'path',
80                  'type' => 'string',
81                  'required' => true,
82                ],
83              ],
84            ],'get' => [
85              'path' => 'v1/{+name}',
86              'httpMethod' => 'GET',
87              'parameters' => [
88                'name' => [
89                  'location' => 'path',
90                  'type' => 'string',
91                  'required' => true,
92                ],
93              ],
94            ],'getIamPolicy' => [
95              'path' => 'v1/{+resource}:getIamPolicy',
96              'httpMethod' => 'POST',
97              'parameters' => [
98                'resource' => [
99                  'location' => 'path',
100                  'type' => 'string',
101                  'required' => true,
102                ],
103              ],
104            ],'list' => [
105              'path' => 'v1/accessPolicies',
106              'httpMethod' => 'GET',
107              'parameters' => [
108                'pageSize' => [
109                  'location' => 'query',
110                  'type' => 'integer',
111                ],
112                'pageToken' => [
113                  'location' => 'query',
114                  'type' => 'string',
115                ],
116                'parent' => [
117                  'location' => 'query',
118                  'type' => 'string',
119                ],
120              ],
121            ],'patch' => [
122              'path' => 'v1/{+name}',
123              'httpMethod' => 'PATCH',
124              'parameters' => [
125                'name' => [
126                  'location' => 'path',
127                  'type' => 'string',
128                  'required' => true,
129                ],
130                'updateMask' => [
131                  'location' => 'query',
132                  'type' => 'string',
133                ],
134              ],
135            ],'setIamPolicy' => [
136              'path' => 'v1/{+resource}:setIamPolicy',
137              'httpMethod' => 'POST',
138              'parameters' => [
139                'resource' => [
140                  'location' => 'path',
141                  'type' => 'string',
142                  'required' => true,
143                ],
144              ],
145            ],'testIamPermissions' => [
146              'path' => 'v1/{+resource}:testIamPermissions',
147              'httpMethod' => 'POST',
148              'parameters' => [
149                'resource' => [
150                  'location' => 'path',
151                  'type' => 'string',
152                  'required' => true,
153                ],
154              ],
155            ],
156          ]
157        ]
158    );
159    $this->accessPolicies_accessLevels = new AccessContextManager\Resource\AccessPoliciesAccessLevels(
160        $this,
161        $this->serviceName,
162        'accessLevels',
163        [
164          'methods' => [
165            'create' => [
166              'path' => 'v1/{+parent}/accessLevels',
167              'httpMethod' => 'POST',
168              'parameters' => [
169                'parent' => [
170                  'location' => 'path',
171                  'type' => 'string',
172                  'required' => true,
173                ],
174              ],
175            ],'delete' => [
176              'path' => 'v1/{+name}',
177              'httpMethod' => 'DELETE',
178              'parameters' => [
179                'name' => [
180                  'location' => 'path',
181                  'type' => 'string',
182                  'required' => true,
183                ],
184              ],
185            ],'get' => [
186              'path' => 'v1/{+name}',
187              'httpMethod' => 'GET',
188              'parameters' => [
189                'name' => [
190                  'location' => 'path',
191                  'type' => 'string',
192                  'required' => true,
193                ],
194                'accessLevelFormat' => [
195                  'location' => 'query',
196                  'type' => 'string',
197                ],
198              ],
199            ],'list' => [
200              'path' => 'v1/{+parent}/accessLevels',
201              'httpMethod' => 'GET',
202              'parameters' => [
203                'parent' => [
204                  'location' => 'path',
205                  'type' => 'string',
206                  'required' => true,
207                ],
208                'accessLevelFormat' => [
209                  'location' => 'query',
210                  'type' => 'string',
211                ],
212                'pageSize' => [
213                  'location' => 'query',
214                  'type' => 'integer',
215                ],
216                'pageToken' => [
217                  'location' => 'query',
218                  'type' => 'string',
219                ],
220              ],
221            ],'patch' => [
222              'path' => 'v1/{+name}',
223              'httpMethod' => 'PATCH',
224              'parameters' => [
225                'name' => [
226                  'location' => 'path',
227                  'type' => 'string',
228                  'required' => true,
229                ],
230                'updateMask' => [
231                  'location' => 'query',
232                  'type' => 'string',
233                ],
234              ],
235            ],'replaceAll' => [
236              'path' => 'v1/{+parent}/accessLevels:replaceAll',
237              'httpMethod' => 'POST',
238              'parameters' => [
239                'parent' => [
240                  'location' => 'path',
241                  'type' => 'string',
242                  'required' => true,
243                ],
244              ],
245            ],'testIamPermissions' => [
246              'path' => 'v1/{+resource}:testIamPermissions',
247              'httpMethod' => 'POST',
248              'parameters' => [
249                'resource' => [
250                  'location' => 'path',
251                  'type' => 'string',
252                  'required' => true,
253                ],
254              ],
255            ],
256          ]
257        ]
258    );
259    $this->accessPolicies_servicePerimeters = new AccessContextManager\Resource\AccessPoliciesServicePerimeters(
260        $this,
261        $this->serviceName,
262        'servicePerimeters',
263        [
264          'methods' => [
265            'commit' => [
266              'path' => 'v1/{+parent}/servicePerimeters:commit',
267              'httpMethod' => 'POST',
268              'parameters' => [
269                'parent' => [
270                  'location' => 'path',
271                  'type' => 'string',
272                  'required' => true,
273                ],
274              ],
275            ],'create' => [
276              'path' => 'v1/{+parent}/servicePerimeters',
277              'httpMethod' => 'POST',
278              'parameters' => [
279                'parent' => [
280                  'location' => 'path',
281                  'type' => 'string',
282                  'required' => true,
283                ],
284              ],
285            ],'delete' => [
286              'path' => 'v1/{+name}',
287              'httpMethod' => 'DELETE',
288              'parameters' => [
289                'name' => [
290                  'location' => 'path',
291                  'type' => 'string',
292                  'required' => true,
293                ],
294              ],
295            ],'get' => [
296              'path' => 'v1/{+name}',
297              'httpMethod' => 'GET',
298              'parameters' => [
299                'name' => [
300                  'location' => 'path',
301                  'type' => 'string',
302                  'required' => true,
303                ],
304              ],
305            ],'list' => [
306              'path' => 'v1/{+parent}/servicePerimeters',
307              'httpMethod' => 'GET',
308              'parameters' => [
309                'parent' => [
310                  'location' => 'path',
311                  'type' => 'string',
312                  'required' => true,
313                ],
314                'pageSize' => [
315                  'location' => 'query',
316                  'type' => 'integer',
317                ],
318                'pageToken' => [
319                  'location' => 'query',
320                  'type' => 'string',
321                ],
322              ],
323            ],'patch' => [
324              'path' => 'v1/{+name}',
325              'httpMethod' => 'PATCH',
326              'parameters' => [
327                'name' => [
328                  'location' => 'path',
329                  'type' => 'string',
330                  'required' => true,
331                ],
332                'updateMask' => [
333                  'location' => 'query',
334                  'type' => 'string',
335                ],
336              ],
337            ],'replaceAll' => [
338              'path' => 'v1/{+parent}/servicePerimeters:replaceAll',
339              'httpMethod' => 'POST',
340              'parameters' => [
341                'parent' => [
342                  'location' => 'path',
343                  'type' => 'string',
344                  'required' => true,
345                ],
346              ],
347            ],'testIamPermissions' => [
348              'path' => 'v1/{+resource}:testIamPermissions',
349              'httpMethod' => 'POST',
350              'parameters' => [
351                'resource' => [
352                  'location' => 'path',
353                  'type' => 'string',
354                  'required' => true,
355                ],
356              ],
357            ],
358          ]
359        ]
360    );
361    $this->operations = new AccessContextManager\Resource\Operations(
362        $this,
363        $this->serviceName,
364        'operations',
365        [
366          'methods' => [
367            'cancel' => [
368              'path' => 'v1/{+name}:cancel',
369              'httpMethod' => 'POST',
370              'parameters' => [
371                'name' => [
372                  'location' => 'path',
373                  'type' => 'string',
374                  'required' => true,
375                ],
376              ],
377            ],'delete' => [
378              'path' => 'v1/{+name}',
379              'httpMethod' => 'DELETE',
380              'parameters' => [
381                'name' => [
382                  'location' => 'path',
383                  'type' => 'string',
384                  'required' => true,
385                ],
386              ],
387            ],'get' => [
388              'path' => 'v1/{+name}',
389              'httpMethod' => 'GET',
390              'parameters' => [
391                'name' => [
392                  'location' => 'path',
393                  'type' => 'string',
394                  'required' => true,
395                ],
396              ],
397            ],'list' => [
398              'path' => 'v1/{+name}',
399              'httpMethod' => 'GET',
400              'parameters' => [
401                'name' => [
402                  'location' => 'path',
403                  'type' => 'string',
404                  'required' => true,
405                ],
406                'filter' => [
407                  'location' => 'query',
408                  'type' => 'string',
409                ],
410                'pageSize' => [
411                  'location' => 'query',
412                  'type' => 'integer',
413                ],
414                'pageToken' => [
415                  'location' => 'query',
416                  'type' => 'string',
417                ],
418              ],
419            ],
420          ]
421        ]
422    );
423    $this->organizations_gcpUserAccessBindings = new AccessContextManager\Resource\OrganizationsGcpUserAccessBindings(
424        $this,
425        $this->serviceName,
426        'gcpUserAccessBindings',
427        [
428          'methods' => [
429            'create' => [
430              'path' => 'v1/{+parent}/gcpUserAccessBindings',
431              'httpMethod' => 'POST',
432              'parameters' => [
433                'parent' => [
434                  'location' => 'path',
435                  'type' => 'string',
436                  'required' => true,
437                ],
438              ],
439            ],'delete' => [
440              'path' => 'v1/{+name}',
441              'httpMethod' => 'DELETE',
442              'parameters' => [
443                'name' => [
444                  'location' => 'path',
445                  'type' => 'string',
446                  'required' => true,
447                ],
448              ],
449            ],'get' => [
450              'path' => 'v1/{+name}',
451              'httpMethod' => 'GET',
452              'parameters' => [
453                'name' => [
454                  'location' => 'path',
455                  'type' => 'string',
456                  'required' => true,
457                ],
458              ],
459            ],'list' => [
460              'path' => 'v1/{+parent}/gcpUserAccessBindings',
461              'httpMethod' => 'GET',
462              'parameters' => [
463                'parent' => [
464                  'location' => 'path',
465                  'type' => 'string',
466                  'required' => true,
467                ],
468                'pageSize' => [
469                  'location' => 'query',
470                  'type' => 'integer',
471                ],
472                'pageToken' => [
473                  'location' => 'query',
474                  'type' => 'string',
475                ],
476              ],
477            ],'patch' => [
478              'path' => 'v1/{+name}',
479              'httpMethod' => 'PATCH',
480              'parameters' => [
481                'name' => [
482                  'location' => 'path',
483                  'type' => 'string',
484                  'required' => true,
485                ],
486                'updateMask' => [
487                  'location' => 'query',
488                  'type' => 'string',
489                ],
490              ],
491            ],
492          ]
493        ]
494    );
495  }
496}
497
498// Adding a class alias for backwards compatibility with the previous class name.
499class_alias(AccessContextManager::class, 'Google_Service_AccessContextManager');
500