source: vendor/google/apiclient-services/src/NetAppFiles/Resource/ProjectsLocationsBackupPolicies.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: 5.3 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\BackupPolicy;
21use Google\Service\NetAppFiles\ListBackupPoliciesResponse;
22use Google\Service\NetAppFiles\Operation;
23
24/**
25 * The "backupPolicies" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $netappService = new Google\Service\NetAppFiles(...);
29 * $backupPolicies = $netappService->projects_locations_backupPolicies;
30 * </code>
31 */
32class ProjectsLocationsBackupPolicies extends \Google\Service\Resource
33{
34 /**
35 * Creates new backup policy (backupPolicies.create)
36 *
37 * @param string $parent Required. The location to create the backup policies
38 * of, in the format `projects/{project_id}/locations/{location}`
39 * @param BackupPolicy $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string backupPolicyId Required. The ID to use for the backup
43 * policy. The ID must be unique within the specified location. Must contain
44 * only letters, numbers and hyphen, with the first character a letter, the last
45 * a letter or a number, and a 63 character maximum.
46 * @return Operation
47 * @throws \Google\Service\Exception
48 */
49 public function create($parent, BackupPolicy $postBody, $optParams = [])
50 {
51 $params = ['parent' => $parent, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('create', [$params], Operation::class);
54 }
55 /**
56 * Warning! This operation will permanently delete the backup policy.
57 * (backupPolicies.delete)
58 *
59 * @param string $name Required. The backup policy resource name, in the format
60 * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}
61 * `
62 * @param array $optParams Optional parameters.
63 * @return Operation
64 * @throws \Google\Service\Exception
65 */
66 public function delete($name, $optParams = [])
67 {
68 $params = ['name' => $name];
69 $params = array_merge($params, $optParams);
70 return $this->call('delete', [$params], Operation::class);
71 }
72 /**
73 * Returns the description of the specified backup policy by backup_policy_id.
74 * (backupPolicies.get)
75 *
76 * @param string $name Required. The backupPolicy resource name, in the format `
77 * projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
78 * @param array $optParams Optional parameters.
79 * @return BackupPolicy
80 * @throws \Google\Service\Exception
81 */
82 public function get($name, $optParams = [])
83 {
84 $params = ['name' => $name];
85 $params = array_merge($params, $optParams);
86 return $this->call('get', [$params], BackupPolicy::class);
87 }
88 /**
89 * Returns list of all available backup policies.
90 * (backupPolicies.listProjectsLocationsBackupPolicies)
91 *
92 * @param string $parent Required. Parent value for ListBackupPoliciesRequest
93 * @param array $optParams Optional parameters.
94 *
95 * @opt_param string filter Filtering results
96 * @opt_param string orderBy Hint for how to order the results
97 * @opt_param int pageSize Requested page size. Server may return fewer items
98 * than requested. If unspecified, the server will pick an appropriate default.
99 * @opt_param string pageToken A token identifying a page of results the server
100 * should return.
101 * @return ListBackupPoliciesResponse
102 * @throws \Google\Service\Exception
103 */
104 public function listProjectsLocationsBackupPolicies($parent, $optParams = [])
105 {
106 $params = ['parent' => $parent];
107 $params = array_merge($params, $optParams);
108 return $this->call('list', [$params], ListBackupPoliciesResponse::class);
109 }
110 /**
111 * Updates settings of a specific backup policy. (backupPolicies.patch)
112 *
113 * @param string $name Identifier. The resource name of the backup policy.
114 * Format: `projects/{project_id}/locations/{location}/backupPolicies/{backup_po
115 * licy_id}`.
116 * @param BackupPolicy $postBody
117 * @param array $optParams Optional parameters.
118 *
119 * @opt_param string updateMask Required. Field mask is used to specify the
120 * fields to be overwritten in the Backup Policy resource by the update. The
121 * fields specified in the update_mask are relative to the resource, not the
122 * full request. A field will be overwritten if it is in the mask. If the user
123 * does not provide a mask then all fields will be overwritten.
124 * @return Operation
125 * @throws \Google\Service\Exception
126 */
127 public function patch($name, BackupPolicy $postBody, $optParams = [])
128 {
129 $params = ['name' => $name, 'postBody' => $postBody];
130 $params = array_merge($params, $optParams);
131 return $this->call('patch', [$params], Operation::class);
132 }
133}
134
135// Adding a class alias for backwards compatibility with the previous class name.
136class_alias(ProjectsLocationsBackupPolicies::class, 'Google_Service_NetAppFiles_Resource_ProjectsLocationsBackupPolicies');
Note: See TracBrowser for help on using the repository browser.