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 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for IAMCredentials (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * Creates short-lived credentials for impersonating IAM service accounts.
|
---|
27 | * Disabling this API also disables the IAM API (iam.googleapis.com). However,
|
---|
28 | * enabling this API doesn't enable the IAM API.</p>
|
---|
29 | *
|
---|
30 | * <p>
|
---|
31 | * For more information about this service, see the API
|
---|
32 | * <a href="https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials" target="_blank">Documentation</a>
|
---|
33 | * </p>
|
---|
34 | *
|
---|
35 | * @author Google, Inc.
|
---|
36 | */
|
---|
37 | class IAMCredentials extends \Google\Service
|
---|
38 | {
|
---|
39 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
40 | const CLOUD_PLATFORM =
|
---|
41 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
42 |
|
---|
43 | public $projects_serviceAccounts;
|
---|
44 | public $rootUrlTemplate;
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * Constructs the internal representation of the IAMCredentials service.
|
---|
48 | *
|
---|
49 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
50 | * config array to pass to a new Client instance.
|
---|
51 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
52 | */
|
---|
53 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
54 | {
|
---|
55 | parent::__construct($clientOrConfig);
|
---|
56 | $this->rootUrl = $rootUrl ?: 'https://iamcredentials.googleapis.com/';
|
---|
57 | $this->rootUrlTemplate = $rootUrl ?: 'https://iamcredentials.UNIVERSE_DOMAIN/';
|
---|
58 | $this->servicePath = '';
|
---|
59 | $this->batchPath = 'batch';
|
---|
60 | $this->version = 'v1';
|
---|
61 | $this->serviceName = 'iamcredentials';
|
---|
62 |
|
---|
63 | $this->projects_serviceAccounts = new IAMCredentials\Resource\ProjectsServiceAccounts(
|
---|
64 | $this,
|
---|
65 | $this->serviceName,
|
---|
66 | 'serviceAccounts',
|
---|
67 | [
|
---|
68 | 'methods' => [
|
---|
69 | 'generateAccessToken' => [
|
---|
70 | 'path' => 'v1/{+name}:generateAccessToken',
|
---|
71 | 'httpMethod' => 'POST',
|
---|
72 | 'parameters' => [
|
---|
73 | 'name' => [
|
---|
74 | 'location' => 'path',
|
---|
75 | 'type' => 'string',
|
---|
76 | 'required' => true,
|
---|
77 | ],
|
---|
78 | ],
|
---|
79 | ],'generateIdToken' => [
|
---|
80 | 'path' => 'v1/{+name}:generateIdToken',
|
---|
81 | 'httpMethod' => 'POST',
|
---|
82 | 'parameters' => [
|
---|
83 | 'name' => [
|
---|
84 | 'location' => 'path',
|
---|
85 | 'type' => 'string',
|
---|
86 | 'required' => true,
|
---|
87 | ],
|
---|
88 | ],
|
---|
89 | ],'getAllowedLocations' => [
|
---|
90 | 'path' => 'v1/{+name}/allowedLocations',
|
---|
91 | 'httpMethod' => 'GET',
|
---|
92 | 'parameters' => [
|
---|
93 | 'name' => [
|
---|
94 | 'location' => 'path',
|
---|
95 | 'type' => 'string',
|
---|
96 | 'required' => true,
|
---|
97 | ],
|
---|
98 | ],
|
---|
99 | ],'signBlob' => [
|
---|
100 | 'path' => 'v1/{+name}:signBlob',
|
---|
101 | 'httpMethod' => 'POST',
|
---|
102 | 'parameters' => [
|
---|
103 | 'name' => [
|
---|
104 | 'location' => 'path',
|
---|
105 | 'type' => 'string',
|
---|
106 | 'required' => true,
|
---|
107 | ],
|
---|
108 | ],
|
---|
109 | ],'signJwt' => [
|
---|
110 | 'path' => 'v1/{+name}:signJwt',
|
---|
111 | 'httpMethod' => 'POST',
|
---|
112 | 'parameters' => [
|
---|
113 | 'name' => [
|
---|
114 | 'location' => 'path',
|
---|
115 | 'type' => 'string',
|
---|
116 | 'required' => true,
|
---|
117 | ],
|
---|
118 | ],
|
---|
119 | ],
|
---|
120 | ]
|
---|
121 | ]
|
---|
122 | );
|
---|
123 | }
|
---|
124 | }
|
---|
125 |
|
---|
126 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
127 | class_alias(IAMCredentials::class, 'Google_Service_IAMCredentials');
|
---|