source: vendor/google/apiclient-services/src/DataCatalog/Resource/ProjectsLocationsTaxonomies.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 6 weeks ago

Upload project files

  • Property mode set to 100644
File size: 11.4 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\DataCatalog\Resource;
19
20use Google\Service\DataCatalog\DatacatalogEmpty;
21use Google\Service\DataCatalog\GetIamPolicyRequest;
22use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ExportTaxonomiesResponse;
23use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ImportTaxonomiesRequest;
24use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ImportTaxonomiesResponse;
25use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ListTaxonomiesResponse;
26use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ReplaceTaxonomyRequest;
27use Google\Service\DataCatalog\GoogleCloudDatacatalogV1Taxonomy;
28use Google\Service\DataCatalog\Policy;
29use Google\Service\DataCatalog\SetIamPolicyRequest;
30use Google\Service\DataCatalog\TestIamPermissionsRequest;
31use Google\Service\DataCatalog\TestIamPermissionsResponse;
32
33/**
34 * The "taxonomies" collection of methods.
35 * Typical usage is:
36 * <code>
37 * $datacatalogService = new Google\Service\DataCatalog(...);
38 * $taxonomies = $datacatalogService->projects_locations_taxonomies;
39 * </code>
40 */
41class ProjectsLocationsTaxonomies extends \Google\Service\Resource
42{
43 /**
44 * Creates a taxonomy in a specified project. The taxonomy is initially empty,
45 * that is, it doesn't contain policy tags. (taxonomies.create)
46 *
47 * @param string $parent Required. Resource name of the project that the
48 * taxonomy will belong to.
49 * @param GoogleCloudDatacatalogV1Taxonomy $postBody
50 * @param array $optParams Optional parameters.
51 * @return GoogleCloudDatacatalogV1Taxonomy
52 * @throws \Google\Service\Exception
53 */
54 public function create($parent, GoogleCloudDatacatalogV1Taxonomy $postBody, $optParams = [])
55 {
56 $params = ['parent' => $parent, 'postBody' => $postBody];
57 $params = array_merge($params, $optParams);
58 return $this->call('create', [$params], GoogleCloudDatacatalogV1Taxonomy::class);
59 }
60 /**
61 * Deletes a taxonomy, including all policy tags in this taxonomy, their
62 * associated policies, and the policy tags references from BigQuery columns.
63 * (taxonomies.delete)
64 *
65 * @param string $name Required. Resource name of the taxonomy to delete. Note:
66 * All policy tags in this taxonomy are also deleted.
67 * @param array $optParams Optional parameters.
68 * @return DatacatalogEmpty
69 * @throws \Google\Service\Exception
70 */
71 public function delete($name, $optParams = [])
72 {
73 $params = ['name' => $name];
74 $params = array_merge($params, $optParams);
75 return $this->call('delete', [$params], DatacatalogEmpty::class);
76 }
77 /**
78 * Exports taxonomies in the requested type and returns them, including their
79 * policy tags. The requested taxonomies must belong to the same project. This
80 * method generates `SerializedTaxonomy` protocol buffers with nested policy
81 * tags that can be used as input for `ImportTaxonomies` calls.
82 * (taxonomies.export)
83 *
84 * @param string $parent Required. Resource name of the project that the
85 * exported taxonomies belong to.
86 * @param array $optParams Optional parameters.
87 *
88 * @opt_param bool serializedTaxonomies Serialized export taxonomies that
89 * contain all the policy tags as nested protocol buffers.
90 * @opt_param string taxonomies Required. Resource names of the taxonomies to
91 * export.
92 * @return GoogleCloudDatacatalogV1ExportTaxonomiesResponse
93 * @throws \Google\Service\Exception
94 */
95 public function export($parent, $optParams = [])
96 {
97 $params = ['parent' => $parent];
98 $params = array_merge($params, $optParams);
99 return $this->call('export', [$params], GoogleCloudDatacatalogV1ExportTaxonomiesResponse::class);
100 }
101 /**
102 * Gets a taxonomy. (taxonomies.get)
103 *
104 * @param string $name Required. Resource name of the taxonomy to get.
105 * @param array $optParams Optional parameters.
106 * @return GoogleCloudDatacatalogV1Taxonomy
107 * @throws \Google\Service\Exception
108 */
109 public function get($name, $optParams = [])
110 {
111 $params = ['name' => $name];
112 $params = array_merge($params, $optParams);
113 return $this->call('get', [$params], GoogleCloudDatacatalogV1Taxonomy::class);
114 }
115 /**
116 * Gets the IAM policy for a policy tag or a taxonomy. (taxonomies.getIamPolicy)
117 *
118 * @param string $resource REQUIRED: The resource for which the policy is being
119 * requested. See [Resource
120 * names](https://cloud.google.com/apis/design/resource_names) for the
121 * appropriate value for this field.
122 * @param GetIamPolicyRequest $postBody
123 * @param array $optParams Optional parameters.
124 * @return Policy
125 * @throws \Google\Service\Exception
126 */
127 public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
128 {
129 $params = ['resource' => $resource, 'postBody' => $postBody];
130 $params = array_merge($params, $optParams);
131 return $this->call('getIamPolicy', [$params], Policy::class);
132 }
133 /**
134 * Creates new taxonomies (including their policy tags) in a given project by
135 * importing from inlined or cross-regional sources. For a cross-regional
136 * source, new taxonomies are created by copying from a source in another
137 * region. For an inlined source, taxonomies and policy tags are created in bulk
138 * using nested protocol buffer structures. (taxonomies.import)
139 *
140 * @param string $parent Required. Resource name of project that the imported
141 * taxonomies will belong to.
142 * @param GoogleCloudDatacatalogV1ImportTaxonomiesRequest $postBody
143 * @param array $optParams Optional parameters.
144 * @return GoogleCloudDatacatalogV1ImportTaxonomiesResponse
145 * @throws \Google\Service\Exception
146 */
147 public function import($parent, GoogleCloudDatacatalogV1ImportTaxonomiesRequest $postBody, $optParams = [])
148 {
149 $params = ['parent' => $parent, 'postBody' => $postBody];
150 $params = array_merge($params, $optParams);
151 return $this->call('import', [$params], GoogleCloudDatacatalogV1ImportTaxonomiesResponse::class);
152 }
153 /**
154 * Lists all taxonomies in a project in a particular location that you have a
155 * permission to view. (taxonomies.listProjectsLocationsTaxonomies)
156 *
157 * @param string $parent Required. Resource name of the project to list the
158 * taxonomies of.
159 * @param array $optParams Optional parameters.
160 *
161 * @opt_param string filter Supported field for filter is 'service' and value is
162 * 'dataplex'. Eg: service=dataplex.
163 * @opt_param int pageSize The maximum number of items to return. Must be a
164 * value between 1 and 1000 inclusively. If not set, defaults to 50.
165 * @opt_param string pageToken The pagination token of the next results page. If
166 * not set, the first page is returned. The token is returned in the response to
167 * a previous list request.
168 * @return GoogleCloudDatacatalogV1ListTaxonomiesResponse
169 * @throws \Google\Service\Exception
170 */
171 public function listProjectsLocationsTaxonomies($parent, $optParams = [])
172 {
173 $params = ['parent' => $parent];
174 $params = array_merge($params, $optParams);
175 return $this->call('list', [$params], GoogleCloudDatacatalogV1ListTaxonomiesResponse::class);
176 }
177 /**
178 * Updates a taxonomy, including its display name, description, and activated
179 * policy types. (taxonomies.patch)
180 *
181 * @param string $name Identifier. Resource name of this taxonomy in URL format.
182 * Note: Policy tag manager generates unique taxonomy IDs.
183 * @param GoogleCloudDatacatalogV1Taxonomy $postBody
184 * @param array $optParams Optional parameters.
185 *
186 * @opt_param string updateMask Specifies fields to update. If not set, defaults
187 * to all fields you can update. For more information, see [FieldMask]
188 * (https://developers.google.com/protocol-
189 * buffers/docs/reference/google.protobuf#fieldmask).
190 * @return GoogleCloudDatacatalogV1Taxonomy
191 * @throws \Google\Service\Exception
192 */
193 public function patch($name, GoogleCloudDatacatalogV1Taxonomy $postBody, $optParams = [])
194 {
195 $params = ['name' => $name, 'postBody' => $postBody];
196 $params = array_merge($params, $optParams);
197 return $this->call('patch', [$params], GoogleCloudDatacatalogV1Taxonomy::class);
198 }
199 /**
200 * Replaces (updates) a taxonomy and all its policy tags. The taxonomy and its
201 * entire hierarchy of policy tags must be represented literally by
202 * `SerializedTaxonomy` and the nested `SerializedPolicyTag` messages. This
203 * operation automatically does the following: - Deletes the existing policy
204 * tags that are missing from the `SerializedPolicyTag`. - Creates policy tags
205 * that don't have resource names. They are considered new. - Updates policy
206 * tags with valid resources names accordingly. (taxonomies.replace)
207 *
208 * @param string $name Required. Resource name of the taxonomy to update.
209 * @param GoogleCloudDatacatalogV1ReplaceTaxonomyRequest $postBody
210 * @param array $optParams Optional parameters.
211 * @return GoogleCloudDatacatalogV1Taxonomy
212 * @throws \Google\Service\Exception
213 */
214 public function replace($name, GoogleCloudDatacatalogV1ReplaceTaxonomyRequest $postBody, $optParams = [])
215 {
216 $params = ['name' => $name, 'postBody' => $postBody];
217 $params = array_merge($params, $optParams);
218 return $this->call('replace', [$params], GoogleCloudDatacatalogV1Taxonomy::class);
219 }
220 /**
221 * Sets the IAM policy for a policy tag or a taxonomy. (taxonomies.setIamPolicy)
222 *
223 * @param string $resource REQUIRED: The resource for which the policy is being
224 * specified. See [Resource
225 * names](https://cloud.google.com/apis/design/resource_names) for the
226 * appropriate value for this field.
227 * @param SetIamPolicyRequest $postBody
228 * @param array $optParams Optional parameters.
229 * @return Policy
230 * @throws \Google\Service\Exception
231 */
232 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
233 {
234 $params = ['resource' => $resource, 'postBody' => $postBody];
235 $params = array_merge($params, $optParams);
236 return $this->call('setIamPolicy', [$params], Policy::class);
237 }
238 /**
239 * Returns your permissions on a specified policy tag or taxonomy.
240 * (taxonomies.testIamPermissions)
241 *
242 * @param string $resource REQUIRED: The resource for which the policy detail is
243 * being requested. See [Resource
244 * names](https://cloud.google.com/apis/design/resource_names) for the
245 * appropriate value for this field.
246 * @param TestIamPermissionsRequest $postBody
247 * @param array $optParams Optional parameters.
248 * @return TestIamPermissionsResponse
249 * @throws \Google\Service\Exception
250 */
251 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
252 {
253 $params = ['resource' => $resource, 'postBody' => $postBody];
254 $params = array_merge($params, $optParams);
255 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
256 }
257}
258
259// Adding a class alias for backwards compatibility with the previous class name.
260class_alias(ProjectsLocationsTaxonomies::class, 'Google_Service_DataCatalog_Resource_ProjectsLocationsTaxonomies');
Note: See TracBrowser for help on using the repository browser.