source: vendor/google/apiclient-services/src/NetAppFiles/Resource/ProjectsLocationsVolumesSnapshots.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.0 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\ListSnapshotsResponse;
21use Google\Service\NetAppFiles\Operation;
22use Google\Service\NetAppFiles\Snapshot;
23
24/**
25 * The "snapshots" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $netappService = new Google\Service\NetAppFiles(...);
29 * $snapshots = $netappService->projects_locations_volumes_snapshots;
30 * </code>
31 */
32class ProjectsLocationsVolumesSnapshots extends \Google\Service\Resource
33{
34 /**
35 * Create a new snapshot for a volume. (snapshots.create)
36 *
37 * @param string $parent Required. The NetApp volume to create the snapshots of,
38 * in the format
39 * `projects/{project_id}/locations/{location}/volumes/{volume_id}`
40 * @param Snapshot $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string snapshotId Required. ID of the snapshot to create. Must be
44 * unique within the parent resource. Must contain only letters, numbers and
45 * hyphen, with the first character a letter, the last a letter or a number, and
46 * a 63 character maximum.
47 * @return Operation
48 * @throws \Google\Service\Exception
49 */
50 public function create($parent, Snapshot $postBody, $optParams = [])
51 {
52 $params = ['parent' => $parent, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('create', [$params], Operation::class);
55 }
56 /**
57 * Deletes a snapshot. (snapshots.delete)
58 *
59 * @param string $name Required. The snapshot resource name, in the format
60 * `projects/locations/volumes/snapshots/{snapshot_id}`
61 * @param array $optParams Optional parameters.
62 * @return Operation
63 * @throws \Google\Service\Exception
64 */
65 public function delete($name, $optParams = [])
66 {
67 $params = ['name' => $name];
68 $params = array_merge($params, $optParams);
69 return $this->call('delete', [$params], Operation::class);
70 }
71 /**
72 * Describe a snapshot for a volume. (snapshots.get)
73 *
74 * @param string $name Required. The snapshot resource name, in the format `proj
75 * ects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapsho
76 * t_id}`
77 * @param array $optParams Optional parameters.
78 * @return Snapshot
79 * @throws \Google\Service\Exception
80 */
81 public function get($name, $optParams = [])
82 {
83 $params = ['name' => $name];
84 $params = array_merge($params, $optParams);
85 return $this->call('get', [$params], Snapshot::class);
86 }
87 /**
88 * Returns descriptions of all snapshots for a volume.
89 * (snapshots.listProjectsLocationsVolumesSnapshots)
90 *
91 * @param string $parent Required. The volume for which to retrieve snapshot
92 * information, in the format
93 * `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
94 * @param array $optParams Optional parameters.
95 *
96 * @opt_param string filter List filter.
97 * @opt_param string orderBy Sort results. Supported values are "name", "name
98 * desc" or "" (unsorted).
99 * @opt_param int pageSize The maximum number of items to return.
100 * @opt_param string pageToken The next_page_token value to use if there are
101 * additional results to retrieve for this list request.
102 * @return ListSnapshotsResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listProjectsLocationsVolumesSnapshots($parent, $optParams = [])
106 {
107 $params = ['parent' => $parent];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], ListSnapshotsResponse::class);
110 }
111 /**
112 * Updates the settings of a specific snapshot. (snapshots.patch)
113 *
114 * @param string $name Identifier. The resource name of the snapshot. Format: `p
115 * rojects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snap
116 * shot_id}`.
117 * @param Snapshot $postBody
118 * @param array $optParams Optional parameters.
119 *
120 * @opt_param string updateMask Required. Mask of fields to update. At least one
121 * path must be supplied in this field.
122 * @return Operation
123 * @throws \Google\Service\Exception
124 */
125 public function patch($name, Snapshot $postBody, $optParams = [])
126 {
127 $params = ['name' => $name, 'postBody' => $postBody];
128 $params = array_merge($params, $optParams);
129 return $this->call('patch', [$params], Operation::class);
130 }
131}
132
133// Adding a class alias for backwards compatibility with the previous class name.
134class_alias(ProjectsLocationsVolumesSnapshots::class, 'Google_Service_NetAppFiles_Resource_ProjectsLocationsVolumesSnapshots');
Note: See TracBrowser for help on using the repository browser.