google-apis-datacatalog_v1beta1 0.1.0

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