source: vendor/google/apiclient-services/src/BackupforGKE/Resource/ProjectsLocationsRestorePlans.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 6 weeks ago

Upload project files

  • Property mode set to 100644
File size: 10.1 KB
Line 
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
18namespace Google\Service\BackupforGKE\Resource;
19
20use Google\Service\BackupforGKE\GoogleLongrunningOperation;
21use Google\Service\BackupforGKE\ListRestorePlansResponse;
22use Google\Service\BackupforGKE\Policy;
23use Google\Service\BackupforGKE\RestorePlan;
24use Google\Service\BackupforGKE\SetIamPolicyRequest;
25use Google\Service\BackupforGKE\TestIamPermissionsRequest;
26use Google\Service\BackupforGKE\TestIamPermissionsResponse;
27
28/**
29 * The "restorePlans" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $gkebackupService = new Google\Service\BackupforGKE(...);
33 * $restorePlans = $gkebackupService->projects_locations_restorePlans;
34 * </code>
35 */
36class ProjectsLocationsRestorePlans extends \Google\Service\Resource
37{
38 /**
39 * Creates a new RestorePlan in a given location. (restorePlans.create)
40 *
41 * @param string $parent Required. The location within which to create the
42 * RestorePlan. Format: `projects/locations`
43 * @param RestorePlan $postBody
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string restorePlanId Required. The client-provided short name for
47 * the RestorePlan resource. This name must: - be between 1 and 63 characters
48 * long (inclusive) - consist of only lower-case ASCII letters, numbers, and
49 * dashes - start with a lower-case letter - end with a lower-case letter or
50 * number - be unique within the set of RestorePlans in this location
51 * @return GoogleLongrunningOperation
52 * @throws \Google\Service\Exception
53 */
54 public function create($parent, RestorePlan $postBody, $optParams = [])
55 {
56 $params = ['parent' => $parent, 'postBody' => $postBody];
57 $params = array_merge($params, $optParams);
58 return $this->call('create', [$params], GoogleLongrunningOperation::class);
59 }
60 /**
61 * Deletes an existing RestorePlan. (restorePlans.delete)
62 *
63 * @param string $name Required. Fully qualified RestorePlan name. Format:
64 * `projects/locations/restorePlans`
65 * @param array $optParams Optional parameters.
66 *
67 * @opt_param string etag Optional. If provided, this value must match the
68 * current value of the target RestorePlan's etag field or the request is
69 * rejected.
70 * @opt_param bool force Optional. If set to true, any Restores below this
71 * RestorePlan will also be deleted. Otherwise, the request will only succeed if
72 * the RestorePlan has no Restores.
73 * @return GoogleLongrunningOperation
74 * @throws \Google\Service\Exception
75 */
76 public function delete($name, $optParams = [])
77 {
78 $params = ['name' => $name];
79 $params = array_merge($params, $optParams);
80 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
81 }
82 /**
83 * Retrieve the details of a single RestorePlan. (restorePlans.get)
84 *
85 * @param string $name Required. Fully qualified RestorePlan name. Format:
86 * `projects/locations/restorePlans`
87 * @param array $optParams Optional parameters.
88 * @return RestorePlan
89 * @throws \Google\Service\Exception
90 */
91 public function get($name, $optParams = [])
92 {
93 $params = ['name' => $name];
94 $params = array_merge($params, $optParams);
95 return $this->call('get', [$params], RestorePlan::class);
96 }
97 /**
98 * Gets the access control policy for a resource. Returns an empty policy if the
99 * resource exists and does not have a policy set. (restorePlans.getIamPolicy)
100 *
101 * @param string $resource REQUIRED: The resource for which the policy is being
102 * requested. See [Resource
103 * names](https://cloud.google.com/apis/design/resource_names) for the
104 * appropriate value for this field.
105 * @param array $optParams Optional parameters.
106 *
107 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
108 * version that will be used to format the policy. Valid values are 0, 1, and 3.
109 * Requests specifying an invalid value will be rejected. Requests for policies
110 * with any conditional role bindings must specify version 3. Policies with no
111 * conditional role bindings may specify any valid value or leave the field
112 * unset. The policy in the response might use the policy version that you
113 * specified, or it might use a lower policy version. For example, if you
114 * specify version 3, but the policy has no conditional role bindings, the
115 * response uses version 1. To learn which resources support conditions in their
116 * IAM policies, see the [IAM
117 * documentation](https://cloud.google.com/iam/help/conditions/resource-
118 * policies).
119 * @return Policy
120 * @throws \Google\Service\Exception
121 */
122 public function getIamPolicy($resource, $optParams = [])
123 {
124 $params = ['resource' => $resource];
125 $params = array_merge($params, $optParams);
126 return $this->call('getIamPolicy', [$params], Policy::class);
127 }
128 /**
129 * Lists RestorePlans in a given location.
130 * (restorePlans.listProjectsLocationsRestorePlans)
131 *
132 * @param string $parent Required. The location that contains the RestorePlans
133 * to list. Format: `projects/locations`
134 * @param array $optParams Optional parameters.
135 *
136 * @opt_param string filter Optional. Field match expression used to filter the
137 * results.
138 * @opt_param string orderBy Optional. Field by which to sort the results.
139 * @opt_param int pageSize Optional. The target number of results to return in a
140 * single response. If not specified, a default value will be chosen by the
141 * service. Note that the response may include a partial list and a caller
142 * should only rely on the response's next_page_token to determine if there are
143 * more instances left to be queried.
144 * @opt_param string pageToken Optional. The value of next_page_token received
145 * from a previous `ListRestorePlans` call. Provide this to retrieve the
146 * subsequent page in a multi-page list of results. When paginating, all other
147 * parameters provided to `ListRestorePlans` must match the call that provided
148 * the page token.
149 * @return ListRestorePlansResponse
150 * @throws \Google\Service\Exception
151 */
152 public function listProjectsLocationsRestorePlans($parent, $optParams = [])
153 {
154 $params = ['parent' => $parent];
155 $params = array_merge($params, $optParams);
156 return $this->call('list', [$params], ListRestorePlansResponse::class);
157 }
158 /**
159 * Update a RestorePlan. (restorePlans.patch)
160 *
161 * @param string $name Output only. The full name of the RestorePlan resource.
162 * Format: `projects/locations/restorePlans`.
163 * @param RestorePlan $postBody
164 * @param array $optParams Optional parameters.
165 *
166 * @opt_param string updateMask Optional. This is used to specify the fields to
167 * be overwritten in the RestorePlan targeted for update. The values for each of
168 * these updated fields will be taken from the `restore_plan` provided with this
169 * request. Field names are relative to the root of the resource. If no
170 * `update_mask` is provided, all fields in `restore_plan` will be written to
171 * the target RestorePlan resource. Note that OUTPUT_ONLY and IMMUTABLE fields
172 * in `restore_plan` are ignored and are not used to update the target
173 * RestorePlan.
174 * @return GoogleLongrunningOperation
175 * @throws \Google\Service\Exception
176 */
177 public function patch($name, RestorePlan $postBody, $optParams = [])
178 {
179 $params = ['name' => $name, 'postBody' => $postBody];
180 $params = array_merge($params, $optParams);
181 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
182 }
183 /**
184 * Sets the access control policy on the specified resource. Replaces any
185 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
186 * `PERMISSION_DENIED` errors. (restorePlans.setIamPolicy)
187 *
188 * @param string $resource REQUIRED: The resource for which the policy is being
189 * specified. See [Resource
190 * names](https://cloud.google.com/apis/design/resource_names) for the
191 * appropriate value for this field.
192 * @param SetIamPolicyRequest $postBody
193 * @param array $optParams Optional parameters.
194 * @return Policy
195 * @throws \Google\Service\Exception
196 */
197 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
198 {
199 $params = ['resource' => $resource, 'postBody' => $postBody];
200 $params = array_merge($params, $optParams);
201 return $this->call('setIamPolicy', [$params], Policy::class);
202 }
203 /**
204 * Returns permissions that a caller has on the specified resource. If the
205 * resource does not exist, this will return an empty set of permissions, not a
206 * `NOT_FOUND` error. Note: This operation is designed to be used for building
207 * permission-aware UIs and command-line tools, not for authorization checking.
208 * This operation may "fail open" without warning.
209 * (restorePlans.testIamPermissions)
210 *
211 * @param string $resource REQUIRED: The resource for which the policy detail is
212 * being requested. See [Resource
213 * names](https://cloud.google.com/apis/design/resource_names) for the
214 * appropriate value for this field.
215 * @param TestIamPermissionsRequest $postBody
216 * @param array $optParams Optional parameters.
217 * @return TestIamPermissionsResponse
218 * @throws \Google\Service\Exception
219 */
220 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
221 {
222 $params = ['resource' => $resource, 'postBody' => $postBody];
223 $params = array_merge($params, $optParams);
224 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
225 }
226}
227
228// Adding a class alias for backwards compatibility with the previous class name.
229class_alias(ProjectsLocationsRestorePlans::class, 'Google_Service_BackupforGKE_Resource_ProjectsLocationsRestorePlans');
Note: See TracBrowser for help on using the repository browser.