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