google-apis-datacatalog_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2220 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DatacatalogV1
23
+ # Google Cloud Data Catalog API
24
+ #
25
+ # A fully managed and highly scalable data discovery and metadata management
26
+ # service.
27
+ #
28
+ # @example
29
+ # require 'google/apis/datacatalog_v1'
30
+ #
31
+ # Datacatalog = Google::Apis::DatacatalogV1 # Alias the module
32
+ # service = Datacatalog::DataCatalogService.new
33
+ #
34
+ # @see https://cloud.google.com/data-catalog/docs/
35
+ class DataCatalogService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://datacatalog.googleapis.com/', '',
48
+ client_name: 'google-apis-datacatalog_v1',
49
+ client_version: Google::Apis::DatacatalogV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Searches Data Catalog for multiple resources like entries and tags that match
54
+ # a query. This is a [Custom Method] (https://cloud.google.com/apis/design/
55
+ # custom_methods) that doesn't return all information on a resource, only its ID
56
+ # and high level fields. To get more information, you can subsequently call
57
+ # specific get methods. Note: Data Catalog search queries don't guarantee full
58
+ # recall. Results that match your query might not be returned, even in
59
+ # subsequent result pages. Additionally, returned (and not returned) results can
60
+ # vary if you repeat search queries. For more information, see [Data Catalog
61
+ # search syntax] (https://cloud.google.com/data-catalog/docs/how-to/search-
62
+ # reference).
63
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1SearchCatalogRequest] google_cloud_datacatalog_v1_search_catalog_request_object
64
+ # @param [String] fields
65
+ # Selector specifying which fields to include in a partial response.
66
+ # @param [String] quota_user
67
+ # Available to use for quota purposes for server-side applications. Can be any
68
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
69
+ # @param [Google::Apis::RequestOptions] options
70
+ # Request-specific options
71
+ #
72
+ # @yield [result, err] Result & error if block supplied
73
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1SearchCatalogResponse] parsed result object
74
+ # @yieldparam err [StandardError] error object if request failed
75
+ #
76
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1SearchCatalogResponse]
77
+ #
78
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
81
+ def search_catalogs(google_cloud_datacatalog_v1_search_catalog_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
82
+ command = make_simple_command(:post, 'v1/catalog:search', options)
83
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1SearchCatalogRequest::Representation
84
+ command.request_object = google_cloud_datacatalog_v1_search_catalog_request_object
85
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1SearchCatalogResponse::Representation
86
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1SearchCatalogResponse
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Gets an entry by its target resource name. The resource name comes from the
93
+ # source Google Cloud Platform service.
94
+ # @param [String] fully_qualified_name
95
+ # Fully qualified name (FQN) of the resource. FQNs take two forms: * For non-
96
+ # regionalized resources: ``SYSTEM`:`PROJECT`.`
97
+ # PATH_TO_RESOURCE_SEPARATED_WITH_DOTS`` * For regionalized resources: ``SYSTEM`:
98
+ # `PROJECT`.`LOCATION_ID`.`PATH_TO_RESOURCE_SEPARATED_WITH_DOTS`` Example for a
99
+ # DPMS table: `dataproc_metastore:`PROJECT_ID`.`LOCATION_ID`.`INSTANCE_ID`.`
100
+ # DATABASE_ID`.`TABLE_ID``
101
+ # @param [String] linked_resource
102
+ # The full name of the Google Cloud Platform resource the Data Catalog entry
103
+ # represents. For more information, see [Full Resource Name] (https://cloud.
104
+ # google.com/apis/design/resource_names#full_resource_name). Full names are case-
105
+ # sensitive. For example: * `//bigquery.googleapis.com/projects/`PROJECT_ID`/
106
+ # datasets/`DATASET_ID`/tables/`TABLE_ID`` * `//pubsub.googleapis.com/projects/`
107
+ # PROJECT_ID`/topics/`TOPIC_ID``
108
+ # @param [String] sql_resource
109
+ # The SQL name of the entry. SQL names are case-sensitive. Examples: * `pubsub.`
110
+ # PROJECT_ID`.`TOPIC_ID`` * `pubsub.`PROJECT_ID`.`TOPIC.ID.SEPARATED.WITH.DOTS``
111
+ # * `bigquery.table.`PROJECT_ID`.`DATASET_ID`.`TABLE_ID`` * `bigquery.dataset.`
112
+ # PROJECT_ID`.`DATASET_ID`` * `datacatalog.entry.`PROJECT_ID`.`LOCATION_ID`.`
113
+ # ENTRY_GROUP_ID`.`ENTRY_ID`` Identifiers (`*_ID`) should comply with the [
114
+ # Lexical structure in Standard SQL] (https://cloud.google.com/bigquery/docs/
115
+ # reference/standard-sql/lexical).
116
+ # @param [String] fields
117
+ # Selector specifying which fields to include in a partial response.
118
+ # @param [String] quota_user
119
+ # Available to use for quota purposes for server-side applications. Can be any
120
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
121
+ # @param [Google::Apis::RequestOptions] options
122
+ # Request-specific options
123
+ #
124
+ # @yield [result, err] Result & error if block supplied
125
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry] parsed result object
126
+ # @yieldparam err [StandardError] error object if request failed
127
+ #
128
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry]
129
+ #
130
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
131
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
132
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
133
+ def lookup_entry(fully_qualified_name: nil, linked_resource: nil, sql_resource: nil, fields: nil, quota_user: nil, options: nil, &block)
134
+ command = make_simple_command(:get, 'v1/entries:lookup', options)
135
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry::Representation
136
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry
137
+ command.query['fullyQualifiedName'] = fully_qualified_name unless fully_qualified_name.nil?
138
+ command.query['linkedResource'] = linked_resource unless linked_resource.nil?
139
+ command.query['sqlResource'] = sql_resource unless sql_resource.nil?
140
+ command.query['fields'] = fields unless fields.nil?
141
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
142
+ execute_or_queue_command(command, &block)
143
+ end
144
+
145
+ # Creates an entry group. An entry group contains logically related entries
146
+ # together with [Cloud Identity and Access Management](/data-catalog/docs/
147
+ # concepts/iam) policies. These policies specify users who can create, edit, and
148
+ # view entries within entry groups. Data Catalog automatically creates entry
149
+ # groups with names that start with the `@` symbol for the following resources: *
150
+ # BigQuery entries (`@bigquery`) * Pub/Sub topics (`@pubsub`) * Dataproc
151
+ # Metastore services (`@dataproc_metastore_`SERVICE_NAME_HASH``) You can create
152
+ # your own entry groups for Cloud Storage fileset entries and custom entries
153
+ # together with the corresponding IAM policies. User-created entry groups can't
154
+ # contain the `@` symbol, it is reserved for automatically created groups. Entry
155
+ # groups, like entries, can be searched. A maximum of 10,000 entry groups may be
156
+ # created per organization across all locations. You must enable the Data
157
+ # Catalog API in the project identified by the `parent` parameter. For more
158
+ # information, see [Data Catalog resource project](https://cloud.google.com/data-
159
+ # catalog/docs/concepts/resource-project).
160
+ # @param [String] parent
161
+ # Required. The names of the project and location that the new entry group
162
+ # belongs to. Note: The entry group itself and its child resources might not be
163
+ # stored in the location specified in its name.
164
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup] google_cloud_datacatalog_v1_entry_group_object
165
+ # @param [String] entry_group_id
166
+ # Required. The ID of the entry group to create. The ID must contain only
167
+ # letters (a-z, A-Z), numbers (0-9), underscores (_), and must start with a
168
+ # letter or underscore. The maximum size is 64 bytes when encoded in UTF-8.
169
+ # @param [String] fields
170
+ # Selector specifying which fields to include in a partial response.
171
+ # @param [String] quota_user
172
+ # Available to use for quota purposes for server-side applications. Can be any
173
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
174
+ # @param [Google::Apis::RequestOptions] options
175
+ # Request-specific options
176
+ #
177
+ # @yield [result, err] Result & error if block supplied
178
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup] parsed result object
179
+ # @yieldparam err [StandardError] error object if request failed
180
+ #
181
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup]
182
+ #
183
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
186
+ def create_project_location_entry_group(parent, google_cloud_datacatalog_v1_entry_group_object = nil, entry_group_id: nil, fields: nil, quota_user: nil, options: nil, &block)
187
+ command = make_simple_command(:post, 'v1/{+parent}/entryGroups', options)
188
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup::Representation
189
+ command.request_object = google_cloud_datacatalog_v1_entry_group_object
190
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup::Representation
191
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup
192
+ command.params['parent'] = parent unless parent.nil?
193
+ command.query['entryGroupId'] = entry_group_id unless entry_group_id.nil?
194
+ command.query['fields'] = fields unless fields.nil?
195
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
196
+ execute_or_queue_command(command, &block)
197
+ end
198
+
199
+ # Deletes an entry group. You must enable the Data Catalog API in the project
200
+ # identified by the `name` parameter. For more information, see [Data Catalog
201
+ # resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-
202
+ # project).
203
+ # @param [String] name
204
+ # Required. The name of the entry group to delete.
205
+ # @param [Boolean] force
206
+ # Optional. If true, deletes all entries in the entry group.
207
+ # @param [String] fields
208
+ # Selector specifying which fields to include in a partial response.
209
+ # @param [String] quota_user
210
+ # Available to use for quota purposes for server-side applications. Can be any
211
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
212
+ # @param [Google::Apis::RequestOptions] options
213
+ # Request-specific options
214
+ #
215
+ # @yield [result, err] Result & error if block supplied
216
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
217
+ # @yieldparam err [StandardError] error object if request failed
218
+ #
219
+ # @return [Google::Apis::DatacatalogV1::Empty]
220
+ #
221
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
222
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
223
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
224
+ def delete_project_location_entry_group(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
225
+ command = make_simple_command(:delete, 'v1/{+name}', options)
226
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
227
+ command.response_class = Google::Apis::DatacatalogV1::Empty
228
+ command.params['name'] = name unless name.nil?
229
+ command.query['force'] = force unless force.nil?
230
+ command.query['fields'] = fields unless fields.nil?
231
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
232
+ execute_or_queue_command(command, &block)
233
+ end
234
+
235
+ # Gets an entry group.
236
+ # @param [String] name
237
+ # Required. The name of the entry group to get.
238
+ # @param [String] read_mask
239
+ # The fields to return. If empty or omitted, all fields are returned.
240
+ # @param [String] fields
241
+ # Selector specifying which fields to include in a partial response.
242
+ # @param [String] quota_user
243
+ # Available to use for quota purposes for server-side applications. Can be any
244
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
245
+ # @param [Google::Apis::RequestOptions] options
246
+ # Request-specific options
247
+ #
248
+ # @yield [result, err] Result & error if block supplied
249
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup] parsed result object
250
+ # @yieldparam err [StandardError] error object if request failed
251
+ #
252
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup]
253
+ #
254
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
255
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
256
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
257
+ def get_project_location_entry_group(name, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
258
+ command = make_simple_command(:get, 'v1/{+name}', options)
259
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup::Representation
260
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup
261
+ command.params['name'] = name unless name.nil?
262
+ command.query['readMask'] = read_mask unless read_mask.nil?
263
+ command.query['fields'] = fields unless fields.nil?
264
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
265
+ execute_or_queue_command(command, &block)
266
+ end
267
+
268
+ # Gets the access control policy for a resource. May return: * A`NOT_FOUND`
269
+ # error if the resource doesn't exist or you don't have the permission to view
270
+ # it. * An empty policy if the resource exists but doesn't have a set policy.
271
+ # Supported resources are: - Tag templates - Entry groups Note: This method
272
+ # doesn't get policies from Google Cloud Platform resources ingested into Data
273
+ # Catalog. To call this method, you must have the following Google IAM
274
+ # permissions: - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
275
+ # templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry
276
+ # groups.
277
+ # @param [String] resource
278
+ # REQUIRED: The resource for which the policy is being requested. See the
279
+ # operation documentation for the appropriate value for this field.
280
+ # @param [Google::Apis::DatacatalogV1::GetIamPolicyRequest] get_iam_policy_request_object
281
+ # @param [String] fields
282
+ # Selector specifying which fields to include in a partial response.
283
+ # @param [String] quota_user
284
+ # Available to use for quota purposes for server-side applications. Can be any
285
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
286
+ # @param [Google::Apis::RequestOptions] options
287
+ # Request-specific options
288
+ #
289
+ # @yield [result, err] Result & error if block supplied
290
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
291
+ # @yieldparam err [StandardError] error object if request failed
292
+ #
293
+ # @return [Google::Apis::DatacatalogV1::Policy]
294
+ #
295
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
296
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
297
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
298
+ def get_entry_group_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
299
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
300
+ command.request_representation = Google::Apis::DatacatalogV1::GetIamPolicyRequest::Representation
301
+ command.request_object = get_iam_policy_request_object
302
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
303
+ command.response_class = Google::Apis::DatacatalogV1::Policy
304
+ command.params['resource'] = resource unless resource.nil?
305
+ command.query['fields'] = fields unless fields.nil?
306
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
307
+ execute_or_queue_command(command, &block)
308
+ end
309
+
310
+ # Lists entry groups.
311
+ # @param [String] parent
312
+ # Required. The name of the location that contains the entry groups to list. Can
313
+ # be provided as a URL.
314
+ # @param [Fixnum] page_size
315
+ # Optional. The maximum number of items to return. Default is 10. Maximum limit
316
+ # is 1000. Throws an invalid argument if `page_size` is greater than 1000.
317
+ # @param [String] page_token
318
+ # Optional. Pagination token that specifies the next page to return. If empty,
319
+ # returns the first page.
320
+ # @param [String] fields
321
+ # Selector specifying which fields to include in a partial response.
322
+ # @param [String] quota_user
323
+ # Available to use for quota purposes for server-side applications. Can be any
324
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
325
+ # @param [Google::Apis::RequestOptions] options
326
+ # Request-specific options
327
+ #
328
+ # @yield [result, err] Result & error if block supplied
329
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntryGroupsResponse] parsed result object
330
+ # @yieldparam err [StandardError] error object if request failed
331
+ #
332
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntryGroupsResponse]
333
+ #
334
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
335
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
336
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
337
+ def list_project_location_entry_groups(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
338
+ command = make_simple_command(:get, 'v1/{+parent}/entryGroups', options)
339
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntryGroupsResponse::Representation
340
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntryGroupsResponse
341
+ command.params['parent'] = parent unless parent.nil?
342
+ command.query['pageSize'] = page_size unless page_size.nil?
343
+ command.query['pageToken'] = page_token unless page_token.nil?
344
+ command.query['fields'] = fields unless fields.nil?
345
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
346
+ execute_or_queue_command(command, &block)
347
+ end
348
+
349
+ # Updates an entry group. You must enable the Data Catalog API in the project
350
+ # identified by the `entry_group.name` parameter. For more information, see [
351
+ # Data Catalog resource project](https://cloud.google.com/data-catalog/docs/
352
+ # concepts/resource-project).
353
+ # @param [String] name
354
+ # The resource name of the entry group in URL format. Note: The entry group
355
+ # itself and its child resources might not be stored in the location specified
356
+ # in its name.
357
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup] google_cloud_datacatalog_v1_entry_group_object
358
+ # @param [String] update_mask
359
+ # Names of fields whose values to overwrite on an entry group. If this parameter
360
+ # is absent or empty, all modifiable fields are overwritten. If such fields are
361
+ # non-required and omitted in the request body, their values are emptied.
362
+ # @param [String] fields
363
+ # Selector specifying which fields to include in a partial response.
364
+ # @param [String] quota_user
365
+ # Available to use for quota purposes for server-side applications. Can be any
366
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
367
+ # @param [Google::Apis::RequestOptions] options
368
+ # Request-specific options
369
+ #
370
+ # @yield [result, err] Result & error if block supplied
371
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup] parsed result object
372
+ # @yieldparam err [StandardError] error object if request failed
373
+ #
374
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup]
375
+ #
376
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
377
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
378
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
379
+ def patch_project_location_entry_group(name, google_cloud_datacatalog_v1_entry_group_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
380
+ command = make_simple_command(:patch, 'v1/{+name}', options)
381
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup::Representation
382
+ command.request_object = google_cloud_datacatalog_v1_entry_group_object
383
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup::Representation
384
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1EntryGroup
385
+ command.params['name'] = name unless name.nil?
386
+ command.query['updateMask'] = update_mask unless update_mask.nil?
387
+ command.query['fields'] = fields unless fields.nil?
388
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
389
+ execute_or_queue_command(command, &block)
390
+ end
391
+
392
+ # Sets an access control policy for a resource. Replaces any existing policy.
393
+ # Supported resources are: - Tag templates - Entry groups Note: This method sets
394
+ # policies only within Data Catalog and can't be used to manage policies in
395
+ # BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform
396
+ # resources synced with the Data Catalog. To call this method, you must have the
397
+ # following Google IAM permissions: - `datacatalog.tagTemplates.setIamPolicy` to
398
+ # set policies on tag templates. - `datacatalog.entryGroups.setIamPolicy` to set
399
+ # policies on entry groups.
400
+ # @param [String] resource
401
+ # REQUIRED: The resource for which the policy is being specified. See the
402
+ # operation documentation for the appropriate value for this field.
403
+ # @param [Google::Apis::DatacatalogV1::SetIamPolicyRequest] set_iam_policy_request_object
404
+ # @param [String] fields
405
+ # Selector specifying which fields to include in a partial response.
406
+ # @param [String] quota_user
407
+ # Available to use for quota purposes for server-side applications. Can be any
408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
409
+ # @param [Google::Apis::RequestOptions] options
410
+ # Request-specific options
411
+ #
412
+ # @yield [result, err] Result & error if block supplied
413
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
414
+ # @yieldparam err [StandardError] error object if request failed
415
+ #
416
+ # @return [Google::Apis::DatacatalogV1::Policy]
417
+ #
418
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
419
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
420
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
421
+ def set_entry_group_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
422
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
423
+ command.request_representation = Google::Apis::DatacatalogV1::SetIamPolicyRequest::Representation
424
+ command.request_object = set_iam_policy_request_object
425
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
426
+ command.response_class = Google::Apis::DatacatalogV1::Policy
427
+ command.params['resource'] = resource unless resource.nil?
428
+ command.query['fields'] = fields unless fields.nil?
429
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
430
+ execute_or_queue_command(command, &block)
431
+ end
432
+
433
+ # Gets your permissions on a resource. Returns an empty set of permissions if
434
+ # the resource doesn't exist. Supported resources are: - Tag templates - Entry
435
+ # groups Note: This method gets policies only within Data Catalog and can't be
436
+ # used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any
437
+ # external Google Cloud Platform resources ingested into Data Catalog. No Google
438
+ # IAM permissions are required to call this method.
439
+ # @param [String] resource
440
+ # REQUIRED: The resource for which the policy detail is being requested. See the
441
+ # operation documentation for the appropriate value for this field.
442
+ # @param [Google::Apis::DatacatalogV1::TestIamPermissionsRequest] test_iam_permissions_request_object
443
+ # @param [String] fields
444
+ # Selector specifying which fields to include in a partial response.
445
+ # @param [String] quota_user
446
+ # Available to use for quota purposes for server-side applications. Can be any
447
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
448
+ # @param [Google::Apis::RequestOptions] options
449
+ # Request-specific options
450
+ #
451
+ # @yield [result, err] Result & error if block supplied
452
+ # @yieldparam result [Google::Apis::DatacatalogV1::TestIamPermissionsResponse] parsed result object
453
+ # @yieldparam err [StandardError] error object if request failed
454
+ #
455
+ # @return [Google::Apis::DatacatalogV1::TestIamPermissionsResponse]
456
+ #
457
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
458
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
459
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
460
+ def test_entry_group_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
461
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
462
+ command.request_representation = Google::Apis::DatacatalogV1::TestIamPermissionsRequest::Representation
463
+ command.request_object = test_iam_permissions_request_object
464
+ command.response_representation = Google::Apis::DatacatalogV1::TestIamPermissionsResponse::Representation
465
+ command.response_class = Google::Apis::DatacatalogV1::TestIamPermissionsResponse
466
+ command.params['resource'] = resource unless resource.nil?
467
+ command.query['fields'] = fields unless fields.nil?
468
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
469
+ execute_or_queue_command(command, &block)
470
+ end
471
+
472
+ # Creates an entry. You can create entries only with 'FILESET', 'CLUSTER', '
473
+ # DATA_STREAM', or custom types. Data Catalog automatically creates entries with
474
+ # other types during metadata ingestion from integrated systems. You must enable
475
+ # the Data Catalog API in the project identified by the `parent` parameter. For
476
+ # more information, see [Data Catalog resource project](https://cloud.google.com/
477
+ # data-catalog/docs/concepts/resource-project). An entry group can have a
478
+ # maximum of 100,000 entries.
479
+ # @param [String] parent
480
+ # Required. The name of the entry group this entry belongs to. Note: The entry
481
+ # itself and its child resources might not be stored in the location specified
482
+ # in its name.
483
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry] google_cloud_datacatalog_v1_entry_object
484
+ # @param [String] entry_id
485
+ # Required. The ID of the entry to create. The ID must contain only letters (a-z,
486
+ # A-Z), numbers (0-9), and underscores (_). The maximum size is 64 bytes when
487
+ # encoded in UTF-8.
488
+ # @param [String] fields
489
+ # Selector specifying which fields to include in a partial response.
490
+ # @param [String] quota_user
491
+ # Available to use for quota purposes for server-side applications. Can be any
492
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
493
+ # @param [Google::Apis::RequestOptions] options
494
+ # Request-specific options
495
+ #
496
+ # @yield [result, err] Result & error if block supplied
497
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry] parsed result object
498
+ # @yieldparam err [StandardError] error object if request failed
499
+ #
500
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry]
501
+ #
502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
505
+ def create_project_location_entry_group_entry(parent, google_cloud_datacatalog_v1_entry_object = nil, entry_id: nil, fields: nil, quota_user: nil, options: nil, &block)
506
+ command = make_simple_command(:post, 'v1/{+parent}/entries', options)
507
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry::Representation
508
+ command.request_object = google_cloud_datacatalog_v1_entry_object
509
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry::Representation
510
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry
511
+ command.params['parent'] = parent unless parent.nil?
512
+ command.query['entryId'] = entry_id unless entry_id.nil?
513
+ command.query['fields'] = fields unless fields.nil?
514
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
515
+ execute_or_queue_command(command, &block)
516
+ end
517
+
518
+ # Deletes an existing entry. You can delete only the entries created by the
519
+ # CreateEntry method. You must enable the Data Catalog API in the project
520
+ # identified by the `name` parameter. For more information, see [Data Catalog
521
+ # resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-
522
+ # project).
523
+ # @param [String] name
524
+ # Required. The name of the entry to delete.
525
+ # @param [String] fields
526
+ # Selector specifying which fields to include in a partial response.
527
+ # @param [String] quota_user
528
+ # Available to use for quota purposes for server-side applications. Can be any
529
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
530
+ # @param [Google::Apis::RequestOptions] options
531
+ # Request-specific options
532
+ #
533
+ # @yield [result, err] Result & error if block supplied
534
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
535
+ # @yieldparam err [StandardError] error object if request failed
536
+ #
537
+ # @return [Google::Apis::DatacatalogV1::Empty]
538
+ #
539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
542
+ def delete_project_location_entry_group_entry(name, fields: nil, quota_user: nil, options: nil, &block)
543
+ command = make_simple_command(:delete, 'v1/{+name}', options)
544
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
545
+ command.response_class = Google::Apis::DatacatalogV1::Empty
546
+ command.params['name'] = name unless name.nil?
547
+ command.query['fields'] = fields unless fields.nil?
548
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
549
+ execute_or_queue_command(command, &block)
550
+ end
551
+
552
+ # Gets an entry.
553
+ # @param [String] name
554
+ # Required. The name of the entry to get.
555
+ # @param [String] fields
556
+ # Selector specifying which fields to include in a partial response.
557
+ # @param [String] quota_user
558
+ # Available to use for quota purposes for server-side applications. Can be any
559
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
560
+ # @param [Google::Apis::RequestOptions] options
561
+ # Request-specific options
562
+ #
563
+ # @yield [result, err] Result & error if block supplied
564
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry] parsed result object
565
+ # @yieldparam err [StandardError] error object if request failed
566
+ #
567
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry]
568
+ #
569
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
570
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
571
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
572
+ def get_project_location_entry_group_entry(name, fields: nil, quota_user: nil, options: nil, &block)
573
+ command = make_simple_command(:get, 'v1/{+name}', options)
574
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry::Representation
575
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry
576
+ command.params['name'] = name unless name.nil?
577
+ command.query['fields'] = fields unless fields.nil?
578
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
579
+ execute_or_queue_command(command, &block)
580
+ end
581
+
582
+ # Gets the access control policy for a resource. May return: * A`NOT_FOUND`
583
+ # error if the resource doesn't exist or you don't have the permission to view
584
+ # it. * An empty policy if the resource exists but doesn't have a set policy.
585
+ # Supported resources are: - Tag templates - Entry groups Note: This method
586
+ # doesn't get policies from Google Cloud Platform resources ingested into Data
587
+ # Catalog. To call this method, you must have the following Google IAM
588
+ # permissions: - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
589
+ # templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry
590
+ # groups.
591
+ # @param [String] resource
592
+ # REQUIRED: The resource for which the policy is being requested. See the
593
+ # operation documentation for the appropriate value for this field.
594
+ # @param [Google::Apis::DatacatalogV1::GetIamPolicyRequest] get_iam_policy_request_object
595
+ # @param [String] fields
596
+ # Selector specifying which fields to include in a partial response.
597
+ # @param [String] quota_user
598
+ # Available to use for quota purposes for server-side applications. Can be any
599
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
600
+ # @param [Google::Apis::RequestOptions] options
601
+ # Request-specific options
602
+ #
603
+ # @yield [result, err] Result & error if block supplied
604
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
605
+ # @yieldparam err [StandardError] error object if request failed
606
+ #
607
+ # @return [Google::Apis::DatacatalogV1::Policy]
608
+ #
609
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
610
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
611
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
612
+ def get_entry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
613
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
614
+ command.request_representation = Google::Apis::DatacatalogV1::GetIamPolicyRequest::Representation
615
+ command.request_object = get_iam_policy_request_object
616
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
617
+ command.response_class = Google::Apis::DatacatalogV1::Policy
618
+ command.params['resource'] = resource unless resource.nil?
619
+ command.query['fields'] = fields unless fields.nil?
620
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
621
+ execute_or_queue_command(command, &block)
622
+ end
623
+
624
+ # Lists entries.
625
+ # @param [String] parent
626
+ # Required. The name of the entry group that contains the entries to list. Can
627
+ # be provided in URL format.
628
+ # @param [Fixnum] page_size
629
+ # The maximum number of items to return. Default is 10. Maximum limit is 1000.
630
+ # Throws an invalid argument if `page_size` is more than 1000.
631
+ # @param [String] page_token
632
+ # Pagination token that specifies the next page to return. If empty, the first
633
+ # page is returned.
634
+ # @param [String] read_mask
635
+ # The fields to return for each entry. If empty or omitted, all fields are
636
+ # returned. For example, to return a list of entries with only the `name` field,
637
+ # set `read_mask` to only one path with the `name` value.
638
+ # @param [String] fields
639
+ # Selector specifying which fields to include in a partial response.
640
+ # @param [String] quota_user
641
+ # Available to use for quota purposes for server-side applications. Can be any
642
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
643
+ # @param [Google::Apis::RequestOptions] options
644
+ # Request-specific options
645
+ #
646
+ # @yield [result, err] Result & error if block supplied
647
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntriesResponse] parsed result object
648
+ # @yieldparam err [StandardError] error object if request failed
649
+ #
650
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntriesResponse]
651
+ #
652
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
653
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
654
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
655
+ def list_project_location_entry_group_entries(parent, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
656
+ command = make_simple_command(:get, 'v1/{+parent}/entries', options)
657
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntriesResponse::Representation
658
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListEntriesResponse
659
+ command.params['parent'] = parent unless parent.nil?
660
+ command.query['pageSize'] = page_size unless page_size.nil?
661
+ command.query['pageToken'] = page_token unless page_token.nil?
662
+ command.query['readMask'] = read_mask unless read_mask.nil?
663
+ command.query['fields'] = fields unless fields.nil?
664
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
665
+ execute_or_queue_command(command, &block)
666
+ end
667
+
668
+ # Updates an existing entry. You must enable the Data Catalog API in the project
669
+ # identified by the `entry.name` parameter. For more information, see [Data
670
+ # Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/
671
+ # resource-project).
672
+ # @param [String] name
673
+ # Output only. The resource name of an entry in URL format. Note: The entry
674
+ # itself and its child resources might not be stored in the location specified
675
+ # in its name.
676
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry] google_cloud_datacatalog_v1_entry_object
677
+ # @param [String] update_mask
678
+ # Names of fields whose values to overwrite on an entry. If this parameter is
679
+ # absent or empty, all modifiable fields are overwritten. If such fields are non-
680
+ # required and omitted in the request body, their values are emptied. You can
681
+ # modify only the fields listed below. For entries with type `DATA_STREAM`: * `
682
+ # schema` For entries with type `FILESET`: * `schema` * `display_name` * `
683
+ # description` * `gcs_fileset_spec` * `gcs_fileset_spec.file_patterns` For
684
+ # entries with `user_specified_type`: * `schema` * `display_name` * `description`
685
+ # * `user_specified_type` * `user_specified_system` * `linked_resource` * `
686
+ # source_system_timestamps`
687
+ # @param [String] fields
688
+ # Selector specifying which fields to include in a partial response.
689
+ # @param [String] quota_user
690
+ # Available to use for quota purposes for server-side applications. Can be any
691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
692
+ # @param [Google::Apis::RequestOptions] options
693
+ # Request-specific options
694
+ #
695
+ # @yield [result, err] Result & error if block supplied
696
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry] parsed result object
697
+ # @yieldparam err [StandardError] error object if request failed
698
+ #
699
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry]
700
+ #
701
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
702
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
703
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
704
+ def patch_project_location_entry_group_entry(name, google_cloud_datacatalog_v1_entry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
705
+ command = make_simple_command(:patch, 'v1/{+name}', options)
706
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry::Representation
707
+ command.request_object = google_cloud_datacatalog_v1_entry_object
708
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry::Representation
709
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Entry
710
+ command.params['name'] = name unless name.nil?
711
+ command.query['updateMask'] = update_mask unless update_mask.nil?
712
+ command.query['fields'] = fields unless fields.nil?
713
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
714
+ execute_or_queue_command(command, &block)
715
+ end
716
+
717
+ # Gets your permissions on a resource. Returns an empty set of permissions if
718
+ # the resource doesn't exist. Supported resources are: - Tag templates - Entry
719
+ # groups Note: This method gets policies only within Data Catalog and can't be
720
+ # used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any
721
+ # external Google Cloud Platform resources ingested into Data Catalog. No Google
722
+ # IAM permissions are required to call this method.
723
+ # @param [String] resource
724
+ # REQUIRED: The resource for which the policy detail is being requested. See the
725
+ # operation documentation for the appropriate value for this field.
726
+ # @param [Google::Apis::DatacatalogV1::TestIamPermissionsRequest] test_iam_permissions_request_object
727
+ # @param [String] fields
728
+ # Selector specifying which fields to include in a partial response.
729
+ # @param [String] quota_user
730
+ # Available to use for quota purposes for server-side applications. Can be any
731
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
732
+ # @param [Google::Apis::RequestOptions] options
733
+ # Request-specific options
734
+ #
735
+ # @yield [result, err] Result & error if block supplied
736
+ # @yieldparam result [Google::Apis::DatacatalogV1::TestIamPermissionsResponse] parsed result object
737
+ # @yieldparam err [StandardError] error object if request failed
738
+ #
739
+ # @return [Google::Apis::DatacatalogV1::TestIamPermissionsResponse]
740
+ #
741
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
742
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
743
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
744
+ def test_entry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
745
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
746
+ command.request_representation = Google::Apis::DatacatalogV1::TestIamPermissionsRequest::Representation
747
+ command.request_object = test_iam_permissions_request_object
748
+ command.response_representation = Google::Apis::DatacatalogV1::TestIamPermissionsResponse::Representation
749
+ command.response_class = Google::Apis::DatacatalogV1::TestIamPermissionsResponse
750
+ command.params['resource'] = resource unless resource.nil?
751
+ command.query['fields'] = fields unless fields.nil?
752
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
753
+ execute_or_queue_command(command, &block)
754
+ end
755
+
756
+ # Creates a tag and assigns it to: * An Entry if the method name is ``projects.
757
+ # locations.entryGroups.entries.tags.create``. * Or EntryGroupif the method name
758
+ # is ``projects.locations.entryGroups.tags.create``. Note: The project
759
+ # identified by the `parent` parameter for the [tag] (https://cloud.google.com/
760
+ # data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.
761
+ # tags/create#path-parameters) and the [tag template] (https://cloud.google.com/
762
+ # data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#
763
+ # path-parameters) used to create the tag must be in the same organization.
764
+ # @param [String] parent
765
+ # Required. The name of the resource to attach this tag to. Tags can be attached
766
+ # to entries or entry groups. An entry can have up to 1000 attached tags. Note:
767
+ # The tag and its child resources might not be stored in the location specified
768
+ # in its name.
769
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] google_cloud_datacatalog_v1_tag_object
770
+ # @param [String] fields
771
+ # Selector specifying which fields to include in a partial response.
772
+ # @param [String] quota_user
773
+ # Available to use for quota purposes for server-side applications. Can be any
774
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
775
+ # @param [Google::Apis::RequestOptions] options
776
+ # Request-specific options
777
+ #
778
+ # @yield [result, err] Result & error if block supplied
779
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] parsed result object
780
+ # @yieldparam err [StandardError] error object if request failed
781
+ #
782
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag]
783
+ #
784
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
785
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
786
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
787
+ def create_project_location_entry_group_entry_tag(parent, google_cloud_datacatalog_v1_tag_object = nil, fields: nil, quota_user: nil, options: nil, &block)
788
+ command = make_simple_command(:post, 'v1/{+parent}/tags', options)
789
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
790
+ command.request_object = google_cloud_datacatalog_v1_tag_object
791
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
792
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag
793
+ command.params['parent'] = parent unless parent.nil?
794
+ command.query['fields'] = fields unless fields.nil?
795
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
796
+ execute_or_queue_command(command, &block)
797
+ end
798
+
799
+ # Deletes a tag.
800
+ # @param [String] name
801
+ # Required. The name of the tag to delete.
802
+ # @param [String] fields
803
+ # Selector specifying which fields to include in a partial response.
804
+ # @param [String] quota_user
805
+ # Available to use for quota purposes for server-side applications. Can be any
806
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
807
+ # @param [Google::Apis::RequestOptions] options
808
+ # Request-specific options
809
+ #
810
+ # @yield [result, err] Result & error if block supplied
811
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
812
+ # @yieldparam err [StandardError] error object if request failed
813
+ #
814
+ # @return [Google::Apis::DatacatalogV1::Empty]
815
+ #
816
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
817
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
818
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
819
+ def delete_project_location_entry_group_entry_tag(name, fields: nil, quota_user: nil, options: nil, &block)
820
+ command = make_simple_command(:delete, 'v1/{+name}', options)
821
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
822
+ command.response_class = Google::Apis::DatacatalogV1::Empty
823
+ command.params['name'] = name unless name.nil?
824
+ command.query['fields'] = fields unless fields.nil?
825
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
826
+ execute_or_queue_command(command, &block)
827
+ end
828
+
829
+ # Lists tags assigned to an Entry.
830
+ # @param [String] parent
831
+ # Required. The name of the Data Catalog resource to list the tags of. The
832
+ # resource can be an Entry or an EntryGroup (without `/entries/`entries`` at the
833
+ # end).
834
+ # @param [Fixnum] page_size
835
+ # The maximum number of tags to return. Default is 10. Maximum limit is 1000.
836
+ # @param [String] page_token
837
+ # Pagination token that specifies the next page to return. If empty, the first
838
+ # page is returned.
839
+ # @param [String] fields
840
+ # Selector specifying which fields to include in a partial response.
841
+ # @param [String] quota_user
842
+ # Available to use for quota purposes for server-side applications. Can be any
843
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
844
+ # @param [Google::Apis::RequestOptions] options
845
+ # Request-specific options
846
+ #
847
+ # @yield [result, err] Result & error if block supplied
848
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse] parsed result object
849
+ # @yieldparam err [StandardError] error object if request failed
850
+ #
851
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse]
852
+ #
853
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
854
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
855
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
856
+ def list_project_location_entry_group_entry_tags(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
857
+ command = make_simple_command(:get, 'v1/{+parent}/tags', options)
858
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse::Representation
859
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse
860
+ command.params['parent'] = parent unless parent.nil?
861
+ command.query['pageSize'] = page_size unless page_size.nil?
862
+ command.query['pageToken'] = page_token unless page_token.nil?
863
+ command.query['fields'] = fields unless fields.nil?
864
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
865
+ execute_or_queue_command(command, &block)
866
+ end
867
+
868
+ # Updates an existing tag.
869
+ # @param [String] name
870
+ # The resource name of the tag in URL format where tag ID is a system-generated
871
+ # identifier. Note: The tag itself might not be stored in the location specified
872
+ # in its name.
873
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] google_cloud_datacatalog_v1_tag_object
874
+ # @param [String] update_mask
875
+ # Names of fields whose values to overwrite on a tag. Currently, a tag has the
876
+ # only modifiable field with the name `fields`. In general, if this parameter is
877
+ # absent or empty, all modifiable fields are overwritten. If such fields are non-
878
+ # required and omitted in the request body, their values are emptied.
879
+ # @param [String] fields
880
+ # Selector specifying which fields to include in a partial response.
881
+ # @param [String] quota_user
882
+ # Available to use for quota purposes for server-side applications. Can be any
883
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
884
+ # @param [Google::Apis::RequestOptions] options
885
+ # Request-specific options
886
+ #
887
+ # @yield [result, err] Result & error if block supplied
888
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] parsed result object
889
+ # @yieldparam err [StandardError] error object if request failed
890
+ #
891
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag]
892
+ #
893
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
894
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
895
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
896
+ def patch_project_location_entry_group_entry_tag(name, google_cloud_datacatalog_v1_tag_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
897
+ command = make_simple_command(:patch, 'v1/{+name}', options)
898
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
899
+ command.request_object = google_cloud_datacatalog_v1_tag_object
900
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
901
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag
902
+ command.params['name'] = name unless name.nil?
903
+ command.query['updateMask'] = update_mask unless update_mask.nil?
904
+ command.query['fields'] = fields unless fields.nil?
905
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
906
+ execute_or_queue_command(command, &block)
907
+ end
908
+
909
+ # Creates a tag and assigns it to: * An Entry if the method name is ``projects.
910
+ # locations.entryGroups.entries.tags.create``. * Or EntryGroupif the method name
911
+ # is ``projects.locations.entryGroups.tags.create``. Note: The project
912
+ # identified by the `parent` parameter for the [tag] (https://cloud.google.com/
913
+ # data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.
914
+ # tags/create#path-parameters) and the [tag template] (https://cloud.google.com/
915
+ # data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#
916
+ # path-parameters) used to create the tag must be in the same organization.
917
+ # @param [String] parent
918
+ # Required. The name of the resource to attach this tag to. Tags can be attached
919
+ # to entries or entry groups. An entry can have up to 1000 attached tags. Note:
920
+ # The tag and its child resources might not be stored in the location specified
921
+ # in its name.
922
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] google_cloud_datacatalog_v1_tag_object
923
+ # @param [String] fields
924
+ # Selector specifying which fields to include in a partial response.
925
+ # @param [String] quota_user
926
+ # Available to use for quota purposes for server-side applications. Can be any
927
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
928
+ # @param [Google::Apis::RequestOptions] options
929
+ # Request-specific options
930
+ #
931
+ # @yield [result, err] Result & error if block supplied
932
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] parsed result object
933
+ # @yieldparam err [StandardError] error object if request failed
934
+ #
935
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag]
936
+ #
937
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
938
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
939
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
940
+ def create_project_location_entry_group_tag(parent, google_cloud_datacatalog_v1_tag_object = nil, fields: nil, quota_user: nil, options: nil, &block)
941
+ command = make_simple_command(:post, 'v1/{+parent}/tags', options)
942
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
943
+ command.request_object = google_cloud_datacatalog_v1_tag_object
944
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
945
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag
946
+ command.params['parent'] = parent unless parent.nil?
947
+ command.query['fields'] = fields unless fields.nil?
948
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
949
+ execute_or_queue_command(command, &block)
950
+ end
951
+
952
+ # Deletes a tag.
953
+ # @param [String] name
954
+ # Required. The name of the tag to delete.
955
+ # @param [String] fields
956
+ # Selector specifying which fields to include in a partial response.
957
+ # @param [String] quota_user
958
+ # Available to use for quota purposes for server-side applications. Can be any
959
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
960
+ # @param [Google::Apis::RequestOptions] options
961
+ # Request-specific options
962
+ #
963
+ # @yield [result, err] Result & error if block supplied
964
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
965
+ # @yieldparam err [StandardError] error object if request failed
966
+ #
967
+ # @return [Google::Apis::DatacatalogV1::Empty]
968
+ #
969
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
970
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
971
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
972
+ def delete_project_location_entry_group_tag(name, fields: nil, quota_user: nil, options: nil, &block)
973
+ command = make_simple_command(:delete, 'v1/{+name}', options)
974
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
975
+ command.response_class = Google::Apis::DatacatalogV1::Empty
976
+ command.params['name'] = name unless name.nil?
977
+ command.query['fields'] = fields unless fields.nil?
978
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
979
+ execute_or_queue_command(command, &block)
980
+ end
981
+
982
+ # Lists tags assigned to an Entry.
983
+ # @param [String] parent
984
+ # Required. The name of the Data Catalog resource to list the tags of. The
985
+ # resource can be an Entry or an EntryGroup (without `/entries/`entries`` at the
986
+ # end).
987
+ # @param [Fixnum] page_size
988
+ # The maximum number of tags to return. Default is 10. Maximum limit is 1000.
989
+ # @param [String] page_token
990
+ # Pagination token that specifies the next page to return. If empty, the first
991
+ # page is returned.
992
+ # @param [String] fields
993
+ # Selector specifying which fields to include in a partial response.
994
+ # @param [String] quota_user
995
+ # Available to use for quota purposes for server-side applications. Can be any
996
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
997
+ # @param [Google::Apis::RequestOptions] options
998
+ # Request-specific options
999
+ #
1000
+ # @yield [result, err] Result & error if block supplied
1001
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse] parsed result object
1002
+ # @yieldparam err [StandardError] error object if request failed
1003
+ #
1004
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse]
1005
+ #
1006
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1007
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1008
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1009
+ def list_project_location_entry_group_tags(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1010
+ command = make_simple_command(:get, 'v1/{+parent}/tags', options)
1011
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse::Representation
1012
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTagsResponse
1013
+ command.params['parent'] = parent unless parent.nil?
1014
+ command.query['pageSize'] = page_size unless page_size.nil?
1015
+ command.query['pageToken'] = page_token unless page_token.nil?
1016
+ command.query['fields'] = fields unless fields.nil?
1017
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1018
+ execute_or_queue_command(command, &block)
1019
+ end
1020
+
1021
+ # Updates an existing tag.
1022
+ # @param [String] name
1023
+ # The resource name of the tag in URL format where tag ID is a system-generated
1024
+ # identifier. Note: The tag itself might not be stored in the location specified
1025
+ # in its name.
1026
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] google_cloud_datacatalog_v1_tag_object
1027
+ # @param [String] update_mask
1028
+ # Names of fields whose values to overwrite on a tag. Currently, a tag has the
1029
+ # only modifiable field with the name `fields`. In general, if this parameter is
1030
+ # absent or empty, all modifiable fields are overwritten. If such fields are non-
1031
+ # required and omitted in the request body, their values are emptied.
1032
+ # @param [String] fields
1033
+ # Selector specifying which fields to include in a partial response.
1034
+ # @param [String] quota_user
1035
+ # Available to use for quota purposes for server-side applications. Can be any
1036
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1037
+ # @param [Google::Apis::RequestOptions] options
1038
+ # Request-specific options
1039
+ #
1040
+ # @yield [result, err] Result & error if block supplied
1041
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag] parsed result object
1042
+ # @yieldparam err [StandardError] error object if request failed
1043
+ #
1044
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag]
1045
+ #
1046
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1047
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1048
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1049
+ def patch_project_location_entry_group_tag(name, google_cloud_datacatalog_v1_tag_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1050
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1051
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
1052
+ command.request_object = google_cloud_datacatalog_v1_tag_object
1053
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag::Representation
1054
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Tag
1055
+ command.params['name'] = name unless name.nil?
1056
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1057
+ command.query['fields'] = fields unless fields.nil?
1058
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1059
+ execute_or_queue_command(command, &block)
1060
+ end
1061
+
1062
+ # Creates a tag template. You must enable the Data Catalog API in the project
1063
+ # identified by the `parent` parameter. For more information, see [Data Catalog
1064
+ # resource project] (https://cloud.google.com/data-catalog/docs/concepts/
1065
+ # resource-project).
1066
+ # @param [String] parent
1067
+ # Required. The name of the project and the template location [region](https://
1068
+ # cloud.google.com/data-catalog/docs/concepts/regions).
1069
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate] google_cloud_datacatalog_v1_tag_template_object
1070
+ # @param [String] tag_template_id
1071
+ # Required. The ID of the tag template to create. The ID must contain only
1072
+ # lowercase letters (a-z), numbers (0-9), or underscores (_), and must start
1073
+ # with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-
1074
+ # 8.
1075
+ # @param [String] fields
1076
+ # Selector specifying which fields to include in a partial response.
1077
+ # @param [String] quota_user
1078
+ # Available to use for quota purposes for server-side applications. Can be any
1079
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1080
+ # @param [Google::Apis::RequestOptions] options
1081
+ # Request-specific options
1082
+ #
1083
+ # @yield [result, err] Result & error if block supplied
1084
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate] parsed result object
1085
+ # @yieldparam err [StandardError] error object if request failed
1086
+ #
1087
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate]
1088
+ #
1089
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1090
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1091
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1092
+ def create_project_location_tag_template(parent, google_cloud_datacatalog_v1_tag_template_object = nil, tag_template_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1093
+ command = make_simple_command(:post, 'v1/{+parent}/tagTemplates', options)
1094
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate::Representation
1095
+ command.request_object = google_cloud_datacatalog_v1_tag_template_object
1096
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate::Representation
1097
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate
1098
+ command.params['parent'] = parent unless parent.nil?
1099
+ command.query['tagTemplateId'] = tag_template_id unless tag_template_id.nil?
1100
+ command.query['fields'] = fields unless fields.nil?
1101
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1102
+ execute_or_queue_command(command, &block)
1103
+ end
1104
+
1105
+ # Deletes a tag template and all tags that use it. You must enable the Data
1106
+ # Catalog API in the project identified by the `name` parameter. For more
1107
+ # information, see [Data Catalog resource project](https://cloud.google.com/data-
1108
+ # catalog/docs/concepts/resource-project).
1109
+ # @param [String] name
1110
+ # Required. The name of the tag template to delete.
1111
+ # @param [Boolean] force
1112
+ # Required. If true, deletes all tags that use this template. Currently, `true`
1113
+ # is the only supported value.
1114
+ # @param [String] fields
1115
+ # Selector specifying which fields to include in a partial response.
1116
+ # @param [String] quota_user
1117
+ # Available to use for quota purposes for server-side applications. Can be any
1118
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1119
+ # @param [Google::Apis::RequestOptions] options
1120
+ # Request-specific options
1121
+ #
1122
+ # @yield [result, err] Result & error if block supplied
1123
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
1124
+ # @yieldparam err [StandardError] error object if request failed
1125
+ #
1126
+ # @return [Google::Apis::DatacatalogV1::Empty]
1127
+ #
1128
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1129
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1130
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1131
+ def delete_project_location_tag_template(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
1132
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1133
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
1134
+ command.response_class = Google::Apis::DatacatalogV1::Empty
1135
+ command.params['name'] = name unless name.nil?
1136
+ command.query['force'] = force unless force.nil?
1137
+ command.query['fields'] = fields unless fields.nil?
1138
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1139
+ execute_or_queue_command(command, &block)
1140
+ end
1141
+
1142
+ # Gets a tag template.
1143
+ # @param [String] name
1144
+ # Required. The name of the tag template to get.
1145
+ # @param [String] fields
1146
+ # Selector specifying which fields to include in a partial response.
1147
+ # @param [String] quota_user
1148
+ # Available to use for quota purposes for server-side applications. Can be any
1149
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1150
+ # @param [Google::Apis::RequestOptions] options
1151
+ # Request-specific options
1152
+ #
1153
+ # @yield [result, err] Result & error if block supplied
1154
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate] parsed result object
1155
+ # @yieldparam err [StandardError] error object if request failed
1156
+ #
1157
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate]
1158
+ #
1159
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1160
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1161
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1162
+ def get_project_location_tag_template(name, fields: nil, quota_user: nil, options: nil, &block)
1163
+ command = make_simple_command(:get, 'v1/{+name}', options)
1164
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate::Representation
1165
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate
1166
+ command.params['name'] = name unless name.nil?
1167
+ command.query['fields'] = fields unless fields.nil?
1168
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1169
+ execute_or_queue_command(command, &block)
1170
+ end
1171
+
1172
+ # Gets the access control policy for a resource. May return: * A`NOT_FOUND`
1173
+ # error if the resource doesn't exist or you don't have the permission to view
1174
+ # it. * An empty policy if the resource exists but doesn't have a set policy.
1175
+ # Supported resources are: - Tag templates - Entry groups Note: This method
1176
+ # doesn't get policies from Google Cloud Platform resources ingested into Data
1177
+ # Catalog. To call this method, you must have the following Google IAM
1178
+ # permissions: - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
1179
+ # templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry
1180
+ # groups.
1181
+ # @param [String] resource
1182
+ # REQUIRED: The resource for which the policy is being requested. See the
1183
+ # operation documentation for the appropriate value for this field.
1184
+ # @param [Google::Apis::DatacatalogV1::GetIamPolicyRequest] get_iam_policy_request_object
1185
+ # @param [String] fields
1186
+ # Selector specifying which fields to include in a partial response.
1187
+ # @param [String] quota_user
1188
+ # Available to use for quota purposes for server-side applications. Can be any
1189
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1190
+ # @param [Google::Apis::RequestOptions] options
1191
+ # Request-specific options
1192
+ #
1193
+ # @yield [result, err] Result & error if block supplied
1194
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
1195
+ # @yieldparam err [StandardError] error object if request failed
1196
+ #
1197
+ # @return [Google::Apis::DatacatalogV1::Policy]
1198
+ #
1199
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1200
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1201
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1202
+ def get_tag_template_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1203
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
1204
+ command.request_representation = Google::Apis::DatacatalogV1::GetIamPolicyRequest::Representation
1205
+ command.request_object = get_iam_policy_request_object
1206
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
1207
+ command.response_class = Google::Apis::DatacatalogV1::Policy
1208
+ command.params['resource'] = resource unless resource.nil?
1209
+ command.query['fields'] = fields unless fields.nil?
1210
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1211
+ execute_or_queue_command(command, &block)
1212
+ end
1213
+
1214
+ # Updates a tag template. You can't update template fields with this method.
1215
+ # These fields are separate resources with their own create, update, and delete
1216
+ # methods. You must enable the Data Catalog API in the project identified by the
1217
+ # `tag_template.name` parameter. For more information, see [Data Catalog
1218
+ # resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-
1219
+ # project).
1220
+ # @param [String] name
1221
+ # The resource name of the tag template in URL format. Note: The tag template
1222
+ # itself and its child resources might not be stored in the location specified
1223
+ # in its name.
1224
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate] google_cloud_datacatalog_v1_tag_template_object
1225
+ # @param [String] update_mask
1226
+ # Names of fields whose values to overwrite on a tag template. Currently, only `
1227
+ # display_name` can be overwritten. If this parameter is absent or empty, all
1228
+ # modifiable fields are overwritten. If such fields are non-required and omitted
1229
+ # in the request body, their values are emptied.
1230
+ # @param [String] fields
1231
+ # Selector specifying which fields to include in a partial response.
1232
+ # @param [String] quota_user
1233
+ # Available to use for quota purposes for server-side applications. Can be any
1234
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1235
+ # @param [Google::Apis::RequestOptions] options
1236
+ # Request-specific options
1237
+ #
1238
+ # @yield [result, err] Result & error if block supplied
1239
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate] parsed result object
1240
+ # @yieldparam err [StandardError] error object if request failed
1241
+ #
1242
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate]
1243
+ #
1244
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1245
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1246
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1247
+ def patch_project_location_tag_template(name, google_cloud_datacatalog_v1_tag_template_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1248
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1249
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate::Representation
1250
+ command.request_object = google_cloud_datacatalog_v1_tag_template_object
1251
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate::Representation
1252
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplate
1253
+ command.params['name'] = name unless name.nil?
1254
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1255
+ command.query['fields'] = fields unless fields.nil?
1256
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1257
+ execute_or_queue_command(command, &block)
1258
+ end
1259
+
1260
+ # Sets an access control policy for a resource. Replaces any existing policy.
1261
+ # Supported resources are: - Tag templates - Entry groups Note: This method sets
1262
+ # policies only within Data Catalog and can't be used to manage policies in
1263
+ # BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform
1264
+ # resources synced with the Data Catalog. To call this method, you must have the
1265
+ # following Google IAM permissions: - `datacatalog.tagTemplates.setIamPolicy` to
1266
+ # set policies on tag templates. - `datacatalog.entryGroups.setIamPolicy` to set
1267
+ # policies on entry groups.
1268
+ # @param [String] resource
1269
+ # REQUIRED: The resource for which the policy is being specified. See the
1270
+ # operation documentation for the appropriate value for this field.
1271
+ # @param [Google::Apis::DatacatalogV1::SetIamPolicyRequest] set_iam_policy_request_object
1272
+ # @param [String] fields
1273
+ # Selector specifying which fields to include in a partial response.
1274
+ # @param [String] quota_user
1275
+ # Available to use for quota purposes for server-side applications. Can be any
1276
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1277
+ # @param [Google::Apis::RequestOptions] options
1278
+ # Request-specific options
1279
+ #
1280
+ # @yield [result, err] Result & error if block supplied
1281
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
1282
+ # @yieldparam err [StandardError] error object if request failed
1283
+ #
1284
+ # @return [Google::Apis::DatacatalogV1::Policy]
1285
+ #
1286
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1287
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1288
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1289
+ def set_tag_template_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1290
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1291
+ command.request_representation = Google::Apis::DatacatalogV1::SetIamPolicyRequest::Representation
1292
+ command.request_object = set_iam_policy_request_object
1293
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
1294
+ command.response_class = Google::Apis::DatacatalogV1::Policy
1295
+ command.params['resource'] = resource unless resource.nil?
1296
+ command.query['fields'] = fields unless fields.nil?
1297
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1298
+ execute_or_queue_command(command, &block)
1299
+ end
1300
+
1301
+ # Gets your permissions on a resource. Returns an empty set of permissions if
1302
+ # the resource doesn't exist. Supported resources are: - Tag templates - Entry
1303
+ # groups Note: This method gets policies only within Data Catalog and can't be
1304
+ # used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any
1305
+ # external Google Cloud Platform resources ingested into Data Catalog. No Google
1306
+ # IAM permissions are required to call this method.
1307
+ # @param [String] resource
1308
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1309
+ # operation documentation for the appropriate value for this field.
1310
+ # @param [Google::Apis::DatacatalogV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1311
+ # @param [String] fields
1312
+ # Selector specifying which fields to include in a partial response.
1313
+ # @param [String] quota_user
1314
+ # Available to use for quota purposes for server-side applications. Can be any
1315
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1316
+ # @param [Google::Apis::RequestOptions] options
1317
+ # Request-specific options
1318
+ #
1319
+ # @yield [result, err] Result & error if block supplied
1320
+ # @yieldparam result [Google::Apis::DatacatalogV1::TestIamPermissionsResponse] parsed result object
1321
+ # @yieldparam err [StandardError] error object if request failed
1322
+ #
1323
+ # @return [Google::Apis::DatacatalogV1::TestIamPermissionsResponse]
1324
+ #
1325
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1326
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1327
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1328
+ def test_tag_template_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1329
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1330
+ command.request_representation = Google::Apis::DatacatalogV1::TestIamPermissionsRequest::Representation
1331
+ command.request_object = test_iam_permissions_request_object
1332
+ command.response_representation = Google::Apis::DatacatalogV1::TestIamPermissionsResponse::Representation
1333
+ command.response_class = Google::Apis::DatacatalogV1::TestIamPermissionsResponse
1334
+ command.params['resource'] = resource unless resource.nil?
1335
+ command.query['fields'] = fields unless fields.nil?
1336
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1337
+ execute_or_queue_command(command, &block)
1338
+ end
1339
+
1340
+ # Creates a field in a tag template. You must enable the Data Catalog API in the
1341
+ # project identified by the `parent` parameter. For more information, see [Data
1342
+ # Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/
1343
+ # resource-project).
1344
+ # @param [String] parent
1345
+ # Required. The name of the project and the template location [region](https://
1346
+ # cloud.google.com/data-catalog/docs/concepts/regions).
1347
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField] google_cloud_datacatalog_v1_tag_template_field_object
1348
+ # @param [String] tag_template_field_id
1349
+ # Required. The ID of the tag template field to create. Note: Adding a required
1350
+ # field to an existing template is *not* allowed. Field IDs can contain letters (
1351
+ # both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-).
1352
+ # Field IDs must be at least 1 character long and at most 128 characters long.
1353
+ # Field IDs must also be unique within their template.
1354
+ # @param [String] fields
1355
+ # Selector specifying which fields to include in a partial response.
1356
+ # @param [String] quota_user
1357
+ # Available to use for quota purposes for server-side applications. Can be any
1358
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1359
+ # @param [Google::Apis::RequestOptions] options
1360
+ # Request-specific options
1361
+ #
1362
+ # @yield [result, err] Result & error if block supplied
1363
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField] parsed result object
1364
+ # @yieldparam err [StandardError] error object if request failed
1365
+ #
1366
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField]
1367
+ #
1368
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1369
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1370
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1371
+ def create_project_location_tag_template_field(parent, google_cloud_datacatalog_v1_tag_template_field_object = nil, tag_template_field_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1372
+ command = make_simple_command(:post, 'v1/{+parent}/fields', options)
1373
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField::Representation
1374
+ command.request_object = google_cloud_datacatalog_v1_tag_template_field_object
1375
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField::Representation
1376
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField
1377
+ command.params['parent'] = parent unless parent.nil?
1378
+ command.query['tagTemplateFieldId'] = tag_template_field_id unless tag_template_field_id.nil?
1379
+ command.query['fields'] = fields unless fields.nil?
1380
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1381
+ execute_or_queue_command(command, &block)
1382
+ end
1383
+
1384
+ # Deletes a field in a tag template and all uses of this field from the tags
1385
+ # based on this template. You must enable the Data Catalog API in the project
1386
+ # identified by the `name` parameter. For more information, see [Data Catalog
1387
+ # resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-
1388
+ # project).
1389
+ # @param [String] name
1390
+ # Required. The name of the tag template field to delete.
1391
+ # @param [Boolean] force
1392
+ # Required. If true, deletes this field from any tags that use it. Currently, `
1393
+ # true` is the only supported value.
1394
+ # @param [String] fields
1395
+ # Selector specifying which fields to include in a partial response.
1396
+ # @param [String] quota_user
1397
+ # Available to use for quota purposes for server-side applications. Can be any
1398
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1399
+ # @param [Google::Apis::RequestOptions] options
1400
+ # Request-specific options
1401
+ #
1402
+ # @yield [result, err] Result & error if block supplied
1403
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
1404
+ # @yieldparam err [StandardError] error object if request failed
1405
+ #
1406
+ # @return [Google::Apis::DatacatalogV1::Empty]
1407
+ #
1408
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1409
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1410
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1411
+ def delete_project_location_tag_template_field(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
1412
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1413
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
1414
+ command.response_class = Google::Apis::DatacatalogV1::Empty
1415
+ command.params['name'] = name unless name.nil?
1416
+ command.query['force'] = force unless force.nil?
1417
+ command.query['fields'] = fields unless fields.nil?
1418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1419
+ execute_or_queue_command(command, &block)
1420
+ end
1421
+
1422
+ # Updates a field in a tag template. You can't update the field type with this
1423
+ # method. You must enable the Data Catalog API in the project identified by the `
1424
+ # name` parameter. For more information, see [Data Catalog resource project](
1425
+ # https://cloud.google.com/data-catalog/docs/concepts/resource-project).
1426
+ # @param [String] name
1427
+ # Required. The name of the tag template field.
1428
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField] google_cloud_datacatalog_v1_tag_template_field_object
1429
+ # @param [String] update_mask
1430
+ # Optional. Names of fields whose values to overwrite on an individual field of
1431
+ # a tag template. The following fields are modifiable: * `display_name` * `type.
1432
+ # enum_type` * `is_required` If this parameter is absent or empty, all
1433
+ # modifiable fields are overwritten. If such fields are non-required and omitted
1434
+ # in the request body, their values are emptied with one exception: when
1435
+ # updating an enum type, the provided values are merged with the existing values.
1436
+ # Therefore, enum values can only be added, existing enum values cannot be
1437
+ # deleted or renamed. Additionally, updating a template field from optional to
1438
+ # required is *not* allowed.
1439
+ # @param [String] fields
1440
+ # Selector specifying which fields to include in a partial response.
1441
+ # @param [String] quota_user
1442
+ # Available to use for quota purposes for server-side applications. Can be any
1443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1444
+ # @param [Google::Apis::RequestOptions] options
1445
+ # Request-specific options
1446
+ #
1447
+ # @yield [result, err] Result & error if block supplied
1448
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField] parsed result object
1449
+ # @yieldparam err [StandardError] error object if request failed
1450
+ #
1451
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField]
1452
+ #
1453
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1454
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1455
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1456
+ def patch_project_location_tag_template_field(name, google_cloud_datacatalog_v1_tag_template_field_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1457
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1458
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField::Representation
1459
+ command.request_object = google_cloud_datacatalog_v1_tag_template_field_object
1460
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField::Representation
1461
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField
1462
+ command.params['name'] = name unless name.nil?
1463
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1464
+ command.query['fields'] = fields unless fields.nil?
1465
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1466
+ execute_or_queue_command(command, &block)
1467
+ end
1468
+
1469
+ # Renames a field in a tag template. You must enable the Data Catalog API in the
1470
+ # project identified by the `name` parameter. For more information, see [Data
1471
+ # Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/
1472
+ # resource-project).
1473
+ # @param [String] name
1474
+ # Required. The name of the tag template.
1475
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1RenameTagTemplateFieldRequest] google_cloud_datacatalog_v1_rename_tag_template_field_request_object
1476
+ # @param [String] fields
1477
+ # Selector specifying which fields to include in a partial response.
1478
+ # @param [String] quota_user
1479
+ # Available to use for quota purposes for server-side applications. Can be any
1480
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1481
+ # @param [Google::Apis::RequestOptions] options
1482
+ # Request-specific options
1483
+ #
1484
+ # @yield [result, err] Result & error if block supplied
1485
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField] parsed result object
1486
+ # @yieldparam err [StandardError] error object if request failed
1487
+ #
1488
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField]
1489
+ #
1490
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1491
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1492
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1493
+ def rename_project_location_tag_template_field(name, google_cloud_datacatalog_v1_rename_tag_template_field_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1494
+ command = make_simple_command(:post, 'v1/{+name}:rename', options)
1495
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1RenameTagTemplateFieldRequest::Representation
1496
+ command.request_object = google_cloud_datacatalog_v1_rename_tag_template_field_request_object
1497
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField::Representation
1498
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField
1499
+ command.params['name'] = name unless name.nil?
1500
+ command.query['fields'] = fields unless fields.nil?
1501
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1502
+ execute_or_queue_command(command, &block)
1503
+ end
1504
+
1505
+ # Renames an enum value in a tag template. Within a single enum field, enum
1506
+ # values must be unique.
1507
+ # @param [String] name
1508
+ # Required. The name of the enum field value.
1509
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1RenameTagTemplateFieldEnumValueRequest] google_cloud_datacatalog_v1_rename_tag_template_field_enum_value_request_object
1510
+ # @param [String] fields
1511
+ # Selector specifying which fields to include in a partial response.
1512
+ # @param [String] quota_user
1513
+ # Available to use for quota purposes for server-side applications. Can be any
1514
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1515
+ # @param [Google::Apis::RequestOptions] options
1516
+ # Request-specific options
1517
+ #
1518
+ # @yield [result, err] Result & error if block supplied
1519
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField] parsed result object
1520
+ # @yieldparam err [StandardError] error object if request failed
1521
+ #
1522
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField]
1523
+ #
1524
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1525
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1526
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1527
+ def rename_project_location_tag_template_field_enum_value(name, google_cloud_datacatalog_v1_rename_tag_template_field_enum_value_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1528
+ command = make_simple_command(:post, 'v1/{+name}:rename', options)
1529
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1RenameTagTemplateFieldEnumValueRequest::Representation
1530
+ command.request_object = google_cloud_datacatalog_v1_rename_tag_template_field_enum_value_request_object
1531
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField::Representation
1532
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1TagTemplateField
1533
+ command.params['name'] = name unless name.nil?
1534
+ command.query['fields'] = fields unless fields.nil?
1535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1536
+ execute_or_queue_command(command, &block)
1537
+ end
1538
+
1539
+ # Creates a taxonomy in a specified project. The taxonomy is initially empty,
1540
+ # that is, it doesn't contain policy tags.
1541
+ # @param [String] parent
1542
+ # Required. Resource name of the project that the taxonomy will belong to.
1543
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy] google_cloud_datacatalog_v1_taxonomy_object
1544
+ # @param [String] fields
1545
+ # Selector specifying which fields to include in a partial response.
1546
+ # @param [String] quota_user
1547
+ # Available to use for quota purposes for server-side applications. Can be any
1548
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1549
+ # @param [Google::Apis::RequestOptions] options
1550
+ # Request-specific options
1551
+ #
1552
+ # @yield [result, err] Result & error if block supplied
1553
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy] parsed result object
1554
+ # @yieldparam err [StandardError] error object if request failed
1555
+ #
1556
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy]
1557
+ #
1558
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1559
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1560
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1561
+ def create_project_location_taxonomy(parent, google_cloud_datacatalog_v1_taxonomy_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1562
+ command = make_simple_command(:post, 'v1/{+parent}/taxonomies', options)
1563
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy::Representation
1564
+ command.request_object = google_cloud_datacatalog_v1_taxonomy_object
1565
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy::Representation
1566
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy
1567
+ command.params['parent'] = parent unless parent.nil?
1568
+ command.query['fields'] = fields unless fields.nil?
1569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1570
+ execute_or_queue_command(command, &block)
1571
+ end
1572
+
1573
+ # Deletes a taxonomy, including all policy tags in this taxonomy, their
1574
+ # associated policies, and the policy tags references from BigQuery columns.
1575
+ # @param [String] name
1576
+ # Required. Resource name of the taxonomy to delete. Note: All policy tags in
1577
+ # this taxonomy are also deleted.
1578
+ # @param [String] fields
1579
+ # Selector specifying which fields to include in a partial response.
1580
+ # @param [String] quota_user
1581
+ # Available to use for quota purposes for server-side applications. Can be any
1582
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1583
+ # @param [Google::Apis::RequestOptions] options
1584
+ # Request-specific options
1585
+ #
1586
+ # @yield [result, err] Result & error if block supplied
1587
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
1588
+ # @yieldparam err [StandardError] error object if request failed
1589
+ #
1590
+ # @return [Google::Apis::DatacatalogV1::Empty]
1591
+ #
1592
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1593
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1594
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1595
+ def delete_project_location_taxonomy(name, fields: nil, quota_user: nil, options: nil, &block)
1596
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1597
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
1598
+ command.response_class = Google::Apis::DatacatalogV1::Empty
1599
+ command.params['name'] = name unless name.nil?
1600
+ command.query['fields'] = fields unless fields.nil?
1601
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1602
+ execute_or_queue_command(command, &block)
1603
+ end
1604
+
1605
+ # Exports taxonomies in the requested type and returns them, including their
1606
+ # policy tags. The requested taxonomies must belong to the same project. This
1607
+ # method generates `SerializedTaxonomy` protocol buffers with nested policy tags
1608
+ # that can be used as input for `ImportTaxonomies` calls.
1609
+ # @param [String] parent
1610
+ # Required. Resource name of the project that the exported taxonomies belong to.
1611
+ # @param [Boolean] serialized_taxonomies
1612
+ # Serialized export taxonomies that contain all the policy tags as nested
1613
+ # protocol buffers.
1614
+ # @param [Array<String>, String] taxonomies
1615
+ # Required. Resource names of the taxonomies to export.
1616
+ # @param [String] fields
1617
+ # Selector specifying which fields to include in a partial response.
1618
+ # @param [String] quota_user
1619
+ # Available to use for quota purposes for server-side applications. Can be any
1620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1621
+ # @param [Google::Apis::RequestOptions] options
1622
+ # Request-specific options
1623
+ #
1624
+ # @yield [result, err] Result & error if block supplied
1625
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ExportTaxonomiesResponse] parsed result object
1626
+ # @yieldparam err [StandardError] error object if request failed
1627
+ #
1628
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ExportTaxonomiesResponse]
1629
+ #
1630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1633
+ def export_project_location_taxonomy(parent, serialized_taxonomies: nil, taxonomies: nil, fields: nil, quota_user: nil, options: nil, &block)
1634
+ command = make_simple_command(:get, 'v1/{+parent}/taxonomies:export', options)
1635
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ExportTaxonomiesResponse::Representation
1636
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ExportTaxonomiesResponse
1637
+ command.params['parent'] = parent unless parent.nil?
1638
+ command.query['serializedTaxonomies'] = serialized_taxonomies unless serialized_taxonomies.nil?
1639
+ command.query['taxonomies'] = taxonomies unless taxonomies.nil?
1640
+ command.query['fields'] = fields unless fields.nil?
1641
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1642
+ execute_or_queue_command(command, &block)
1643
+ end
1644
+
1645
+ # Gets a taxonomy.
1646
+ # @param [String] name
1647
+ # Required. Resource name of the taxonomy to get.
1648
+ # @param [String] fields
1649
+ # Selector specifying which fields to include in a partial response.
1650
+ # @param [String] quota_user
1651
+ # Available to use for quota purposes for server-side applications. Can be any
1652
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1653
+ # @param [Google::Apis::RequestOptions] options
1654
+ # Request-specific options
1655
+ #
1656
+ # @yield [result, err] Result & error if block supplied
1657
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy] parsed result object
1658
+ # @yieldparam err [StandardError] error object if request failed
1659
+ #
1660
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy]
1661
+ #
1662
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1663
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1664
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1665
+ def get_project_location_taxonomy(name, fields: nil, quota_user: nil, options: nil, &block)
1666
+ command = make_simple_command(:get, 'v1/{+name}', options)
1667
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy::Representation
1668
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy
1669
+ command.params['name'] = name unless name.nil?
1670
+ command.query['fields'] = fields unless fields.nil?
1671
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1672
+ execute_or_queue_command(command, &block)
1673
+ end
1674
+
1675
+ # Gets the IAM policy for a policy tag or a taxonomy.
1676
+ # @param [String] resource
1677
+ # REQUIRED: The resource for which the policy is being requested. See the
1678
+ # operation documentation for the appropriate value for this field.
1679
+ # @param [Google::Apis::DatacatalogV1::GetIamPolicyRequest] get_iam_policy_request_object
1680
+ # @param [String] fields
1681
+ # Selector specifying which fields to include in a partial response.
1682
+ # @param [String] quota_user
1683
+ # Available to use for quota purposes for server-side applications. Can be any
1684
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1685
+ # @param [Google::Apis::RequestOptions] options
1686
+ # Request-specific options
1687
+ #
1688
+ # @yield [result, err] Result & error if block supplied
1689
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
1690
+ # @yieldparam err [StandardError] error object if request failed
1691
+ #
1692
+ # @return [Google::Apis::DatacatalogV1::Policy]
1693
+ #
1694
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1695
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1696
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1697
+ def get_taxonomy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1698
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
1699
+ command.request_representation = Google::Apis::DatacatalogV1::GetIamPolicyRequest::Representation
1700
+ command.request_object = get_iam_policy_request_object
1701
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
1702
+ command.response_class = Google::Apis::DatacatalogV1::Policy
1703
+ command.params['resource'] = resource unless resource.nil?
1704
+ command.query['fields'] = fields unless fields.nil?
1705
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1706
+ execute_or_queue_command(command, &block)
1707
+ end
1708
+
1709
+ # Creates new taxonomies (including their policy tags) in a given project by
1710
+ # importing from inlined or cross-regional sources. For a cross-regional source,
1711
+ # new taxonomies are created by copying from a source in another region. For an
1712
+ # inlined source, taxonomies and policy tags are created in bulk using nested
1713
+ # protocol buffer structures.
1714
+ # @param [String] parent
1715
+ # Required. Resource name of project that the imported taxonomies will belong to.
1716
+ #
1717
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ImportTaxonomiesRequest] google_cloud_datacatalog_v1_import_taxonomies_request_object
1718
+ # @param [String] fields
1719
+ # Selector specifying which fields to include in a partial response.
1720
+ # @param [String] quota_user
1721
+ # Available to use for quota purposes for server-side applications. Can be any
1722
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1723
+ # @param [Google::Apis::RequestOptions] options
1724
+ # Request-specific options
1725
+ #
1726
+ # @yield [result, err] Result & error if block supplied
1727
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ImportTaxonomiesResponse] parsed result object
1728
+ # @yieldparam err [StandardError] error object if request failed
1729
+ #
1730
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ImportTaxonomiesResponse]
1731
+ #
1732
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1733
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1734
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1735
+ def import_project_location_taxonomy(parent, google_cloud_datacatalog_v1_import_taxonomies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1736
+ command = make_simple_command(:post, 'v1/{+parent}/taxonomies:import', options)
1737
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ImportTaxonomiesRequest::Representation
1738
+ command.request_object = google_cloud_datacatalog_v1_import_taxonomies_request_object
1739
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ImportTaxonomiesResponse::Representation
1740
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ImportTaxonomiesResponse
1741
+ command.params['parent'] = parent unless parent.nil?
1742
+ command.query['fields'] = fields unless fields.nil?
1743
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1744
+ execute_or_queue_command(command, &block)
1745
+ end
1746
+
1747
+ # Lists all taxonomies in a project in a particular location that you have a
1748
+ # permission to view.
1749
+ # @param [String] parent
1750
+ # Required. Resource name of the project to list the taxonomies of.
1751
+ # @param [Fixnum] page_size
1752
+ # The maximum number of items to return. Must be a value between 1 and 1000
1753
+ # inclusively. If not set, defaults to 50.
1754
+ # @param [String] page_token
1755
+ # The pagination token of the next results page. If not set, the first page is
1756
+ # returned. The token is returned in the response to a previous list request.
1757
+ # @param [String] fields
1758
+ # Selector specifying which fields to include in a partial response.
1759
+ # @param [String] quota_user
1760
+ # Available to use for quota purposes for server-side applications. Can be any
1761
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1762
+ # @param [Google::Apis::RequestOptions] options
1763
+ # Request-specific options
1764
+ #
1765
+ # @yield [result, err] Result & error if block supplied
1766
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTaxonomiesResponse] parsed result object
1767
+ # @yieldparam err [StandardError] error object if request failed
1768
+ #
1769
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTaxonomiesResponse]
1770
+ #
1771
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1772
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1773
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1774
+ def list_project_location_taxonomies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1775
+ command = make_simple_command(:get, 'v1/{+parent}/taxonomies', options)
1776
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTaxonomiesResponse::Representation
1777
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListTaxonomiesResponse
1778
+ command.params['parent'] = parent unless parent.nil?
1779
+ command.query['pageSize'] = page_size unless page_size.nil?
1780
+ command.query['pageToken'] = page_token unless page_token.nil?
1781
+ command.query['fields'] = fields unless fields.nil?
1782
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1783
+ execute_or_queue_command(command, &block)
1784
+ end
1785
+
1786
+ # Updates a taxonomy, including its display name, description, and activated
1787
+ # policy types.
1788
+ # @param [String] name
1789
+ # Output only. Resource name of this taxonomy in URL format. Note: Policy tag
1790
+ # manager generates unique taxonomy IDs.
1791
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy] google_cloud_datacatalog_v1_taxonomy_object
1792
+ # @param [String] update_mask
1793
+ # Specifies fields to update. If not set, defaults to all fields you can update.
1794
+ # For more information, see [FieldMask] (https://developers.google.com/protocol-
1795
+ # buffers/docs/reference/google.protobuf#fieldmask).
1796
+ # @param [String] fields
1797
+ # Selector specifying which fields to include in a partial response.
1798
+ # @param [String] quota_user
1799
+ # Available to use for quota purposes for server-side applications. Can be any
1800
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1801
+ # @param [Google::Apis::RequestOptions] options
1802
+ # Request-specific options
1803
+ #
1804
+ # @yield [result, err] Result & error if block supplied
1805
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy] parsed result object
1806
+ # @yieldparam err [StandardError] error object if request failed
1807
+ #
1808
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy]
1809
+ #
1810
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1811
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1812
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1813
+ def patch_project_location_taxonomy(name, google_cloud_datacatalog_v1_taxonomy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1814
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1815
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy::Representation
1816
+ command.request_object = google_cloud_datacatalog_v1_taxonomy_object
1817
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy::Representation
1818
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy
1819
+ command.params['name'] = name unless name.nil?
1820
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1821
+ command.query['fields'] = fields unless fields.nil?
1822
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1823
+ execute_or_queue_command(command, &block)
1824
+ end
1825
+
1826
+ # Replaces (updates) a taxonomy and all its policy tags. The taxonomy and its
1827
+ # entire hierarchy of policy tags must be represented literally by `
1828
+ # SerializedTaxonomy` and the nested `SerializedPolicyTag` messages. This
1829
+ # operation automatically does the following: - Deletes the existing policy tags
1830
+ # that are missing from the `SerializedPolicyTag`. - Creates policy tags that
1831
+ # don't have resource names. They are considered new. - Updates policy tags with
1832
+ # valid resources names accordingly.
1833
+ # @param [String] name
1834
+ # Required. Resource name of the taxonomy to update.
1835
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ReplaceTaxonomyRequest] google_cloud_datacatalog_v1_replace_taxonomy_request_object
1836
+ # @param [String] fields
1837
+ # Selector specifying which fields to include in a partial response.
1838
+ # @param [String] quota_user
1839
+ # Available to use for quota purposes for server-side applications. Can be any
1840
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1841
+ # @param [Google::Apis::RequestOptions] options
1842
+ # Request-specific options
1843
+ #
1844
+ # @yield [result, err] Result & error if block supplied
1845
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy] parsed result object
1846
+ # @yieldparam err [StandardError] error object if request failed
1847
+ #
1848
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy]
1849
+ #
1850
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1851
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1852
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1853
+ def replace_project_location_taxonomy(name, google_cloud_datacatalog_v1_replace_taxonomy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1854
+ command = make_simple_command(:post, 'v1/{+name}:replace', options)
1855
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ReplaceTaxonomyRequest::Representation
1856
+ command.request_object = google_cloud_datacatalog_v1_replace_taxonomy_request_object
1857
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy::Representation
1858
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1Taxonomy
1859
+ command.params['name'] = name unless name.nil?
1860
+ command.query['fields'] = fields unless fields.nil?
1861
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1862
+ execute_or_queue_command(command, &block)
1863
+ end
1864
+
1865
+ # Sets the IAM policy for a policy tag or a taxonomy.
1866
+ # @param [String] resource
1867
+ # REQUIRED: The resource for which the policy is being specified. See the
1868
+ # operation documentation for the appropriate value for this field.
1869
+ # @param [Google::Apis::DatacatalogV1::SetIamPolicyRequest] set_iam_policy_request_object
1870
+ # @param [String] fields
1871
+ # Selector specifying which fields to include in a partial response.
1872
+ # @param [String] quota_user
1873
+ # Available to use for quota purposes for server-side applications. Can be any
1874
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1875
+ # @param [Google::Apis::RequestOptions] options
1876
+ # Request-specific options
1877
+ #
1878
+ # @yield [result, err] Result & error if block supplied
1879
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
1880
+ # @yieldparam err [StandardError] error object if request failed
1881
+ #
1882
+ # @return [Google::Apis::DatacatalogV1::Policy]
1883
+ #
1884
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1885
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1886
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1887
+ def set_taxonomy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1888
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1889
+ command.request_representation = Google::Apis::DatacatalogV1::SetIamPolicyRequest::Representation
1890
+ command.request_object = set_iam_policy_request_object
1891
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
1892
+ command.response_class = Google::Apis::DatacatalogV1::Policy
1893
+ command.params['resource'] = resource unless resource.nil?
1894
+ command.query['fields'] = fields unless fields.nil?
1895
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1896
+ execute_or_queue_command(command, &block)
1897
+ end
1898
+
1899
+ # Returns your permissions on a specified policy tag or taxonomy.
1900
+ # @param [String] resource
1901
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1902
+ # operation documentation for the appropriate value for this field.
1903
+ # @param [Google::Apis::DatacatalogV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1904
+ # @param [String] fields
1905
+ # Selector specifying which fields to include in a partial response.
1906
+ # @param [String] quota_user
1907
+ # Available to use for quota purposes for server-side applications. Can be any
1908
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1909
+ # @param [Google::Apis::RequestOptions] options
1910
+ # Request-specific options
1911
+ #
1912
+ # @yield [result, err] Result & error if block supplied
1913
+ # @yieldparam result [Google::Apis::DatacatalogV1::TestIamPermissionsResponse] parsed result object
1914
+ # @yieldparam err [StandardError] error object if request failed
1915
+ #
1916
+ # @return [Google::Apis::DatacatalogV1::TestIamPermissionsResponse]
1917
+ #
1918
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1919
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1920
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1921
+ def test_taxonomy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1922
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1923
+ command.request_representation = Google::Apis::DatacatalogV1::TestIamPermissionsRequest::Representation
1924
+ command.request_object = test_iam_permissions_request_object
1925
+ command.response_representation = Google::Apis::DatacatalogV1::TestIamPermissionsResponse::Representation
1926
+ command.response_class = Google::Apis::DatacatalogV1::TestIamPermissionsResponse
1927
+ command.params['resource'] = resource unless resource.nil?
1928
+ command.query['fields'] = fields unless fields.nil?
1929
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1930
+ execute_or_queue_command(command, &block)
1931
+ end
1932
+
1933
+ # Creates a policy tag in a taxonomy.
1934
+ # @param [String] parent
1935
+ # Required. Resource name of the taxonomy that the policy tag will belong to.
1936
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag] google_cloud_datacatalog_v1_policy_tag_object
1937
+ # @param [String] fields
1938
+ # Selector specifying which fields to include in a partial response.
1939
+ # @param [String] quota_user
1940
+ # Available to use for quota purposes for server-side applications. Can be any
1941
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1942
+ # @param [Google::Apis::RequestOptions] options
1943
+ # Request-specific options
1944
+ #
1945
+ # @yield [result, err] Result & error if block supplied
1946
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag] parsed result object
1947
+ # @yieldparam err [StandardError] error object if request failed
1948
+ #
1949
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag]
1950
+ #
1951
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1952
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1953
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1954
+ def create_project_location_taxonomy_policy_tag(parent, google_cloud_datacatalog_v1_policy_tag_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1955
+ command = make_simple_command(:post, 'v1/{+parent}/policyTags', options)
1956
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag::Representation
1957
+ command.request_object = google_cloud_datacatalog_v1_policy_tag_object
1958
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag::Representation
1959
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag
1960
+ command.params['parent'] = parent unless parent.nil?
1961
+ command.query['fields'] = fields unless fields.nil?
1962
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1963
+ execute_or_queue_command(command, &block)
1964
+ end
1965
+
1966
+ # Deletes a policy tag together with the following: * All of its descendant
1967
+ # policy tags, if any * Policies associated with the policy tag and its
1968
+ # descendants * References from BigQuery table schema of the policy tag and its
1969
+ # descendants
1970
+ # @param [String] name
1971
+ # Required. Resource name of the policy tag to delete. Note: All of its
1972
+ # descendant policy tags are also deleted.
1973
+ # @param [String] fields
1974
+ # Selector specifying which fields to include in a partial response.
1975
+ # @param [String] quota_user
1976
+ # Available to use for quota purposes for server-side applications. Can be any
1977
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1978
+ # @param [Google::Apis::RequestOptions] options
1979
+ # Request-specific options
1980
+ #
1981
+ # @yield [result, err] Result & error if block supplied
1982
+ # @yieldparam result [Google::Apis::DatacatalogV1::Empty] parsed result object
1983
+ # @yieldparam err [StandardError] error object if request failed
1984
+ #
1985
+ # @return [Google::Apis::DatacatalogV1::Empty]
1986
+ #
1987
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1988
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1989
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1990
+ def delete_project_location_taxonomy_policy_tag(name, fields: nil, quota_user: nil, options: nil, &block)
1991
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1992
+ command.response_representation = Google::Apis::DatacatalogV1::Empty::Representation
1993
+ command.response_class = Google::Apis::DatacatalogV1::Empty
1994
+ command.params['name'] = name unless name.nil?
1995
+ command.query['fields'] = fields unless fields.nil?
1996
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1997
+ execute_or_queue_command(command, &block)
1998
+ end
1999
+
2000
+ # Gets a policy tag.
2001
+ # @param [String] name
2002
+ # Required. Resource name of the policy tag.
2003
+ # @param [String] fields
2004
+ # Selector specifying which fields to include in a partial response.
2005
+ # @param [String] quota_user
2006
+ # Available to use for quota purposes for server-side applications. Can be any
2007
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2008
+ # @param [Google::Apis::RequestOptions] options
2009
+ # Request-specific options
2010
+ #
2011
+ # @yield [result, err] Result & error if block supplied
2012
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag] parsed result object
2013
+ # @yieldparam err [StandardError] error object if request failed
2014
+ #
2015
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag]
2016
+ #
2017
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2018
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2019
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2020
+ def get_project_location_taxonomy_policy_tag(name, fields: nil, quota_user: nil, options: nil, &block)
2021
+ command = make_simple_command(:get, 'v1/{+name}', options)
2022
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag::Representation
2023
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag
2024
+ command.params['name'] = name unless name.nil?
2025
+ command.query['fields'] = fields unless fields.nil?
2026
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2027
+ execute_or_queue_command(command, &block)
2028
+ end
2029
+
2030
+ # Gets the IAM policy for a policy tag or a taxonomy.
2031
+ # @param [String] resource
2032
+ # REQUIRED: The resource for which the policy is being requested. See the
2033
+ # operation documentation for the appropriate value for this field.
2034
+ # @param [Google::Apis::DatacatalogV1::GetIamPolicyRequest] get_iam_policy_request_object
2035
+ # @param [String] fields
2036
+ # Selector specifying which fields to include in a partial response.
2037
+ # @param [String] quota_user
2038
+ # Available to use for quota purposes for server-side applications. Can be any
2039
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2040
+ # @param [Google::Apis::RequestOptions] options
2041
+ # Request-specific options
2042
+ #
2043
+ # @yield [result, err] Result & error if block supplied
2044
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
2045
+ # @yieldparam err [StandardError] error object if request failed
2046
+ #
2047
+ # @return [Google::Apis::DatacatalogV1::Policy]
2048
+ #
2049
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2050
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2051
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2052
+ def get_policy_tag_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2053
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
2054
+ command.request_representation = Google::Apis::DatacatalogV1::GetIamPolicyRequest::Representation
2055
+ command.request_object = get_iam_policy_request_object
2056
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
2057
+ command.response_class = Google::Apis::DatacatalogV1::Policy
2058
+ command.params['resource'] = resource unless resource.nil?
2059
+ command.query['fields'] = fields unless fields.nil?
2060
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2061
+ execute_or_queue_command(command, &block)
2062
+ end
2063
+
2064
+ # Lists all policy tags in a taxonomy.
2065
+ # @param [String] parent
2066
+ # Required. Resource name of the taxonomy to list the policy tags of.
2067
+ # @param [Fixnum] page_size
2068
+ # The maximum number of items to return. Must be a value between 1 and 1000
2069
+ # inclusively. If not set, defaults to 50.
2070
+ # @param [String] page_token
2071
+ # The pagination token of the next results page. If not set, returns the first
2072
+ # page. The token is returned in the response to a previous list request.
2073
+ # @param [String] fields
2074
+ # Selector specifying which fields to include in a partial response.
2075
+ # @param [String] quota_user
2076
+ # Available to use for quota purposes for server-side applications. Can be any
2077
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2078
+ # @param [Google::Apis::RequestOptions] options
2079
+ # Request-specific options
2080
+ #
2081
+ # @yield [result, err] Result & error if block supplied
2082
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListPolicyTagsResponse] parsed result object
2083
+ # @yieldparam err [StandardError] error object if request failed
2084
+ #
2085
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListPolicyTagsResponse]
2086
+ #
2087
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2088
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2089
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2090
+ def list_project_location_taxonomy_policy_tags(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2091
+ command = make_simple_command(:get, 'v1/{+parent}/policyTags', options)
2092
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListPolicyTagsResponse::Representation
2093
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1ListPolicyTagsResponse
2094
+ command.params['parent'] = parent unless parent.nil?
2095
+ command.query['pageSize'] = page_size unless page_size.nil?
2096
+ command.query['pageToken'] = page_token unless page_token.nil?
2097
+ command.query['fields'] = fields unless fields.nil?
2098
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2099
+ execute_or_queue_command(command, &block)
2100
+ end
2101
+
2102
+ # Updates a policy tag, including its display name, description, and parent
2103
+ # policy tag.
2104
+ # @param [String] name
2105
+ # Output only. Resource name of this policy tag in the URL format. The policy
2106
+ # tag manager generates unique taxonomy IDs and policy tag IDs.
2107
+ # @param [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag] google_cloud_datacatalog_v1_policy_tag_object
2108
+ # @param [String] update_mask
2109
+ # Specifies the fields to update. You can update only display name, description,
2110
+ # and parent policy tag. If not set, defaults to all updatable fields. For more
2111
+ # information, see [FieldMask] (https://developers.google.com/protocol-buffers/
2112
+ # docs/reference/google.protobuf#fieldmask).
2113
+ # @param [String] fields
2114
+ # Selector specifying which fields to include in a partial response.
2115
+ # @param [String] quota_user
2116
+ # Available to use for quota purposes for server-side applications. Can be any
2117
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2118
+ # @param [Google::Apis::RequestOptions] options
2119
+ # Request-specific options
2120
+ #
2121
+ # @yield [result, err] Result & error if block supplied
2122
+ # @yieldparam result [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag] parsed result object
2123
+ # @yieldparam err [StandardError] error object if request failed
2124
+ #
2125
+ # @return [Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag]
2126
+ #
2127
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2128
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2129
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2130
+ def patch_project_location_taxonomy_policy_tag(name, google_cloud_datacatalog_v1_policy_tag_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2131
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2132
+ command.request_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag::Representation
2133
+ command.request_object = google_cloud_datacatalog_v1_policy_tag_object
2134
+ command.response_representation = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag::Representation
2135
+ command.response_class = Google::Apis::DatacatalogV1::GoogleCloudDatacatalogV1PolicyTag
2136
+ command.params['name'] = name unless name.nil?
2137
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2138
+ command.query['fields'] = fields unless fields.nil?
2139
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2140
+ execute_or_queue_command(command, &block)
2141
+ end
2142
+
2143
+ # Sets the IAM policy for a policy tag or a taxonomy.
2144
+ # @param [String] resource
2145
+ # REQUIRED: The resource for which the policy is being specified. See the
2146
+ # operation documentation for the appropriate value for this field.
2147
+ # @param [Google::Apis::DatacatalogV1::SetIamPolicyRequest] set_iam_policy_request_object
2148
+ # @param [String] fields
2149
+ # Selector specifying which fields to include in a partial response.
2150
+ # @param [String] quota_user
2151
+ # Available to use for quota purposes for server-side applications. Can be any
2152
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2153
+ # @param [Google::Apis::RequestOptions] options
2154
+ # Request-specific options
2155
+ #
2156
+ # @yield [result, err] Result & error if block supplied
2157
+ # @yieldparam result [Google::Apis::DatacatalogV1::Policy] parsed result object
2158
+ # @yieldparam err [StandardError] error object if request failed
2159
+ #
2160
+ # @return [Google::Apis::DatacatalogV1::Policy]
2161
+ #
2162
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2163
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2164
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2165
+ def set_policy_tag_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2166
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
2167
+ command.request_representation = Google::Apis::DatacatalogV1::SetIamPolicyRequest::Representation
2168
+ command.request_object = set_iam_policy_request_object
2169
+ command.response_representation = Google::Apis::DatacatalogV1::Policy::Representation
2170
+ command.response_class = Google::Apis::DatacatalogV1::Policy
2171
+ command.params['resource'] = resource unless resource.nil?
2172
+ command.query['fields'] = fields unless fields.nil?
2173
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2174
+ execute_or_queue_command(command, &block)
2175
+ end
2176
+
2177
+ # Returns your permissions on a specified policy tag or taxonomy.
2178
+ # @param [String] resource
2179
+ # REQUIRED: The resource for which the policy detail is being requested. See the
2180
+ # operation documentation for the appropriate value for this field.
2181
+ # @param [Google::Apis::DatacatalogV1::TestIamPermissionsRequest] test_iam_permissions_request_object
2182
+ # @param [String] fields
2183
+ # Selector specifying which fields to include in a partial response.
2184
+ # @param [String] quota_user
2185
+ # Available to use for quota purposes for server-side applications. Can be any
2186
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2187
+ # @param [Google::Apis::RequestOptions] options
2188
+ # Request-specific options
2189
+ #
2190
+ # @yield [result, err] Result & error if block supplied
2191
+ # @yieldparam result [Google::Apis::DatacatalogV1::TestIamPermissionsResponse] parsed result object
2192
+ # @yieldparam err [StandardError] error object if request failed
2193
+ #
2194
+ # @return [Google::Apis::DatacatalogV1::TestIamPermissionsResponse]
2195
+ #
2196
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2197
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2198
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2199
+ def test_policy_tag_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2200
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
2201
+ command.request_representation = Google::Apis::DatacatalogV1::TestIamPermissionsRequest::Representation
2202
+ command.request_object = test_iam_permissions_request_object
2203
+ command.response_representation = Google::Apis::DatacatalogV1::TestIamPermissionsResponse::Representation
2204
+ command.response_class = Google::Apis::DatacatalogV1::TestIamPermissionsResponse
2205
+ command.params['resource'] = resource unless resource.nil?
2206
+ command.query['fields'] = fields unless fields.nil?
2207
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2208
+ execute_or_queue_command(command, &block)
2209
+ end
2210
+
2211
+ protected
2212
+
2213
+ def apply_command_defaults(command)
2214
+ command.query['key'] = key unless key.nil?
2215
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2216
+ end
2217
+ end
2218
+ end
2219
+ end
2220
+ end