source: vendor/google/apiclient-services/src/DataprocMetastore/Resource/ProjectsLocationsFederations.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: 11.8 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\DataprocMetastore\Resource;
19
20use Google\Service\DataprocMetastore\Federation;
21use Google\Service\DataprocMetastore\ListFederationsResponse;
22use Google\Service\DataprocMetastore\Operation;
23use Google\Service\DataprocMetastore\Policy;
24use Google\Service\DataprocMetastore\SetIamPolicyRequest;
25use Google\Service\DataprocMetastore\TestIamPermissionsRequest;
26use Google\Service\DataprocMetastore\TestIamPermissionsResponse;
27
28/**
29 * The "federations" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $metastoreService = new Google\Service\DataprocMetastore(...);
33 * $federations = $metastoreService->projects_locations_federations;
34 * </code>
35 */
36class ProjectsLocationsFederations extends \Google\Service\Resource
37{
38 /**
39 * Creates a metastore federation in a project and location.
40 * (federations.create)
41 *
42 * @param string $parent Required. The relative resource name of the location in
43 * which to create a federation service, in the following
44 * form:projects/{project_number}/locations/{location_id}.
45 * @param Federation $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param string federationId Required. The ID of the metastore federation,
49 * which is used as the final component of the metastore federation's name.This
50 * value must be between 2 and 63 characters long inclusive, begin with a
51 * letter, end with a letter or number, and consist of alpha-numeric ASCII
52 * characters or hyphens.
53 * @opt_param string requestId Optional. A request ID. Specify a unique request
54 * ID to allow the server to ignore the request if it has completed. The server
55 * will ignore subsequent requests that provide a duplicate request ID for at
56 * least 60 minutes after the first request.For example, if an initial request
57 * times out, followed by another request with the same request ID, the server
58 * ignores the second request to prevent the creation of duplicate
59 * commitments.The request ID must be a valid UUID
60 * (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
61 * UUID (00000000-0000-0000-0000-000000000000) is not supported.
62 * @return Operation
63 * @throws \Google\Service\Exception
64 */
65 public function create($parent, Federation $postBody, $optParams = [])
66 {
67 $params = ['parent' => $parent, 'postBody' => $postBody];
68 $params = array_merge($params, $optParams);
69 return $this->call('create', [$params], Operation::class);
70 }
71 /**
72 * Deletes a single federation. (federations.delete)
73 *
74 * @param string $name Required. The relative resource name of the metastore
75 * federation to delete, in the following form:projects/{project_number}/locatio
76 * ns/{location_id}/federations/{federation_id}.
77 * @param array $optParams Optional parameters.
78 *
79 * @opt_param string requestId Optional. A request ID. Specify a unique request
80 * ID to allow the server to ignore the request if it has completed. The server
81 * will ignore subsequent requests that provide a duplicate request ID for at
82 * least 60 minutes after the first request.For example, if an initial request
83 * times out, followed by another request with the same request ID, the server
84 * ignores the second request to prevent the creation of duplicate
85 * commitments.The request ID must be a valid UUID
86 * (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
87 * UUID (00000000-0000-0000-0000-000000000000) is not supported.
88 * @return Operation
89 * @throws \Google\Service\Exception
90 */
91 public function delete($name, $optParams = [])
92 {
93 $params = ['name' => $name];
94 $params = array_merge($params, $optParams);
95 return $this->call('delete', [$params], Operation::class);
96 }
97 /**
98 * Gets the details of a single federation. (federations.get)
99 *
100 * @param string $name Required. The relative resource name of the metastore
101 * federation to retrieve, in the following form:projects/{project_number}/locat
102 * ions/{location_id}/federations/{federation_id}.
103 * @param array $optParams Optional parameters.
104 * @return Federation
105 * @throws \Google\Service\Exception
106 */
107 public function get($name, $optParams = [])
108 {
109 $params = ['name' => $name];
110 $params = array_merge($params, $optParams);
111 return $this->call('get', [$params], Federation::class);
112 }
113 /**
114 * Gets the access control policy for a resource. Returns an empty policy if the
115 * resource exists and does not have a policy set. (federations.getIamPolicy)
116 *
117 * @param string $resource REQUIRED: The resource for which the policy is being
118 * requested. See Resource names
119 * (https://cloud.google.com/apis/design/resource_names) for the appropriate
120 * value for this field.
121 * @param array $optParams Optional parameters.
122 *
123 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
124 * version that will be used to format the policy.Valid values are 0, 1, and 3.
125 * Requests specifying an invalid value will be rejected.Requests for policies
126 * with any conditional role bindings must specify version 3. Policies with no
127 * conditional role bindings may specify any valid value or leave the field
128 * unset.The policy in the response might use the policy version that you
129 * specified, or it might use a lower policy version. For example, if you
130 * specify version 3, but the policy has no conditional role bindings, the
131 * response uses version 1.To learn which resources support conditions in their
132 * IAM policies, see the IAM documentation
133 * (https://cloud.google.com/iam/help/conditions/resource-policies).
134 * @return Policy
135 * @throws \Google\Service\Exception
136 */
137 public function getIamPolicy($resource, $optParams = [])
138 {
139 $params = ['resource' => $resource];
140 $params = array_merge($params, $optParams);
141 return $this->call('getIamPolicy', [$params], Policy::class);
142 }
143 /**
144 * Lists federations in a project and location.
145 * (federations.listProjectsLocationsFederations)
146 *
147 * @param string $parent Required. The relative resource name of the location of
148 * metastore federations to list, in the following form:
149 * projects/{project_number}/locations/{location_id}.
150 * @param array $optParams Optional parameters.
151 *
152 * @opt_param string filter Optional. The filter to apply to list results.
153 * @opt_param string orderBy Optional. Specify the ordering of results as
154 * described in Sorting Order
155 * (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
156 * specified, the results will be sorted in the default order.
157 * @opt_param int pageSize Optional. The maximum number of federations to
158 * return. The response may contain less than the maximum number. If
159 * unspecified, no more than 500 services are returned. The maximum value is
160 * 1000; values above 1000 are changed to 1000.
161 * @opt_param string pageToken Optional. A page token, received from a previous
162 * ListFederationServices call. Provide this token to retrieve the subsequent
163 * page.To retrieve the first page, supply an empty page token.When paginating,
164 * other parameters provided to ListFederationServices must match the call that
165 * provided the page token.
166 * @return ListFederationsResponse
167 * @throws \Google\Service\Exception
168 */
169 public function listProjectsLocationsFederations($parent, $optParams = [])
170 {
171 $params = ['parent' => $parent];
172 $params = array_merge($params, $optParams);
173 return $this->call('list', [$params], ListFederationsResponse::class);
174 }
175 /**
176 * Updates the fields of a federation. (federations.patch)
177 *
178 * @param string $name Immutable. The relative resource name of the federation,
179 * of the form: projects/{project_number}/locations/{location_id}/federations/{f
180 * ederation_id}`.
181 * @param Federation $postBody
182 * @param array $optParams Optional parameters.
183 *
184 * @opt_param string requestId Optional. A request ID. Specify a unique request
185 * ID to allow the server to ignore the request if it has completed. The server
186 * will ignore subsequent requests that provide a duplicate request ID for at
187 * least 60 minutes after the first request.For example, if an initial request
188 * times out, followed by another request with the same request ID, the server
189 * ignores the second request to prevent the creation of duplicate
190 * commitments.The request ID must be a valid UUID
191 * (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
192 * UUID (00000000-0000-0000-0000-000000000000) is not supported.
193 * @opt_param string updateMask Required. A field mask used to specify the
194 * fields to be overwritten in the metastore federation resource by the update.
195 * Fields specified in the update_mask are relative to the resource (not to the
196 * full request). A field is overwritten if it is in the mask.
197 * @return Operation
198 * @throws \Google\Service\Exception
199 */
200 public function patch($name, Federation $postBody, $optParams = [])
201 {
202 $params = ['name' => $name, 'postBody' => $postBody];
203 $params = array_merge($params, $optParams);
204 return $this->call('patch', [$params], Operation::class);
205 }
206 /**
207 * Sets the access control policy on the specified resource. Replaces any
208 * existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
209 * errors. (federations.setIamPolicy)
210 *
211 * @param string $resource REQUIRED: The resource for which the policy is being
212 * specified. See Resource names
213 * (https://cloud.google.com/apis/design/resource_names) for the appropriate
214 * value for this field.
215 * @param SetIamPolicyRequest $postBody
216 * @param array $optParams Optional parameters.
217 * @return Policy
218 * @throws \Google\Service\Exception
219 */
220 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
221 {
222 $params = ['resource' => $resource, 'postBody' => $postBody];
223 $params = array_merge($params, $optParams);
224 return $this->call('setIamPolicy', [$params], Policy::class);
225 }
226 /**
227 * Returns permissions that a caller has on the specified resource. If the
228 * resource does not exist, this will return an empty set of permissions, not a
229 * NOT_FOUND error.Note: This operation is designed to be used for building
230 * permission-aware UIs and command-line tools, not for authorization checking.
231 * This operation may "fail open" without warning.
232 * (federations.testIamPermissions)
233 *
234 * @param string $resource REQUIRED: The resource for which the policy detail is
235 * being requested. See Resource names
236 * (https://cloud.google.com/apis/design/resource_names) for the appropriate
237 * value for this field.
238 * @param TestIamPermissionsRequest $postBody
239 * @param array $optParams Optional parameters.
240 * @return TestIamPermissionsResponse
241 * @throws \Google\Service\Exception
242 */
243 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
244 {
245 $params = ['resource' => $resource, 'postBody' => $postBody];
246 $params = array_merge($params, $optParams);
247 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
248 }
249}
250
251// Adding a class alias for backwards compatibility with the previous class name.
252class_alias(ProjectsLocationsFederations::class, 'Google_Service_DataprocMetastore_Resource_ProjectsLocationsFederations');
Note: See TracBrowser for help on using the repository browser.