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