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\CloudDataplex\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListZonesResponse;
|
---|
21 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1Zone;
|
---|
22 | use Google\Service\CloudDataplex\GoogleIamV1Policy;
|
---|
23 | use Google\Service\CloudDataplex\GoogleIamV1SetIamPolicyRequest;
|
---|
24 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsRequest;
|
---|
25 | use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsResponse;
|
---|
26 | use Google\Service\CloudDataplex\GoogleLongrunningOperation;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * The "zones" collection of methods.
|
---|
30 | * Typical usage is:
|
---|
31 | * <code>
|
---|
32 | * $dataplexService = new Google\Service\CloudDataplex(...);
|
---|
33 | * $zones = $dataplexService->projects_locations_lakes_zones;
|
---|
34 | * </code>
|
---|
35 | */
|
---|
36 | class ProjectsLocationsLakesZones extends \Google\Service\Resource
|
---|
37 | {
|
---|
38 | /**
|
---|
39 | * Creates a zone resource within a lake. (zones.create)
|
---|
40 | *
|
---|
41 | * @param string $parent Required. The resource name of the parent lake:
|
---|
42 | * projects/{project_number}/locations/{location_id}/lakes/{lake_id}.
|
---|
43 | * @param GoogleCloudDataplexV1Zone $postBody
|
---|
44 | * @param array $optParams Optional parameters.
|
---|
45 | *
|
---|
46 | * @opt_param bool validateOnly Optional. Only validate the request, but do not
|
---|
47 | * perform mutations. The default is false.
|
---|
48 | * @opt_param string zoneId Required. Zone identifier. This ID will be used to
|
---|
49 | * generate names such as database and dataset names when publishing metadata to
|
---|
50 | * Hive Metastore and BigQuery. * Must contain only lowercase letters, numbers
|
---|
51 | * and hyphens. * Must start with a letter. * Must end with a number or a
|
---|
52 | * letter. * Must be between 1-63 characters. * Must be unique across all lakes
|
---|
53 | * from all locations in a project. * Must not be one of the reserved IDs (i.e.
|
---|
54 | * "default", "global-temp")
|
---|
55 | * @return GoogleLongrunningOperation
|
---|
56 | * @throws \Google\Service\Exception
|
---|
57 | */
|
---|
58 | public function create($parent, GoogleCloudDataplexV1Zone $postBody, $optParams = [])
|
---|
59 | {
|
---|
60 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
61 | $params = array_merge($params, $optParams);
|
---|
62 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
63 | }
|
---|
64 | /**
|
---|
65 | * Deletes a zone resource. All assets within a zone must be deleted before the
|
---|
66 | * zone can be deleted. (zones.delete)
|
---|
67 | *
|
---|
68 | * @param string $name Required. The resource name of the zone: projects/{projec
|
---|
69 | * t_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | * @return GoogleLongrunningOperation
|
---|
72 | * @throws \Google\Service\Exception
|
---|
73 | */
|
---|
74 | public function delete($name, $optParams = [])
|
---|
75 | {
|
---|
76 | $params = ['name' => $name];
|
---|
77 | $params = array_merge($params, $optParams);
|
---|
78 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
79 | }
|
---|
80 | /**
|
---|
81 | * Retrieves a zone resource. (zones.get)
|
---|
82 | *
|
---|
83 | * @param string $name Required. The resource name of the zone: projects/{projec
|
---|
84 | * t_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.
|
---|
85 | * @param array $optParams Optional parameters.
|
---|
86 | * @return GoogleCloudDataplexV1Zone
|
---|
87 | * @throws \Google\Service\Exception
|
---|
88 | */
|
---|
89 | public function get($name, $optParams = [])
|
---|
90 | {
|
---|
91 | $params = ['name' => $name];
|
---|
92 | $params = array_merge($params, $optParams);
|
---|
93 | return $this->call('get', [$params], GoogleCloudDataplexV1Zone::class);
|
---|
94 | }
|
---|
95 | /**
|
---|
96 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
97 | * resource exists and does not have a policy set. (zones.getIamPolicy)
|
---|
98 | *
|
---|
99 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
100 | * requested. See Resource names
|
---|
101 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
102 | * value for this field.
|
---|
103 | * @param array $optParams Optional parameters.
|
---|
104 | *
|
---|
105 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
106 | * version that will be used to format the policy.Valid values are 0, 1, and 3.
|
---|
107 | * Requests specifying an invalid value will be rejected.Requests for policies
|
---|
108 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
109 | * conditional role bindings may specify any valid value or leave the field
|
---|
110 | * unset.The policy in the response might use the policy version that you
|
---|
111 | * specified, or it might use a lower policy version. For example, if you
|
---|
112 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
113 | * response uses version 1.To learn which resources support conditions in their
|
---|
114 | * IAM policies, see the IAM documentation
|
---|
115 | * (https://cloud.google.com/iam/help/conditions/resource-policies).
|
---|
116 | * @return GoogleIamV1Policy
|
---|
117 | * @throws \Google\Service\Exception
|
---|
118 | */
|
---|
119 | public function getIamPolicy($resource, $optParams = [])
|
---|
120 | {
|
---|
121 | $params = ['resource' => $resource];
|
---|
122 | $params = array_merge($params, $optParams);
|
---|
123 | return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
124 | }
|
---|
125 | /**
|
---|
126 | * Lists zone resources in a lake. (zones.listProjectsLocationsLakesZones)
|
---|
127 | *
|
---|
128 | * @param string $parent Required. The resource name of the parent lake:
|
---|
129 | * projects/{project_number}/locations/{location_id}/lakes/{lake_id}.
|
---|
130 | * @param array $optParams Optional parameters.
|
---|
131 | *
|
---|
132 | * @opt_param string filter Optional. Filter request.
|
---|
133 | * @opt_param string orderBy Optional. Order by fields for the result.
|
---|
134 | * @opt_param int pageSize Optional. Maximum number of zones to return. The
|
---|
135 | * service may return fewer than this value. If unspecified, at most 10 zones
|
---|
136 | * will be returned. The maximum value is 1000; values above 1000 will be
|
---|
137 | * coerced to 1000.
|
---|
138 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
139 | * ListZones call. Provide this to retrieve the subsequent page. When
|
---|
140 | * paginating, all other parameters provided to ListZones must match the call
|
---|
141 | * that provided the page token.
|
---|
142 | * @return GoogleCloudDataplexV1ListZonesResponse
|
---|
143 | * @throws \Google\Service\Exception
|
---|
144 | */
|
---|
145 | public function listProjectsLocationsLakesZones($parent, $optParams = [])
|
---|
146 | {
|
---|
147 | $params = ['parent' => $parent];
|
---|
148 | $params = array_merge($params, $optParams);
|
---|
149 | return $this->call('list', [$params], GoogleCloudDataplexV1ListZonesResponse::class);
|
---|
150 | }
|
---|
151 | /**
|
---|
152 | * Updates a zone resource. (zones.patch)
|
---|
153 | *
|
---|
154 | * @param string $name Output only. The relative resource name of the zone, of
|
---|
155 | * the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/z
|
---|
156 | * ones/{zone_id}.
|
---|
157 | * @param GoogleCloudDataplexV1Zone $postBody
|
---|
158 | * @param array $optParams Optional parameters.
|
---|
159 | *
|
---|
160 | * @opt_param string updateMask Required. Mask of fields to update.
|
---|
161 | * @opt_param bool validateOnly Optional. Only validate the request, but do not
|
---|
162 | * perform mutations. The default is false.
|
---|
163 | * @return GoogleLongrunningOperation
|
---|
164 | * @throws \Google\Service\Exception
|
---|
165 | */
|
---|
166 | public function patch($name, GoogleCloudDataplexV1Zone $postBody, $optParams = [])
|
---|
167 | {
|
---|
168 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
169 | $params = array_merge($params, $optParams);
|
---|
170 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
171 | }
|
---|
172 | /**
|
---|
173 | * Sets the access control policy on the specified resource. Replaces any
|
---|
174 | * existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
|
---|
175 | * errors. (zones.setIamPolicy)
|
---|
176 | *
|
---|
177 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
178 | * specified. See Resource names
|
---|
179 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
180 | * value for this field.
|
---|
181 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
182 | * @param array $optParams Optional parameters.
|
---|
183 | * @return GoogleIamV1Policy
|
---|
184 | * @throws \Google\Service\Exception
|
---|
185 | */
|
---|
186 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
187 | {
|
---|
188 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
189 | $params = array_merge($params, $optParams);
|
---|
190 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
191 | }
|
---|
192 | /**
|
---|
193 | * Returns permissions that a caller has on the specified resource. If the
|
---|
194 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
195 | * NOT_FOUND error.Note: This operation is designed to be used for building
|
---|
196 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
197 | * This operation may "fail open" without warning. (zones.testIamPermissions)
|
---|
198 | *
|
---|
199 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
200 | * being requested. See Resource names
|
---|
201 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
202 | * value for this field.
|
---|
203 | * @param GoogleIamV1TestIamPermissionsRequest $postBody
|
---|
204 | * @param array $optParams Optional parameters.
|
---|
205 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
206 | * @throws \Google\Service\Exception
|
---|
207 | */
|
---|
208 | public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
209 | {
|
---|
210 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
211 | $params = array_merge($params, $optParams);
|
---|
212 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
213 | }
|
---|
214 | }
|
---|
215 |
|
---|
216 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
217 | class_alias(ProjectsLocationsLakesZones::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsLakesZones');
|
---|