[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\PolicySimulator\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\PolicySimulator\GoogleCloudPolicysimulatorV1Replay;
|
---|
| 21 | use Google\Service\PolicySimulator\GoogleLongrunningOperation;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "replays" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $policysimulatorService = new Google\Service\PolicySimulator(...);
|
---|
| 28 | * $replays = $policysimulatorService->folders_locations_replays;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class FoldersLocationsReplays extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Creates and starts a Replay using the given ReplayConfig. (replays.create)
|
---|
| 35 | *
|
---|
| 36 | * @param string $parent Required. The parent resource where this Replay will be
|
---|
| 37 | * created. This resource must be a project, folder, or organization with a
|
---|
| 38 | * location. Example: `projects/my-example-project/locations/global`
|
---|
| 39 | * @param GoogleCloudPolicysimulatorV1Replay $postBody
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return GoogleLongrunningOperation
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function create($parent, GoogleCloudPolicysimulatorV1Replay $postBody, $optParams = [])
|
---|
| 45 | {
|
---|
| 46 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 47 | $params = array_merge($params, $optParams);
|
---|
| 48 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 49 | }
|
---|
| 50 | /**
|
---|
| 51 | * Gets the specified Replay. Each `Replay` is available for at least 7 days.
|
---|
| 52 | * (replays.get)
|
---|
| 53 | *
|
---|
| 54 | * @param string $name Required. The name of the Replay to retrieve, in the
|
---|
| 55 | * following format: `{projects|folders|organizations}/{resource-
|
---|
| 56 | * id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of
|
---|
| 57 | * the project, folder, or organization that owns the `Replay`. Example:
|
---|
| 58 | * `projects/my-example-
|
---|
| 59 | * project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
|
---|
| 60 | * @param array $optParams Optional parameters.
|
---|
| 61 | * @return GoogleCloudPolicysimulatorV1Replay
|
---|
| 62 | * @throws \Google\Service\Exception
|
---|
| 63 | */
|
---|
| 64 | public function get($name, $optParams = [])
|
---|
| 65 | {
|
---|
| 66 | $params = ['name' => $name];
|
---|
| 67 | $params = array_merge($params, $optParams);
|
---|
| 68 | return $this->call('get', [$params], GoogleCloudPolicysimulatorV1Replay::class);
|
---|
| 69 | }
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 73 | class_alias(FoldersLocationsReplays::class, 'Google_Service_PolicySimulator_Resource_FoldersLocationsReplays');
|
---|