source: vendor/google/apiclient-services/src/Backupdr/Resource/ProjectsLocationsBackupVaults.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 11.7 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\Backupdr\Resource;
19
20use Google\Service\Backupdr\BackupVault;
21use Google\Service\Backupdr\FetchUsableBackupVaultsResponse;
22use Google\Service\Backupdr\ListBackupVaultsResponse;
23use Google\Service\Backupdr\Operation;
24use Google\Service\Backupdr\TestIamPermissionsRequest;
25use Google\Service\Backupdr\TestIamPermissionsResponse;
26
27/**
28 * The "backupVaults" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $backupdrService = new Google\Service\Backupdr(...);
32 * $backupVaults = $backupdrService->projects_locations_backupVaults;
33 * </code>
34 */
35class ProjectsLocationsBackupVaults extends \Google\Service\Resource
36{
37 /**
38 * Creates a new BackupVault in a given project and location.
39 * (backupVaults.create)
40 *
41 * @param string $parent Required. Value for parent.
42 * @param BackupVault $postBody
43 * @param array $optParams Optional parameters.
44 *
45 * @opt_param string backupVaultId Required. ID of the requesting object If
46 * auto-generating ID server-side, remove this field and backup_vault_id from
47 * the method_signature of Create RPC
48 * @opt_param string requestId Optional. An optional request ID to identify
49 * requests. Specify a unique request ID so that if you must retry your request,
50 * the server will know to ignore the request if it has already been completed.
51 * The server will guarantee that for at least 60 minutes since the first
52 * request. For example, consider a situation where you make an initial request
53 * and the request times out. If you make the request again with the same
54 * request ID, the server can check if original operation with the same request
55 * ID was received, and if so, will ignore the second request. This prevents
56 * clients from accidentally creating duplicate commitments. The request ID must
57 * be a valid UUID with the exception that zero UUID is not supported
58 * (00000000-0000-0000-0000-000000000000).
59 * @opt_param bool validateOnly Optional. Only validate the request, but do not
60 * perform mutations. The default is 'false'.
61 * @return Operation
62 * @throws \Google\Service\Exception
63 */
64 public function create($parent, BackupVault $postBody, $optParams = [])
65 {
66 $params = ['parent' => $parent, 'postBody' => $postBody];
67 $params = array_merge($params, $optParams);
68 return $this->call('create', [$params], Operation::class);
69 }
70 /**
71 * Deletes a BackupVault. (backupVaults.delete)
72 *
73 * @param string $name Required. Name of the resource.
74 * @param array $optParams Optional parameters.
75 *
76 * @opt_param bool allowMissing Optional. If true and the BackupVault is not
77 * found, the request will succeed but no action will be taken.
78 * @opt_param string etag The current etag of the backup vault. If an etag is
79 * provided and does not match the current etag of the connection, deletion will
80 * be blocked.
81 * @opt_param bool force Optional. If set to true, any data source from this
82 * backup vault will also be deleted.
83 * @opt_param bool ignoreBackupPlanReferences Optional. If set to true,
84 * backupvault deletion will proceed even if there are backup plans referencing
85 * the backupvault. The default is 'false'.
86 * @opt_param string requestId Optional. An optional request ID to identify
87 * requests. Specify a unique request ID so that if you must retry your request,
88 * the server will know to ignore the request if it has already been completed.
89 * The server will guarantee that for at least 60 minutes after the first
90 * request. For example, consider a situation where you make an initial request
91 * and the request times out. If you make the request again with the same
92 * request ID, the server can check if original operation with the same request
93 * ID was received, and if so, will ignore the second request. This prevents
94 * clients from accidentally creating duplicate commitments. The request ID must
95 * be a valid UUID with the exception that zero UUID is not supported
96 * (00000000-0000-0000-0000-000000000000).
97 * @opt_param bool validateOnly Optional. Only validate the request, but do not
98 * perform mutations. The default is 'false'.
99 * @return Operation
100 * @throws \Google\Service\Exception
101 */
102 public function delete($name, $optParams = [])
103 {
104 $params = ['name' => $name];
105 $params = array_merge($params, $optParams);
106 return $this->call('delete', [$params], Operation::class);
107 }
108 /**
109 * FetchUsableBackupVaults lists usable BackupVaults in a given project and
110 * location. Usable BackupVault are the ones that user has
111 * backupdr.backupVaults.get permission. (backupVaults.fetchUsable)
112 *
113 * @param string $parent Required. The project and location for which to
114 * retrieve backupvault stores information, in the format
115 * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR,
116 * locations map to Google Cloud regions, for example **us-central1**. To
117 * retrieve backupvault stores for all locations, use "-" for the '{location}'
118 * value.
119 * @param array $optParams Optional parameters.
120 *
121 * @opt_param string filter Optional. Filtering results.
122 * @opt_param string orderBy Optional. Hint for how to order the results.
123 * @opt_param int pageSize Optional. Requested page size. Server may return
124 * fewer items than requested. If unspecified, server will pick an appropriate
125 * default.
126 * @opt_param string pageToken Optional. A token identifying a page of results
127 * the server should return.
128 * @return FetchUsableBackupVaultsResponse
129 * @throws \Google\Service\Exception
130 */
131 public function fetchUsable($parent, $optParams = [])
132 {
133 $params = ['parent' => $parent];
134 $params = array_merge($params, $optParams);
135 return $this->call('fetchUsable', [$params], FetchUsableBackupVaultsResponse::class);
136 }
137 /**
138 * Gets details of a BackupVault. (backupVaults.get)
139 *
140 * @param string $name Required. Name of the backupvault store resource name, in
141 * the format
142 * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
143 * @param array $optParams Optional parameters.
144 *
145 * @opt_param string view Optional. Reserved for future use to provide a BASIC &
146 * FULL view of Backup Vault
147 * @return BackupVault
148 * @throws \Google\Service\Exception
149 */
150 public function get($name, $optParams = [])
151 {
152 $params = ['name' => $name];
153 $params = array_merge($params, $optParams);
154 return $this->call('get', [$params], BackupVault::class);
155 }
156 /**
157 * Lists BackupVaults in a given project and location.
158 * (backupVaults.listProjectsLocationsBackupVaults)
159 *
160 * @param string $parent Required. The project and location for which to
161 * retrieve backupvault stores information, in the format
162 * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR,
163 * locations map to Google Cloud regions, for example **us-central1**. To
164 * retrieve backupvault stores for all locations, use "-" for the '{location}'
165 * value.
166 * @param array $optParams Optional parameters.
167 *
168 * @opt_param string filter Optional. Filtering results.
169 * @opt_param string orderBy Optional. Hint for how to order the results.
170 * @opt_param int pageSize Optional. Requested page size. Server may return
171 * fewer items than requested. If unspecified, server will pick an appropriate
172 * default.
173 * @opt_param string pageToken Optional. A token identifying a page of results
174 * the server should return.
175 * @opt_param string view Optional. Reserved for future use to provide a BASIC &
176 * FULL view of Backup Vault.
177 * @return ListBackupVaultsResponse
178 * @throws \Google\Service\Exception
179 */
180 public function listProjectsLocationsBackupVaults($parent, $optParams = [])
181 {
182 $params = ['parent' => $parent];
183 $params = array_merge($params, $optParams);
184 return $this->call('list', [$params], ListBackupVaultsResponse::class);
185 }
186 /**
187 * Updates the settings of a BackupVault. (backupVaults.patch)
188 *
189 * @param string $name Output only. Identifier. Name of the backup vault to
190 * create. It must have the
191 * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
192 * `{backupvault}` cannot be changed after creation. It must be between 3-63
193 * characters long and must be unique within the project and location.
194 * @param BackupVault $postBody
195 * @param array $optParams Optional parameters.
196 *
197 * @opt_param bool force Optional. If set to true, will not check plan duration
198 * against backup vault enforcement duration.
199 * @opt_param string requestId Optional. An optional request ID to identify
200 * requests. Specify a unique request ID so that if you must retry your request,
201 * the server will know to ignore the request if it has already been completed.
202 * The server will guarantee that for at least 60 minutes since the first
203 * request. For example, consider a situation where you make an initial request
204 * and the request times out. If you make the request again with the same
205 * request ID, the server can check if original operation with the same request
206 * ID was received, and if so, will ignore the second request. This prevents
207 * clients from accidentally creating duplicate commitments. The request ID must
208 * be a valid UUID with the exception that zero UUID is not supported
209 * (00000000-0000-0000-0000-000000000000).
210 * @opt_param string updateMask Required. Field mask is used to specify the
211 * fields to be overwritten in the BackupVault resource by the update. The
212 * fields specified in the update_mask are relative to the resource, not the
213 * full request. A field will be overwritten if it is in the mask. If the user
214 * does not provide a mask then the request will fail.
215 * @opt_param bool validateOnly Optional. Only validate the request, but do not
216 * perform mutations. The default is 'false'.
217 * @return Operation
218 * @throws \Google\Service\Exception
219 */
220 public function patch($name, BackupVault $postBody, $optParams = [])
221 {
222 $params = ['name' => $name, 'postBody' => $postBody];
223 $params = array_merge($params, $optParams);
224 return $this->call('patch', [$params], Operation::class);
225 }
226 /**
227 * Returns the caller's permissions on a BackupVault resource. A caller is not
228 * required to have Google IAM permission to make this request.
229 * (backupVaults.testIamPermissions)
230 *
231 * @param string $resource REQUIRED: The resource for which the policy detail is
232 * being requested. See [Resource
233 * names](https://cloud.google.com/apis/design/resource_names) for the
234 * appropriate value for this field.
235 * @param TestIamPermissionsRequest $postBody
236 * @param array $optParams Optional parameters.
237 * @return TestIamPermissionsResponse
238 * @throws \Google\Service\Exception
239 */
240 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
241 {
242 $params = ['resource' => $resource, 'postBody' => $postBody];
243 $params = array_merge($params, $optParams);
244 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
245 }
246}
247
248// Adding a class alias for backwards compatibility with the previous class name.
249class_alias(ProjectsLocationsBackupVaults::class, 'Google_Service_Backupdr_Resource_ProjectsLocationsBackupVaults');
Note: See TracBrowser for help on using the repository browser.