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 |
|
---|
18 | namespace Google\Service\BackupforGKE\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\BackupforGKE\ListVolumeBackupsResponse;
|
---|
21 | use Google\Service\BackupforGKE\Policy;
|
---|
22 | use Google\Service\BackupforGKE\SetIamPolicyRequest;
|
---|
23 | use Google\Service\BackupforGKE\TestIamPermissionsRequest;
|
---|
24 | use Google\Service\BackupforGKE\TestIamPermissionsResponse;
|
---|
25 | use Google\Service\BackupforGKE\VolumeBackup;
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * The "volumeBackups" collection of methods.
|
---|
29 | * Typical usage is:
|
---|
30 | * <code>
|
---|
31 | * $gkebackupService = new Google\Service\BackupforGKE(...);
|
---|
32 | * $volumeBackups = $gkebackupService->projects_locations_backupPlans_backups_volumeBackups;
|
---|
33 | * </code>
|
---|
34 | */
|
---|
35 | class ProjectsLocationsBackupPlansBackupsVolumeBackups extends \Google\Service\Resource
|
---|
36 | {
|
---|
37 | /**
|
---|
38 | * Retrieve the details of a single VolumeBackup. (volumeBackups.get)
|
---|
39 | *
|
---|
40 | * @param string $name Required. Full name of the VolumeBackup resource. Format:
|
---|
41 | * `projects/locations/backupPlans/backups/volumeBackups`
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | * @return VolumeBackup
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function get($name, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['name' => $name];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('get', [$params], VolumeBackup::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
54 | * resource exists and does not have a policy set. (volumeBackups.getIamPolicy)
|
---|
55 | *
|
---|
56 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
57 | * requested. See [Resource
|
---|
58 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
59 | * appropriate value for this field.
|
---|
60 | * @param array $optParams Optional parameters.
|
---|
61 | *
|
---|
62 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
63 | * version that will be used to format the policy. Valid values are 0, 1, and 3.
|
---|
64 | * Requests specifying an invalid value will be rejected. Requests for policies
|
---|
65 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
66 | * conditional role bindings may specify any valid value or leave the field
|
---|
67 | * unset. The policy in the response might use the policy version that you
|
---|
68 | * specified, or it might use a lower policy version. For example, if you
|
---|
69 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
70 | * response uses version 1. To learn which resources support conditions in their
|
---|
71 | * IAM policies, see the [IAM
|
---|
72 | * documentation](https://cloud.google.com/iam/help/conditions/resource-
|
---|
73 | * policies).
|
---|
74 | * @return Policy
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function getIamPolicy($resource, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['resource' => $resource];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Lists the VolumeBackups for a given Backup.
|
---|
85 | * (volumeBackups.listProjectsLocationsBackupPlansBackupsVolumeBackups)
|
---|
86 | *
|
---|
87 | * @param string $parent Required. The Backup that contains the VolumeBackups to
|
---|
88 | * list. Format: `projects/locations/backupPlans/backups`
|
---|
89 | * @param array $optParams Optional parameters.
|
---|
90 | *
|
---|
91 | * @opt_param string filter Optional. Field match expression used to filter the
|
---|
92 | * results.
|
---|
93 | * @opt_param string orderBy Optional. Field by which to sort the results.
|
---|
94 | * @opt_param int pageSize Optional. The target number of results to return in a
|
---|
95 | * single response. If not specified, a default value will be chosen by the
|
---|
96 | * service. Note that the response may include a partial list and a caller
|
---|
97 | * should only rely on the response's next_page_token to determine if there are
|
---|
98 | * more instances left to be queried.
|
---|
99 | * @opt_param string pageToken Optional. The value of next_page_token received
|
---|
100 | * from a previous `ListVolumeBackups` call. Provide this to retrieve the
|
---|
101 | * subsequent page in a multi-page list of results. When paginating, all other
|
---|
102 | * parameters provided to `ListVolumeBackups` must match the call that provided
|
---|
103 | * the page token.
|
---|
104 | * @return ListVolumeBackupsResponse
|
---|
105 | * @throws \Google\Service\Exception
|
---|
106 | */
|
---|
107 | public function listProjectsLocationsBackupPlansBackupsVolumeBackups($parent, $optParams = [])
|
---|
108 | {
|
---|
109 | $params = ['parent' => $parent];
|
---|
110 | $params = array_merge($params, $optParams);
|
---|
111 | return $this->call('list', [$params], ListVolumeBackupsResponse::class);
|
---|
112 | }
|
---|
113 | /**
|
---|
114 | * Sets the access control policy on the specified resource. Replaces any
|
---|
115 | * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
|
---|
116 | * `PERMISSION_DENIED` errors. (volumeBackups.setIamPolicy)
|
---|
117 | *
|
---|
118 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
119 | * specified. See [Resource
|
---|
120 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
121 | * appropriate value for this field.
|
---|
122 | * @param SetIamPolicyRequest $postBody
|
---|
123 | * @param array $optParams Optional parameters.
|
---|
124 | * @return Policy
|
---|
125 | * @throws \Google\Service\Exception
|
---|
126 | */
|
---|
127 | public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
|
---|
128 | {
|
---|
129 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
130 | $params = array_merge($params, $optParams);
|
---|
131 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
132 | }
|
---|
133 | /**
|
---|
134 | * Returns permissions that a caller has on the specified resource. If the
|
---|
135 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
136 | * `NOT_FOUND` error. Note: This operation is designed to be used for building
|
---|
137 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
138 | * This operation may "fail open" without warning.
|
---|
139 | * (volumeBackups.testIamPermissions)
|
---|
140 | *
|
---|
141 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
142 | * being requested. See [Resource
|
---|
143 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
144 | * appropriate value for this field.
|
---|
145 | * @param TestIamPermissionsRequest $postBody
|
---|
146 | * @param array $optParams Optional parameters.
|
---|
147 | * @return TestIamPermissionsResponse
|
---|
148 | * @throws \Google\Service\Exception
|
---|
149 | */
|
---|
150 | public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
151 | {
|
---|
152 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
153 | $params = array_merge($params, $optParams);
|
---|
154 | return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
|
---|
155 | }
|
---|
156 | }
|
---|
157 |
|
---|
158 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
159 | class_alias(ProjectsLocationsBackupPlansBackupsVolumeBackups::class, 'Google_Service_BackupforGKE_Resource_ProjectsLocationsBackupPlansBackupsVolumeBackups');
|
---|