[e3d4e0a] | 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 Iam (v2).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | * Manages identity and access control for Google Cloud resources, including the
|
---|
| 27 | * creation of service accounts, which you can use to authenticate to Google and
|
---|
| 28 | * make API calls. Enabling this API also enables the IAM Service Account
|
---|
| 29 | * Credentials API (iamcredentials.googleapis.com). However, disabling this API
|
---|
| 30 | * doesn't disable the IAM Service Account Credentials API.</p>
|
---|
| 31 | *
|
---|
| 32 | * <p>
|
---|
| 33 | * For more information about this service, see the API
|
---|
| 34 | * <a href="https://cloud.google.com/iam/" target="_blank">Documentation</a>
|
---|
| 35 | * </p>
|
---|
| 36 | *
|
---|
| 37 | * @author Google, Inc.
|
---|
| 38 | */
|
---|
| 39 | class Iam extends \Google\Service
|
---|
| 40 | {
|
---|
| 41 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
| 42 | const CLOUD_PLATFORM =
|
---|
| 43 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
| 44 |
|
---|
| 45 | public $policies;
|
---|
| 46 | public $policies_operations;
|
---|
| 47 | public $rootUrlTemplate;
|
---|
| 48 |
|
---|
| 49 | /**
|
---|
| 50 | * Constructs the internal representation of the Iam service.
|
---|
| 51 | *
|
---|
| 52 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 53 | * config array to pass to a new Client instance.
|
---|
| 54 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 55 | */
|
---|
| 56 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 57 | {
|
---|
| 58 | parent::__construct($clientOrConfig);
|
---|
| 59 | $this->rootUrl = $rootUrl ?: 'https://iam.googleapis.com/';
|
---|
| 60 | $this->rootUrlTemplate = $rootUrl ?: 'https://iam.UNIVERSE_DOMAIN/';
|
---|
| 61 | $this->servicePath = '';
|
---|
| 62 | $this->batchPath = 'batch';
|
---|
| 63 | $this->version = 'v2';
|
---|
| 64 | $this->serviceName = 'iam';
|
---|
| 65 |
|
---|
| 66 | $this->policies = new Iam\Resource\Policies(
|
---|
| 67 | $this,
|
---|
| 68 | $this->serviceName,
|
---|
| 69 | 'policies',
|
---|
| 70 | [
|
---|
| 71 | 'methods' => [
|
---|
| 72 | 'createPolicy' => [
|
---|
| 73 | 'path' => 'v2/{+parent}',
|
---|
| 74 | 'httpMethod' => 'POST',
|
---|
| 75 | 'parameters' => [
|
---|
| 76 | 'parent' => [
|
---|
| 77 | 'location' => 'path',
|
---|
| 78 | 'type' => 'string',
|
---|
| 79 | 'required' => true,
|
---|
| 80 | ],
|
---|
| 81 | 'policyId' => [
|
---|
| 82 | 'location' => 'query',
|
---|
| 83 | 'type' => 'string',
|
---|
| 84 | ],
|
---|
| 85 | ],
|
---|
| 86 | ],'delete' => [
|
---|
| 87 | 'path' => 'v2/{+name}',
|
---|
| 88 | 'httpMethod' => 'DELETE',
|
---|
| 89 | 'parameters' => [
|
---|
| 90 | 'name' => [
|
---|
| 91 | 'location' => 'path',
|
---|
| 92 | 'type' => 'string',
|
---|
| 93 | 'required' => true,
|
---|
| 94 | ],
|
---|
| 95 | 'etag' => [
|
---|
| 96 | 'location' => 'query',
|
---|
| 97 | 'type' => 'string',
|
---|
| 98 | ],
|
---|
| 99 | ],
|
---|
| 100 | ],'get' => [
|
---|
| 101 | 'path' => 'v2/{+name}',
|
---|
| 102 | 'httpMethod' => 'GET',
|
---|
| 103 | 'parameters' => [
|
---|
| 104 | 'name' => [
|
---|
| 105 | 'location' => 'path',
|
---|
| 106 | 'type' => 'string',
|
---|
| 107 | 'required' => true,
|
---|
| 108 | ],
|
---|
| 109 | ],
|
---|
| 110 | ],'listPolicies' => [
|
---|
| 111 | 'path' => 'v2/{+parent}',
|
---|
| 112 | 'httpMethod' => 'GET',
|
---|
| 113 | 'parameters' => [
|
---|
| 114 | 'parent' => [
|
---|
| 115 | 'location' => 'path',
|
---|
| 116 | 'type' => 'string',
|
---|
| 117 | 'required' => true,
|
---|
| 118 | ],
|
---|
| 119 | 'pageSize' => [
|
---|
| 120 | 'location' => 'query',
|
---|
| 121 | 'type' => 'integer',
|
---|
| 122 | ],
|
---|
| 123 | 'pageToken' => [
|
---|
| 124 | 'location' => 'query',
|
---|
| 125 | 'type' => 'string',
|
---|
| 126 | ],
|
---|
| 127 | ],
|
---|
| 128 | ],'update' => [
|
---|
| 129 | 'path' => 'v2/{+name}',
|
---|
| 130 | 'httpMethod' => 'PUT',
|
---|
| 131 | 'parameters' => [
|
---|
| 132 | 'name' => [
|
---|
| 133 | 'location' => 'path',
|
---|
| 134 | 'type' => 'string',
|
---|
| 135 | 'required' => true,
|
---|
| 136 | ],
|
---|
| 137 | ],
|
---|
| 138 | ],
|
---|
| 139 | ]
|
---|
| 140 | ]
|
---|
| 141 | );
|
---|
| 142 | $this->policies_operations = new Iam\Resource\PoliciesOperations(
|
---|
| 143 | $this,
|
---|
| 144 | $this->serviceName,
|
---|
| 145 | 'operations',
|
---|
| 146 | [
|
---|
| 147 | 'methods' => [
|
---|
| 148 | 'get' => [
|
---|
| 149 | 'path' => 'v2/{+name}',
|
---|
| 150 | 'httpMethod' => 'GET',
|
---|
| 151 | 'parameters' => [
|
---|
| 152 | 'name' => [
|
---|
| 153 | 'location' => 'path',
|
---|
| 154 | 'type' => 'string',
|
---|
| 155 | 'required' => true,
|
---|
| 156 | ],
|
---|
| 157 | ],
|
---|
| 158 | ],
|
---|
| 159 | ]
|
---|
| 160 | ]
|
---|
| 161 | );
|
---|
| 162 | }
|
---|
| 163 | }
|
---|
| 164 |
|
---|
| 165 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 166 | class_alias(Iam::class, 'Google_Service_Iam');
|
---|