source: vendor/google/apiclient-services/src/CloudFilestore/Resource/ProjectsLocationsInstancesSnapshots.php

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

Upload project files

  • Property mode set to 100644
File size: 5.1 KB
RevLine 
[e3d4e0a]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\CloudFilestore\Resource;
19
20use Google\Service\CloudFilestore\ListSnapshotsResponse;
21use Google\Service\CloudFilestore\Operation;
22use Google\Service\CloudFilestore\Snapshot;
23
24/**
25 * The "snapshots" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $fileService = new Google\Service\CloudFilestore(...);
29 * $snapshots = $fileService->projects_locations_instances_snapshots;
30 * </code>
31 */
32class ProjectsLocationsInstancesSnapshots extends \Google\Service\Resource
33{
34 /**
35 * Creates a snapshot. (snapshots.create)
36 *
37 * @param string $parent Required. The Filestore Instance to create the
38 * snapshots of, in the format
39 * `projects/{project_id}/locations/{location}/instances/{instance_id}`
40 * @param Snapshot $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string snapshotId Required. The ID to use for the snapshot. The ID
44 * must be unique within the specified instance. This value must start with a
45 * lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens,
46 * and cannot end with a hyphen.
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 `proj
60 * ects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{sna
61 * pshot_id}`
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 * Gets the details of a specific snapshot. (snapshots.get)
74 *
75 * @param string $name Required. The snapshot resource name, in the format `proj
76 * ects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{sna
77 * pshot_id}`
78 * @param array $optParams Optional parameters.
79 * @return Snapshot
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], Snapshot::class);
87 }
88 /**
89 * Lists all snapshots in a project for either a specified location or for all
90 * locations. (snapshots.listProjectsLocationsInstancesSnapshots)
91 *
92 * @param string $parent Required. The instance for which to retrieve snapshot
93 * information, in the format
94 * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
95 * @param array $optParams Optional parameters.
96 *
97 * @opt_param string filter List filter.
98 * @opt_param string orderBy Sort results. Supported values are "name", "name
99 * desc" or "" (unsorted).
100 * @opt_param int pageSize The maximum number of items to return.
101 * @opt_param string pageToken The next_page_token value to use if there are
102 * additional results to retrieve for this list request.
103 * @return ListSnapshotsResponse
104 * @throws \Google\Service\Exception
105 */
106 public function listProjectsLocationsInstancesSnapshots($parent, $optParams = [])
107 {
108 $params = ['parent' => $parent];
109 $params = array_merge($params, $optParams);
110 return $this->call('list', [$params], ListSnapshotsResponse::class);
111 }
112 /**
113 * Updates the settings of a specific snapshot. (snapshots.patch)
114 *
115 * @param string $name Output only. The resource name of the snapshot, in the
116 * format `projects/{project_id}/locations/{location_id}/instances/{instance_id}
117 * /snapshots/{snapshot_id}`.
118 * @param Snapshot $postBody
119 * @param array $optParams Optional parameters.
120 *
121 * @opt_param string updateMask Required. Mask of fields to update. At least one
122 * path must be supplied in this field.
123 * @return Operation
124 * @throws \Google\Service\Exception
125 */
126 public function patch($name, Snapshot $postBody, $optParams = [])
127 {
128 $params = ['name' => $name, 'postBody' => $postBody];
129 $params = array_merge($params, $optParams);
130 return $this->call('patch', [$params], Operation::class);
131 }
132}
133
134// Adding a class alias for backwards compatibility with the previous class name.
135class_alias(ProjectsLocationsInstancesSnapshots::class, 'Google_Service_CloudFilestore_Resource_ProjectsLocationsInstancesSnapshots');
Note: See TracBrowser for help on using the repository browser.