[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\Baremetalsolution\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Baremetalsolution\BaremetalsolutionEmpty;
|
---|
| 21 | use Google\Service\Baremetalsolution\ListSnapshotSchedulePoliciesResponse;
|
---|
| 22 | use Google\Service\Baremetalsolution\SnapshotSchedulePolicy;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "snapshotSchedulePolicies" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $baremetalsolutionService = new Google\Service\Baremetalsolution(...);
|
---|
| 29 | * $snapshotSchedulePolicies = $baremetalsolutionService->snapshotSchedulePolicies;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsSnapshotSchedulePolicies extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Create a snapshot schedule policy in the specified project.
|
---|
| 36 | * (snapshotSchedulePolicies.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The parent project and location containing
|
---|
| 39 | * the SnapshotSchedulePolicy.
|
---|
| 40 | * @param SnapshotSchedulePolicy $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | *
|
---|
| 43 | * @opt_param string snapshotSchedulePolicyId Required. Snapshot policy ID
|
---|
| 44 | * @return SnapshotSchedulePolicy
|
---|
| 45 | */
|
---|
| 46 | public function create($parent, SnapshotSchedulePolicy $postBody, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('create', [$params], SnapshotSchedulePolicy::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Delete a named snapshot schedule policy. (snapshotSchedulePolicies.delete)
|
---|
| 54 | *
|
---|
| 55 | * @param string $name Required. The name of the snapshot schedule policy to
|
---|
| 56 | * delete.
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | * @return BaremetalsolutionEmpty
|
---|
| 59 | */
|
---|
| 60 | public function delete($name, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['name' => $name];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('delete', [$params], BaremetalsolutionEmpty::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Get details of a single snapshot schedule policy.
|
---|
| 68 | * (snapshotSchedulePolicies.get)
|
---|
| 69 | *
|
---|
| 70 | * @param string $name Required. Name of the resource.
|
---|
| 71 | * @param array $optParams Optional parameters.
|
---|
| 72 | * @return SnapshotSchedulePolicy
|
---|
| 73 | */
|
---|
| 74 | public function get($name, $optParams = [])
|
---|
| 75 | {
|
---|
| 76 | $params = ['name' => $name];
|
---|
| 77 | $params = array_merge($params, $optParams);
|
---|
| 78 | return $this->call('get', [$params], SnapshotSchedulePolicy::class);
|
---|
| 79 | }
|
---|
| 80 | /**
|
---|
| 81 | * List snapshot schedule policies in a given project and location.
|
---|
| 82 | * (snapshotSchedulePolicies.listProjectsLocationsSnapshotSchedulePolicies)
|
---|
| 83 | *
|
---|
| 84 | * @param string $parent Required. The parent project containing the Snapshot
|
---|
| 85 | * Schedule Policies.
|
---|
| 86 | * @param array $optParams Optional parameters.
|
---|
| 87 | *
|
---|
| 88 | * @opt_param string filter List filter.
|
---|
| 89 | * @opt_param int pageSize The maximum number of items to return.
|
---|
| 90 | * @opt_param string pageToken The next_page_token value returned from a
|
---|
| 91 | * previous List request, if any.
|
---|
| 92 | * @return ListSnapshotSchedulePoliciesResponse
|
---|
| 93 | */
|
---|
| 94 | public function listProjectsLocationsSnapshotSchedulePolicies($parent, $optParams = [])
|
---|
| 95 | {
|
---|
| 96 | $params = ['parent' => $parent];
|
---|
| 97 | $params = array_merge($params, $optParams);
|
---|
| 98 | return $this->call('list', [$params], ListSnapshotSchedulePoliciesResponse::class);
|
---|
| 99 | }
|
---|
| 100 | /**
|
---|
| 101 | * Update a snapshot schedule policy in the specified project.
|
---|
| 102 | * (snapshotSchedulePolicies.patch)
|
---|
| 103 | *
|
---|
| 104 | * @param string $name Output only. The name of the snapshot schedule policy.
|
---|
| 105 | * @param SnapshotSchedulePolicy $postBody
|
---|
| 106 | * @param array $optParams Optional parameters.
|
---|
| 107 | *
|
---|
| 108 | * @opt_param string updateMask Required. The list of fields to update.
|
---|
| 109 | * @return SnapshotSchedulePolicy
|
---|
| 110 | */
|
---|
| 111 | public function patch($name, SnapshotSchedulePolicy $postBody, $optParams = [])
|
---|
| 112 | {
|
---|
| 113 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 114 | $params = array_merge($params, $optParams);
|
---|
| 115 | return $this->call('patch', [$params], SnapshotSchedulePolicy::class);
|
---|
| 116 | }
|
---|
| 117 | }
|
---|
| 118 |
|
---|
| 119 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 120 | class_alias(ProjectsLocationsSnapshotSchedulePolicies::class, 'Google_Service_Baremetalsolution_Resource_ProjectsLocationsSnapshotSchedulePolicies');
|
---|