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\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\Backup;
|
---|
21 | use Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\ListBackupsResponse;
|
---|
22 | use Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\Operation;
|
---|
23 | use Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\Policy;
|
---|
24 | use Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\SetIamPolicyRequest;
|
---|
25 | use Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\TestIamPermissionsRequest;
|
---|
26 | use Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI\TestIamPermissionsResponse;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * The "backups" collection of methods.
|
---|
30 | * Typical usage is:
|
---|
31 | * <code>
|
---|
32 | * $managedidentitiesService = new Google\Service\ManagedServiceforMicrosoftActiveDirectoryConsumerAPI(...);
|
---|
33 | * $backups = $managedidentitiesService->projects_locations_global_domains_backups;
|
---|
34 | * </code>
|
---|
35 | */
|
---|
36 | class ProjectsLocationsManagedidentitiesGlobalDomainsBackups extends \Google\Service\Resource
|
---|
37 | {
|
---|
38 | /**
|
---|
39 | * Creates a Backup for a domain. (backups.create)
|
---|
40 | *
|
---|
41 | * @param string $parent Required. The domain resource name using the form:
|
---|
42 | * `projects/{project_id}/locations/global/domains/{domain_name}`
|
---|
43 | * @param Backup $postBody
|
---|
44 | * @param array $optParams Optional parameters.
|
---|
45 | *
|
---|
46 | * @opt_param string backupId Required. Backup Id, unique name to identify the
|
---|
47 | * backups with the following restrictions: * Must be lowercase letters,
|
---|
48 | * numbers, and hyphens * Must start with a letter. * Must contain between 1-63
|
---|
49 | * characters. * Must end with a number or a letter. * Must be unique within the
|
---|
50 | * domain.
|
---|
51 | * @return Operation
|
---|
52 | * @throws \Google\Service\Exception
|
---|
53 | */
|
---|
54 | public function create($parent, Backup $postBody, $optParams = [])
|
---|
55 | {
|
---|
56 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
57 | $params = array_merge($params, $optParams);
|
---|
58 | return $this->call('create', [$params], Operation::class);
|
---|
59 | }
|
---|
60 | /**
|
---|
61 | * Deletes identified Backup. (backups.delete)
|
---|
62 | *
|
---|
63 | * @param string $name Required. The backup resource name using the form: `proje
|
---|
64 | * cts/{project_id}/locations/global/domains/{domain_name}/backups/{backup_id}`
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | * @return Operation
|
---|
67 | * @throws \Google\Service\Exception
|
---|
68 | */
|
---|
69 | public function delete($name, $optParams = [])
|
---|
70 | {
|
---|
71 | $params = ['name' => $name];
|
---|
72 | $params = array_merge($params, $optParams);
|
---|
73 | return $this->call('delete', [$params], Operation::class);
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * Gets details of a single Backup. (backups.get)
|
---|
77 | *
|
---|
78 | * @param string $name Required. The backup resource name using the form: `proje
|
---|
79 | * cts/{project_id}/locations/global/domains/{domain_name}/backups/{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 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
92 | * resource exists and does not have a policy set. (backups.getIamPolicy)
|
---|
93 | *
|
---|
94 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
95 | * requested. See [Resource
|
---|
96 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
97 | * appropriate value for this field.
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | *
|
---|
100 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
101 | * version that will be used to format the policy. Valid values are 0, 1, and 3.
|
---|
102 | * Requests specifying an invalid value will be rejected. Requests for policies
|
---|
103 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
104 | * conditional role bindings may specify any valid value or leave the field
|
---|
105 | * unset. The policy in the response might use the policy version that you
|
---|
106 | * specified, or it might use a lower policy version. For example, if you
|
---|
107 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
108 | * response uses version 1. To learn which resources support conditions in their
|
---|
109 | * IAM policies, see the [IAM
|
---|
110 | * documentation](https://cloud.google.com/iam/help/conditions/resource-
|
---|
111 | * policies).
|
---|
112 | * @return Policy
|
---|
113 | * @throws \Google\Service\Exception
|
---|
114 | */
|
---|
115 | public function getIamPolicy($resource, $optParams = [])
|
---|
116 | {
|
---|
117 | $params = ['resource' => $resource];
|
---|
118 | $params = array_merge($params, $optParams);
|
---|
119 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
120 | }
|
---|
121 | /**
|
---|
122 | * Lists Backup in a given project.
|
---|
123 | * (backups.listProjectsLocationsManagedidentitiesGlobalDomainsBackups)
|
---|
124 | *
|
---|
125 | * @param string $parent Required. The domain resource name using the form:
|
---|
126 | * `projects/{project_id}/locations/global/domains/{domain_name}`
|
---|
127 | * @param array $optParams Optional parameters.
|
---|
128 | *
|
---|
129 | * @opt_param string filter Optional. Filter specifying constraints of a list
|
---|
130 | * operation.
|
---|
131 | * @opt_param string orderBy Optional. Specifies the ordering of results
|
---|
132 | * following syntax at
|
---|
133 | * https://cloud.google.com/apis/design/design_patterns#sorting_order.
|
---|
134 | * @opt_param int pageSize Optional. The maximum number of items to return. If
|
---|
135 | * not specified, a default value of 1000 will be used by the service.
|
---|
136 | * Regardless of the page_size value, the response may include a partial list
|
---|
137 | * and a caller should only rely on response's next_page_token to determine if
|
---|
138 | * there are more instances left to be queried.
|
---|
139 | * @opt_param string pageToken Optional. The `next_page_token` value returned
|
---|
140 | * from a previous List request, if any.
|
---|
141 | * @return ListBackupsResponse
|
---|
142 | * @throws \Google\Service\Exception
|
---|
143 | */
|
---|
144 | public function listProjectsLocationsManagedidentitiesGlobalDomainsBackups($parent, $optParams = [])
|
---|
145 | {
|
---|
146 | $params = ['parent' => $parent];
|
---|
147 | $params = array_merge($params, $optParams);
|
---|
148 | return $this->call('list', [$params], ListBackupsResponse::class);
|
---|
149 | }
|
---|
150 | /**
|
---|
151 | * Updates the labels for specified Backup. (backups.patch)
|
---|
152 | *
|
---|
153 | * @param string $name Output only. The unique name of the Backup in the form of
|
---|
154 | * `projects/{project_id}/locations/global/domains/{domain_name}/backups/{name}`
|
---|
155 | * @param Backup $postBody
|
---|
156 | * @param array $optParams Optional parameters.
|
---|
157 | *
|
---|
158 | * @opt_param string updateMask Required. Mask of fields to update. At least one
|
---|
159 | * path must be supplied in this field. The elements of the repeated paths field
|
---|
160 | * may only include these fields from Backup: * `labels`
|
---|
161 | * @return Operation
|
---|
162 | * @throws \Google\Service\Exception
|
---|
163 | */
|
---|
164 | public function patch($name, Backup $postBody, $optParams = [])
|
---|
165 | {
|
---|
166 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
167 | $params = array_merge($params, $optParams);
|
---|
168 | return $this->call('patch', [$params], Operation::class);
|
---|
169 | }
|
---|
170 | /**
|
---|
171 | * Sets the access control policy on the specified resource. Replaces any
|
---|
172 | * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
|
---|
173 | * `PERMISSION_DENIED` errors. (backups.setIamPolicy)
|
---|
174 | *
|
---|
175 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
176 | * specified. See [Resource
|
---|
177 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
178 | * appropriate value for this field.
|
---|
179 | * @param SetIamPolicyRequest $postBody
|
---|
180 | * @param array $optParams Optional parameters.
|
---|
181 | * @return Policy
|
---|
182 | * @throws \Google\Service\Exception
|
---|
183 | */
|
---|
184 | public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
|
---|
185 | {
|
---|
186 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
187 | $params = array_merge($params, $optParams);
|
---|
188 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
189 | }
|
---|
190 | /**
|
---|
191 | * Returns permissions that a caller has on the specified resource. If the
|
---|
192 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
193 | * `NOT_FOUND` error. Note: This operation is designed to be used for building
|
---|
194 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
195 | * This operation may "fail open" without warning. (backups.testIamPermissions)
|
---|
196 | *
|
---|
197 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
198 | * being requested. See [Resource
|
---|
199 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
200 | * appropriate value for this field.
|
---|
201 | * @param TestIamPermissionsRequest $postBody
|
---|
202 | * @param array $optParams Optional parameters.
|
---|
203 | * @return TestIamPermissionsResponse
|
---|
204 | * @throws \Google\Service\Exception
|
---|
205 | */
|
---|
206 | public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
207 | {
|
---|
208 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
209 | $params = array_merge($params, $optParams);
|
---|
210 | return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
|
---|
211 | }
|
---|
212 | }
|
---|
213 |
|
---|
214 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
215 | class_alias(ProjectsLocationsManagedidentitiesGlobalDomainsBackups::class, 'Google_Service_ManagedServiceforMicrosoftActiveDirectoryConsumerAPI_Resource_ProjectsLocationsManagedidentitiesGlobalDomainsBackups');
|
---|