[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 PolicySimulator (v1).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | * Policy Simulator is a collection of endpoints for creating, running, and
|
---|
| 27 | * viewing a Replay. A `Replay` is a type of simulation that lets you see how
|
---|
| 28 | * your members' access to resources might change if you changed your IAM
|
---|
| 29 | * policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past
|
---|
| 30 | * access attempts under both the current policy and your proposed policy, and
|
---|
| 31 | * compares those results to determine how your members' access might change
|
---|
| 32 | * under the proposed policy.</p>
|
---|
| 33 | *
|
---|
| 34 | * <p>
|
---|
| 35 | * For more information about this service, see the API
|
---|
| 36 | * <a href="https://cloud.google.com/iam/docs/simulating-access" target="_blank">Documentation</a>
|
---|
| 37 | * </p>
|
---|
| 38 | *
|
---|
| 39 | * @author Google, Inc.
|
---|
| 40 | */
|
---|
| 41 | class PolicySimulator extends \Google\Service
|
---|
| 42 | {
|
---|
| 43 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
| 44 | const CLOUD_PLATFORM =
|
---|
| 45 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
| 46 |
|
---|
| 47 | public $folders_locations_orgPolicyViolationsPreviews_operations;
|
---|
| 48 | public $folders_locations_replays;
|
---|
| 49 | public $folders_locations_replays_operations;
|
---|
| 50 | public $folders_locations_replays_results;
|
---|
| 51 | public $operations;
|
---|
| 52 | public $organizations_locations_orgPolicyViolationsPreviews_operations;
|
---|
| 53 | public $organizations_locations_replays;
|
---|
| 54 | public $organizations_locations_replays_operations;
|
---|
| 55 | public $organizations_locations_replays_results;
|
---|
| 56 | public $projects_locations_orgPolicyViolationsPreviews_operations;
|
---|
| 57 | public $projects_locations_replays;
|
---|
| 58 | public $projects_locations_replays_operations;
|
---|
| 59 | public $projects_locations_replays_results;
|
---|
| 60 | public $rootUrlTemplate;
|
---|
| 61 |
|
---|
| 62 | /**
|
---|
| 63 | * Constructs the internal representation of the PolicySimulator service.
|
---|
| 64 | *
|
---|
| 65 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 66 | * config array to pass to a new Client instance.
|
---|
| 67 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 68 | */
|
---|
| 69 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 70 | {
|
---|
| 71 | parent::__construct($clientOrConfig);
|
---|
| 72 | $this->rootUrl = $rootUrl ?: 'https://policysimulator.googleapis.com/';
|
---|
| 73 | $this->rootUrlTemplate = $rootUrl ?: 'https://policysimulator.UNIVERSE_DOMAIN/';
|
---|
| 74 | $this->servicePath = '';
|
---|
| 75 | $this->batchPath = 'batch';
|
---|
| 76 | $this->version = 'v1';
|
---|
| 77 | $this->serviceName = 'policysimulator';
|
---|
| 78 |
|
---|
| 79 | $this->folders_locations_orgPolicyViolationsPreviews_operations = new PolicySimulator\Resource\FoldersLocationsOrgPolicyViolationsPreviewsOperations(
|
---|
| 80 | $this,
|
---|
| 81 | $this->serviceName,
|
---|
| 82 | 'operations',
|
---|
| 83 | [
|
---|
| 84 | 'methods' => [
|
---|
| 85 | 'get' => [
|
---|
| 86 | 'path' => 'v1/{+name}',
|
---|
| 87 | 'httpMethod' => 'GET',
|
---|
| 88 | 'parameters' => [
|
---|
| 89 | 'name' => [
|
---|
| 90 | 'location' => 'path',
|
---|
| 91 | 'type' => 'string',
|
---|
| 92 | 'required' => true,
|
---|
| 93 | ],
|
---|
| 94 | ],
|
---|
| 95 | ],
|
---|
| 96 | ]
|
---|
| 97 | ]
|
---|
| 98 | );
|
---|
| 99 | $this->folders_locations_replays = new PolicySimulator\Resource\FoldersLocationsReplays(
|
---|
| 100 | $this,
|
---|
| 101 | $this->serviceName,
|
---|
| 102 | 'replays',
|
---|
| 103 | [
|
---|
| 104 | 'methods' => [
|
---|
| 105 | 'create' => [
|
---|
| 106 | 'path' => 'v1/{+parent}/replays',
|
---|
| 107 | 'httpMethod' => 'POST',
|
---|
| 108 | 'parameters' => [
|
---|
| 109 | 'parent' => [
|
---|
| 110 | 'location' => 'path',
|
---|
| 111 | 'type' => 'string',
|
---|
| 112 | 'required' => true,
|
---|
| 113 | ],
|
---|
| 114 | ],
|
---|
| 115 | ],'get' => [
|
---|
| 116 | 'path' => 'v1/{+name}',
|
---|
| 117 | 'httpMethod' => 'GET',
|
---|
| 118 | 'parameters' => [
|
---|
| 119 | 'name' => [
|
---|
| 120 | 'location' => 'path',
|
---|
| 121 | 'type' => 'string',
|
---|
| 122 | 'required' => true,
|
---|
| 123 | ],
|
---|
| 124 | ],
|
---|
| 125 | ],
|
---|
| 126 | ]
|
---|
| 127 | ]
|
---|
| 128 | );
|
---|
| 129 | $this->folders_locations_replays_operations = new PolicySimulator\Resource\FoldersLocationsReplaysOperations(
|
---|
| 130 | $this,
|
---|
| 131 | $this->serviceName,
|
---|
| 132 | 'operations',
|
---|
| 133 | [
|
---|
| 134 | 'methods' => [
|
---|
| 135 | 'get' => [
|
---|
| 136 | 'path' => 'v1/{+name}',
|
---|
| 137 | 'httpMethod' => 'GET',
|
---|
| 138 | 'parameters' => [
|
---|
| 139 | 'name' => [
|
---|
| 140 | 'location' => 'path',
|
---|
| 141 | 'type' => 'string',
|
---|
| 142 | 'required' => true,
|
---|
| 143 | ],
|
---|
| 144 | ],
|
---|
| 145 | ],'list' => [
|
---|
| 146 | 'path' => 'v1/{+name}',
|
---|
| 147 | 'httpMethod' => 'GET',
|
---|
| 148 | 'parameters' => [
|
---|
| 149 | 'name' => [
|
---|
| 150 | 'location' => 'path',
|
---|
| 151 | 'type' => 'string',
|
---|
| 152 | 'required' => true,
|
---|
| 153 | ],
|
---|
| 154 | 'filter' => [
|
---|
| 155 | 'location' => 'query',
|
---|
| 156 | 'type' => 'string',
|
---|
| 157 | ],
|
---|
| 158 | 'pageSize' => [
|
---|
| 159 | 'location' => 'query',
|
---|
| 160 | 'type' => 'integer',
|
---|
| 161 | ],
|
---|
| 162 | 'pageToken' => [
|
---|
| 163 | 'location' => 'query',
|
---|
| 164 | 'type' => 'string',
|
---|
| 165 | ],
|
---|
| 166 | ],
|
---|
| 167 | ],
|
---|
| 168 | ]
|
---|
| 169 | ]
|
---|
| 170 | );
|
---|
| 171 | $this->folders_locations_replays_results = new PolicySimulator\Resource\FoldersLocationsReplaysResults(
|
---|
| 172 | $this,
|
---|
| 173 | $this->serviceName,
|
---|
| 174 | 'results',
|
---|
| 175 | [
|
---|
| 176 | 'methods' => [
|
---|
| 177 | 'list' => [
|
---|
| 178 | 'path' => 'v1/{+parent}/results',
|
---|
| 179 | 'httpMethod' => 'GET',
|
---|
| 180 | 'parameters' => [
|
---|
| 181 | 'parent' => [
|
---|
| 182 | 'location' => 'path',
|
---|
| 183 | 'type' => 'string',
|
---|
| 184 | 'required' => true,
|
---|
| 185 | ],
|
---|
| 186 | 'pageSize' => [
|
---|
| 187 | 'location' => 'query',
|
---|
| 188 | 'type' => 'integer',
|
---|
| 189 | ],
|
---|
| 190 | 'pageToken' => [
|
---|
| 191 | 'location' => 'query',
|
---|
| 192 | 'type' => 'string',
|
---|
| 193 | ],
|
---|
| 194 | ],
|
---|
| 195 | ],
|
---|
| 196 | ]
|
---|
| 197 | ]
|
---|
| 198 | );
|
---|
| 199 | $this->operations = new PolicySimulator\Resource\Operations(
|
---|
| 200 | $this,
|
---|
| 201 | $this->serviceName,
|
---|
| 202 | 'operations',
|
---|
| 203 | [
|
---|
| 204 | 'methods' => [
|
---|
| 205 | 'get' => [
|
---|
| 206 | 'path' => 'v1/{+name}',
|
---|
| 207 | 'httpMethod' => 'GET',
|
---|
| 208 | 'parameters' => [
|
---|
| 209 | 'name' => [
|
---|
| 210 | 'location' => 'path',
|
---|
| 211 | 'type' => 'string',
|
---|
| 212 | 'required' => true,
|
---|
| 213 | ],
|
---|
| 214 | ],
|
---|
| 215 | ],'list' => [
|
---|
| 216 | 'path' => 'v1/{+name}',
|
---|
| 217 | 'httpMethod' => 'GET',
|
---|
| 218 | 'parameters' => [
|
---|
| 219 | 'name' => [
|
---|
| 220 | 'location' => 'path',
|
---|
| 221 | 'type' => 'string',
|
---|
| 222 | 'required' => true,
|
---|
| 223 | ],
|
---|
| 224 | 'filter' => [
|
---|
| 225 | 'location' => 'query',
|
---|
| 226 | 'type' => 'string',
|
---|
| 227 | ],
|
---|
| 228 | 'pageSize' => [
|
---|
| 229 | 'location' => 'query',
|
---|
| 230 | 'type' => 'integer',
|
---|
| 231 | ],
|
---|
| 232 | 'pageToken' => [
|
---|
| 233 | 'location' => 'query',
|
---|
| 234 | 'type' => 'string',
|
---|
| 235 | ],
|
---|
| 236 | ],
|
---|
| 237 | ],
|
---|
| 238 | ]
|
---|
| 239 | ]
|
---|
| 240 | );
|
---|
| 241 | $this->organizations_locations_orgPolicyViolationsPreviews_operations = new PolicySimulator\Resource\OrganizationsLocationsOrgPolicyViolationsPreviewsOperations(
|
---|
| 242 | $this,
|
---|
| 243 | $this->serviceName,
|
---|
| 244 | 'operations',
|
---|
| 245 | [
|
---|
| 246 | 'methods' => [
|
---|
| 247 | 'get' => [
|
---|
| 248 | 'path' => 'v1/{+name}',
|
---|
| 249 | 'httpMethod' => 'GET',
|
---|
| 250 | 'parameters' => [
|
---|
| 251 | 'name' => [
|
---|
| 252 | 'location' => 'path',
|
---|
| 253 | 'type' => 'string',
|
---|
| 254 | 'required' => true,
|
---|
| 255 | ],
|
---|
| 256 | ],
|
---|
| 257 | ],
|
---|
| 258 | ]
|
---|
| 259 | ]
|
---|
| 260 | );
|
---|
| 261 | $this->organizations_locations_replays = new PolicySimulator\Resource\OrganizationsLocationsReplays(
|
---|
| 262 | $this,
|
---|
| 263 | $this->serviceName,
|
---|
| 264 | 'replays',
|
---|
| 265 | [
|
---|
| 266 | 'methods' => [
|
---|
| 267 | 'create' => [
|
---|
| 268 | 'path' => 'v1/{+parent}/replays',
|
---|
| 269 | 'httpMethod' => 'POST',
|
---|
| 270 | 'parameters' => [
|
---|
| 271 | 'parent' => [
|
---|
| 272 | 'location' => 'path',
|
---|
| 273 | 'type' => 'string',
|
---|
| 274 | 'required' => true,
|
---|
| 275 | ],
|
---|
| 276 | ],
|
---|
| 277 | ],'get' => [
|
---|
| 278 | 'path' => 'v1/{+name}',
|
---|
| 279 | 'httpMethod' => 'GET',
|
---|
| 280 | 'parameters' => [
|
---|
| 281 | 'name' => [
|
---|
| 282 | 'location' => 'path',
|
---|
| 283 | 'type' => 'string',
|
---|
| 284 | 'required' => true,
|
---|
| 285 | ],
|
---|
| 286 | ],
|
---|
| 287 | ],
|
---|
| 288 | ]
|
---|
| 289 | ]
|
---|
| 290 | );
|
---|
| 291 | $this->organizations_locations_replays_operations = new PolicySimulator\Resource\OrganizationsLocationsReplaysOperations(
|
---|
| 292 | $this,
|
---|
| 293 | $this->serviceName,
|
---|
| 294 | 'operations',
|
---|
| 295 | [
|
---|
| 296 | 'methods' => [
|
---|
| 297 | 'get' => [
|
---|
| 298 | 'path' => 'v1/{+name}',
|
---|
| 299 | 'httpMethod' => 'GET',
|
---|
| 300 | 'parameters' => [
|
---|
| 301 | 'name' => [
|
---|
| 302 | 'location' => 'path',
|
---|
| 303 | 'type' => 'string',
|
---|
| 304 | 'required' => true,
|
---|
| 305 | ],
|
---|
| 306 | ],
|
---|
| 307 | ],'list' => [
|
---|
| 308 | 'path' => 'v1/{+name}',
|
---|
| 309 | 'httpMethod' => 'GET',
|
---|
| 310 | 'parameters' => [
|
---|
| 311 | 'name' => [
|
---|
| 312 | 'location' => 'path',
|
---|
| 313 | 'type' => 'string',
|
---|
| 314 | 'required' => true,
|
---|
| 315 | ],
|
---|
| 316 | 'filter' => [
|
---|
| 317 | 'location' => 'query',
|
---|
| 318 | 'type' => 'string',
|
---|
| 319 | ],
|
---|
| 320 | 'pageSize' => [
|
---|
| 321 | 'location' => 'query',
|
---|
| 322 | 'type' => 'integer',
|
---|
| 323 | ],
|
---|
| 324 | 'pageToken' => [
|
---|
| 325 | 'location' => 'query',
|
---|
| 326 | 'type' => 'string',
|
---|
| 327 | ],
|
---|
| 328 | ],
|
---|
| 329 | ],
|
---|
| 330 | ]
|
---|
| 331 | ]
|
---|
| 332 | );
|
---|
| 333 | $this->organizations_locations_replays_results = new PolicySimulator\Resource\OrganizationsLocationsReplaysResults(
|
---|
| 334 | $this,
|
---|
| 335 | $this->serviceName,
|
---|
| 336 | 'results',
|
---|
| 337 | [
|
---|
| 338 | 'methods' => [
|
---|
| 339 | 'list' => [
|
---|
| 340 | 'path' => 'v1/{+parent}/results',
|
---|
| 341 | 'httpMethod' => 'GET',
|
---|
| 342 | 'parameters' => [
|
---|
| 343 | 'parent' => [
|
---|
| 344 | 'location' => 'path',
|
---|
| 345 | 'type' => 'string',
|
---|
| 346 | 'required' => true,
|
---|
| 347 | ],
|
---|
| 348 | 'pageSize' => [
|
---|
| 349 | 'location' => 'query',
|
---|
| 350 | 'type' => 'integer',
|
---|
| 351 | ],
|
---|
| 352 | 'pageToken' => [
|
---|
| 353 | 'location' => 'query',
|
---|
| 354 | 'type' => 'string',
|
---|
| 355 | ],
|
---|
| 356 | ],
|
---|
| 357 | ],
|
---|
| 358 | ]
|
---|
| 359 | ]
|
---|
| 360 | );
|
---|
| 361 | $this->projects_locations_orgPolicyViolationsPreviews_operations = new PolicySimulator\Resource\ProjectsLocationsOrgPolicyViolationsPreviewsOperations(
|
---|
| 362 | $this,
|
---|
| 363 | $this->serviceName,
|
---|
| 364 | 'operations',
|
---|
| 365 | [
|
---|
| 366 | 'methods' => [
|
---|
| 367 | 'get' => [
|
---|
| 368 | 'path' => 'v1/{+name}',
|
---|
| 369 | 'httpMethod' => 'GET',
|
---|
| 370 | 'parameters' => [
|
---|
| 371 | 'name' => [
|
---|
| 372 | 'location' => 'path',
|
---|
| 373 | 'type' => 'string',
|
---|
| 374 | 'required' => true,
|
---|
| 375 | ],
|
---|
| 376 | ],
|
---|
| 377 | ],
|
---|
| 378 | ]
|
---|
| 379 | ]
|
---|
| 380 | );
|
---|
| 381 | $this->projects_locations_replays = new PolicySimulator\Resource\ProjectsLocationsReplays(
|
---|
| 382 | $this,
|
---|
| 383 | $this->serviceName,
|
---|
| 384 | 'replays',
|
---|
| 385 | [
|
---|
| 386 | 'methods' => [
|
---|
| 387 | 'create' => [
|
---|
| 388 | 'path' => 'v1/{+parent}/replays',
|
---|
| 389 | 'httpMethod' => 'POST',
|
---|
| 390 | 'parameters' => [
|
---|
| 391 | 'parent' => [
|
---|
| 392 | 'location' => 'path',
|
---|
| 393 | 'type' => 'string',
|
---|
| 394 | 'required' => true,
|
---|
| 395 | ],
|
---|
| 396 | ],
|
---|
| 397 | ],'get' => [
|
---|
| 398 | 'path' => 'v1/{+name}',
|
---|
| 399 | 'httpMethod' => 'GET',
|
---|
| 400 | 'parameters' => [
|
---|
| 401 | 'name' => [
|
---|
| 402 | 'location' => 'path',
|
---|
| 403 | 'type' => 'string',
|
---|
| 404 | 'required' => true,
|
---|
| 405 | ],
|
---|
| 406 | ],
|
---|
| 407 | ],
|
---|
| 408 | ]
|
---|
| 409 | ]
|
---|
| 410 | );
|
---|
| 411 | $this->projects_locations_replays_operations = new PolicySimulator\Resource\ProjectsLocationsReplaysOperations(
|
---|
| 412 | $this,
|
---|
| 413 | $this->serviceName,
|
---|
| 414 | 'operations',
|
---|
| 415 | [
|
---|
| 416 | 'methods' => [
|
---|
| 417 | 'get' => [
|
---|
| 418 | 'path' => 'v1/{+name}',
|
---|
| 419 | 'httpMethod' => 'GET',
|
---|
| 420 | 'parameters' => [
|
---|
| 421 | 'name' => [
|
---|
| 422 | 'location' => 'path',
|
---|
| 423 | 'type' => 'string',
|
---|
| 424 | 'required' => true,
|
---|
| 425 | ],
|
---|
| 426 | ],
|
---|
| 427 | ],'list' => [
|
---|
| 428 | 'path' => 'v1/{+name}',
|
---|
| 429 | 'httpMethod' => 'GET',
|
---|
| 430 | 'parameters' => [
|
---|
| 431 | 'name' => [
|
---|
| 432 | 'location' => 'path',
|
---|
| 433 | 'type' => 'string',
|
---|
| 434 | 'required' => true,
|
---|
| 435 | ],
|
---|
| 436 | 'filter' => [
|
---|
| 437 | 'location' => 'query',
|
---|
| 438 | 'type' => 'string',
|
---|
| 439 | ],
|
---|
| 440 | 'pageSize' => [
|
---|
| 441 | 'location' => 'query',
|
---|
| 442 | 'type' => 'integer',
|
---|
| 443 | ],
|
---|
| 444 | 'pageToken' => [
|
---|
| 445 | 'location' => 'query',
|
---|
| 446 | 'type' => 'string',
|
---|
| 447 | ],
|
---|
| 448 | ],
|
---|
| 449 | ],
|
---|
| 450 | ]
|
---|
| 451 | ]
|
---|
| 452 | );
|
---|
| 453 | $this->projects_locations_replays_results = new PolicySimulator\Resource\ProjectsLocationsReplaysResults(
|
---|
| 454 | $this,
|
---|
| 455 | $this->serviceName,
|
---|
| 456 | 'results',
|
---|
| 457 | [
|
---|
| 458 | 'methods' => [
|
---|
| 459 | 'list' => [
|
---|
| 460 | 'path' => 'v1/{+parent}/results',
|
---|
| 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 | ],
|
---|
| 478 | ]
|
---|
| 479 | ]
|
---|
| 480 | );
|
---|
| 481 | }
|
---|
| 482 | }
|
---|
| 483 |
|
---|
| 484 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 485 | class_alias(PolicySimulator::class, 'Google_Service_PolicySimulator');
|
---|