source: vendor/google/apiclient-services/src/NetAppFiles/Resource/ProjectsLocationsBackupVaultsBackups.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: 6.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\NetAppFiles\Resource;
19
20use Google\Service\NetAppFiles\Backup;
21use Google\Service\NetAppFiles\ListBackupsResponse;
22use Google\Service\NetAppFiles\Operation;
23
24/**
25 * The "backups" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $netappService = new Google\Service\NetAppFiles(...);
29 * $backups = $netappService->projects_locations_backupVaults_backups;
30 * </code>
31 */
32class ProjectsLocationsBackupVaultsBackups extends \Google\Service\Resource
33{
34 /**
35 * Creates a backup from the volume specified in the request The backup can be
36 * created from the given snapshot if specified in the request. If no snapshot
37 * specified, there'll be a new snapshot taken to initiate the backup creation.
38 * (backups.create)
39 *
40 * @param string $parent Required. The NetApp backupVault to create the backups
41 * of, in the format `projects/locations/backupVaults/{backup_vault_id}`
42 * @param Backup $postBody
43 * @param array $optParams Optional parameters.
44 *
45 * @opt_param string backupId Required. The ID to use for the backup. The ID
46 * must be unique within the specified backupVault. Must contain only letters,
47 * numbers and hyphen, with the first character a letter, the last a letter or a
48 * number, and a 63 character maximum.
49 * @return Operation
50 * @throws \Google\Service\Exception
51 */
52 public function create($parent, Backup $postBody, $optParams = [])
53 {
54 $params = ['parent' => $parent, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('create', [$params], Operation::class);
57 }
58 /**
59 * Warning! This operation will permanently delete the backup. (backups.delete)
60 *
61 * @param string $name Required. The backup resource name, in the format `projec
62 * ts/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{
63 * backup_id}`
64 * @param array $optParams Optional parameters.
65 * @return Operation
66 * @throws \Google\Service\Exception
67 */
68 public function delete($name, $optParams = [])
69 {
70 $params = ['name' => $name];
71 $params = array_merge($params, $optParams);
72 return $this->call('delete', [$params], Operation::class);
73 }
74 /**
75 * Returns the description of the specified backup (backups.get)
76 *
77 * @param string $name Required. The backup resource name, in the format `projec
78 * ts/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{
79 * backup_id}`
80 * @param array $optParams Optional parameters.
81 * @return Backup
82 * @throws \Google\Service\Exception
83 */
84 public function get($name, $optParams = [])
85 {
86 $params = ['name' => $name];
87 $params = array_merge($params, $optParams);
88 return $this->call('get', [$params], Backup::class);
89 }
90 /**
91 * Returns descriptions of all backups for a backupVault.
92 * (backups.listProjectsLocationsBackupVaultsBackups)
93 *
94 * @param string $parent Required. The backupVault for which to retrieve backup
95 * information, in the format
96 * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
97 * To retrieve backup information for all locations, use "-" for the
98 * `{location}` value. To retrieve backup information for all backupVaults, use
99 * "-" for the `{backup_vault_id}` value. To retrieve backup information for a
100 * volume, use "-" for the `{backup_vault_id}` value and specify volume full
101 * name with the filter.
102 * @param array $optParams Optional parameters.
103 *
104 * @opt_param string filter The standard list filter. If specified, backups will
105 * be returned based on the attribute name that matches the filter expression.
106 * If empty, then no backups are filtered out. See https://google.aip.dev/160
107 * @opt_param string orderBy Sort results. Supported values are "name", "name
108 * desc" or "" (unsorted).
109 * @opt_param int pageSize The maximum number of items to return. The service
110 * may return fewer than this value. The maximum value is 1000; values above
111 * 1000 will be coerced to 1000.
112 * @opt_param string pageToken The next_page_token value to use if there are
113 * additional results to retrieve for this list request.
114 * @return ListBackupsResponse
115 * @throws \Google\Service\Exception
116 */
117 public function listProjectsLocationsBackupVaultsBackups($parent, $optParams = [])
118 {
119 $params = ['parent' => $parent];
120 $params = array_merge($params, $optParams);
121 return $this->call('list', [$params], ListBackupsResponse::class);
122 }
123 /**
124 * Update backup with full spec. (backups.patch)
125 *
126 * @param string $name Identifier. The resource name of the backup. Format: `pro
127 * jects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backup
128 * s/{backup_id}`.
129 * @param Backup $postBody
130 * @param array $optParams Optional parameters.
131 *
132 * @opt_param string updateMask Required. Field mask is used to specify the
133 * fields to be overwritten in the Backup resource to be updated. The fields
134 * specified in the update_mask are relative to the resource, not the full
135 * request. A field will be overwritten if it is in the mask. If the user does
136 * not provide a mask then all fields will be overwritten.
137 * @return Operation
138 * @throws \Google\Service\Exception
139 */
140 public function patch($name, Backup $postBody, $optParams = [])
141 {
142 $params = ['name' => $name, 'postBody' => $postBody];
143 $params = array_merge($params, $optParams);
144 return $this->call('patch', [$params], Operation::class);
145 }
146}
147
148// Adding a class alias for backwards compatibility with the previous class name.
149class_alias(ProjectsLocationsBackupVaultsBackups::class, 'Google_Service_NetAppFiles_Resource_ProjectsLocationsBackupVaultsBackups');
Note: See TracBrowser for help on using the repository browser.