source: vendor/google/apiclient-services/src/CloudAlloyDBAdmin/Resource/ProjectsLocationsBackups.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 8.2 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\CloudAlloyDBAdmin\Resource;
19
20use Google\Service\CloudAlloyDBAdmin\Backup;
21use Google\Service\CloudAlloyDBAdmin\ListBackupsResponse;
22use Google\Service\CloudAlloyDBAdmin\Operation;
23
24/**
25 * The "backups" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $alloydbService = new Google\Service\CloudAlloyDBAdmin(...);
29 * $backups = $alloydbService->projects_locations_backups;
30 * </code>
31 */
32class ProjectsLocationsBackups extends \Google\Service\Resource
33{
34 /**
35 * Creates a new Backup in a given project and location. (backups.create)
36 *
37 * @param string $parent Required. Value for parent.
38 * @param Backup $postBody
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string backupId Required. ID of the requesting object.
42 * @opt_param string requestId Optional. An optional request ID to identify
43 * requests. Specify a unique request ID so that if you must retry your request,
44 * the server ignores the request if it has already been completed. The server
45 * guarantees that for at least 60 minutes since the first request. For example,
46 * consider a situation where you make an initial request and the request times
47 * out. If you make the request again with the same request ID, the server can
48 * check if the original operation with the same request ID was received, and if
49 * so, ignores the second request. This prevents clients from accidentally
50 * creating duplicate commitments. The request ID must be a valid UUID with the
51 * exception that zero UUID is not supported
52 * (00000000-0000-0000-0000-000000000000).
53 * @opt_param bool validateOnly Optional. If set, the backend validates the
54 * request, but doesn't actually execute it.
55 * @return Operation
56 * @throws \Google\Service\Exception
57 */
58 public function create($parent, Backup $postBody, $optParams = [])
59 {
60 $params = ['parent' => $parent, 'postBody' => $postBody];
61 $params = array_merge($params, $optParams);
62 return $this->call('create', [$params], Operation::class);
63 }
64 /**
65 * Deletes a single Backup. (backups.delete)
66 *
67 * @param string $name Required. Name of the resource. For the required format,
68 * see the comment on the Backup.name field.
69 * @param array $optParams Optional parameters.
70 *
71 * @opt_param string etag Optional. The current etag of the Backup. If an etag
72 * is provided and does not match the current etag of the Backup, deletion will
73 * be blocked and an ABORTED error will be returned.
74 * @opt_param string requestId Optional. An optional request ID to identify
75 * requests. Specify a unique request ID so that if you must retry your request,
76 * the server ignores the request if it has already been completed. The server
77 * guarantees that for at least 60 minutes since the first request. For example,
78 * consider a situation where you make an initial request and the request times
79 * out. If you make the request again with the same request ID, the server can
80 * check if the original operation with the same request ID was received, and if
81 * so, ignores the second request. This prevents clients from accidentally
82 * creating duplicate commitments. The request ID must be a valid UUID with the
83 * exception that zero UUID is not supported
84 * (00000000-0000-0000-0000-000000000000).
85 * @opt_param bool validateOnly Optional. If set, the backend validates the
86 * request, but doesn't actually execute it.
87 * @return Operation
88 * @throws \Google\Service\Exception
89 */
90 public function delete($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('delete', [$params], Operation::class);
95 }
96 /**
97 * Gets details of a single Backup. (backups.get)
98 *
99 * @param string $name Required. Name of the resource
100 * @param array $optParams Optional parameters.
101 * @return Backup
102 * @throws \Google\Service\Exception
103 */
104 public function get($name, $optParams = [])
105 {
106 $params = ['name' => $name];
107 $params = array_merge($params, $optParams);
108 return $this->call('get', [$params], Backup::class);
109 }
110 /**
111 * Lists Backups in a given project and location.
112 * (backups.listProjectsLocationsBackups)
113 *
114 * @param string $parent Required. Parent value for ListBackupsRequest
115 * @param array $optParams Optional parameters.
116 *
117 * @opt_param string filter Filtering results
118 * @opt_param string orderBy Hint for how to order the results
119 * @opt_param int pageSize Requested page size. Server may return fewer items
120 * than requested. If unspecified, server will pick an appropriate default.
121 * @opt_param string pageToken A token identifying a page of results the server
122 * should return.
123 * @return ListBackupsResponse
124 * @throws \Google\Service\Exception
125 */
126 public function listProjectsLocationsBackups($parent, $optParams = [])
127 {
128 $params = ['parent' => $parent];
129 $params = array_merge($params, $optParams);
130 return $this->call('list', [$params], ListBackupsResponse::class);
131 }
132 /**
133 * Updates the parameters of a single Backup. (backups.patch)
134 *
135 * @param string $name Output only. The name of the backup resource with the
136 * format: * projects/{project}/locations/{region}/backups/{backup_id} where the
137 * cluster and backup ID segments should satisfy the regex expression
138 * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters,
139 * numbers, and dashes, starting with a letter, and ending with a letter or
140 * number. For more details see https://google.aip.dev/122. The prefix of the
141 * backup resource name is the name of the parent resource: *
142 * projects/{project}/locations/{region}
143 * @param Backup $postBody
144 * @param array $optParams Optional parameters.
145 *
146 * @opt_param bool allowMissing Optional. If set to true, update succeeds even
147 * if instance is not found. In that case, a new backup is created and
148 * `update_mask` is ignored.
149 * @opt_param string requestId Optional. An optional request ID to identify
150 * requests. Specify a unique request ID so that if you must retry your request,
151 * the server ignores the request if it has already been completed. The server
152 * guarantees that for at least 60 minutes since the first request. For example,
153 * consider a situation where you make an initial request and the request times
154 * out. If you make the request again with the same request ID, the server can
155 * check if the original operation with the same request ID was received, and if
156 * so, ignores the second request. This prevents clients from accidentally
157 * creating duplicate commitments. The request ID must be a valid UUID with the
158 * exception that zero UUID is not supported
159 * (00000000-0000-0000-0000-000000000000).
160 * @opt_param string updateMask Optional. Field mask is used to specify the
161 * fields to be overwritten in the Backup resource by the update. The fields
162 * specified in the update_mask are relative to the resource, not the full
163 * request. A field will be overwritten if it is in the mask. If the user does
164 * not provide a mask then all fields will be overwritten.
165 * @opt_param bool validateOnly Optional. If set, the backend validates the
166 * request, but doesn't actually execute it.
167 * @return Operation
168 * @throws \Google\Service\Exception
169 */
170 public function patch($name, Backup $postBody, $optParams = [])
171 {
172 $params = ['name' => $name, 'postBody' => $postBody];
173 $params = array_merge($params, $optParams);
174 return $this->call('patch', [$params], Operation::class);
175 }
176}
177
178// Adding a class alias for backwards compatibility with the previous class name.
179class_alias(ProjectsLocationsBackups::class, 'Google_Service_CloudAlloyDBAdmin_Resource_ProjectsLocationsBackups');
Note: See TracBrowser for help on using the repository browser.