google-cloud-data_catalog-v1beta1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/client.rb +3303 -0
  6. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/credentials.rb +47 -0
  7. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/paths.rb +176 -0
  8. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/client.rb +3093 -0
  9. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest/service_stub.rb +1782 -0
  10. data/lib/google/cloud/data_catalog/v1beta1/data_catalog/rest.rb +53 -0
  11. data/lib/google/cloud/data_catalog/v1beta1/data_catalog.rb +56 -0
  12. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/client.rb +1590 -0
  13. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/credentials.rb +47 -0
  14. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/paths.rb +90 -0
  15. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/rest/client.rb +1470 -0
  16. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/rest/service_stub.rb +846 -0
  17. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager/rest.rb +53 -0
  18. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager.rb +56 -0
  19. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/client.rb +522 -0
  20. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/credentials.rb +47 -0
  21. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/paths.rb +69 -0
  22. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/rest/client.rb +479 -0
  23. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/rest/service_stub.rb +167 -0
  24. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization/rest.rb +53 -0
  25. data/lib/google/cloud/data_catalog/v1beta1/policy_tag_manager_serialization.rb +56 -0
  26. data/lib/google/cloud/data_catalog/v1beta1/rest.rb +39 -0
  27. data/lib/google/cloud/data_catalog/v1beta1/version.rb +7 -2
  28. data/lib/google/cloud/data_catalog/v1beta1.rb +47 -0
  29. data/lib/google/cloud/datacatalog/v1beta1/common_pb.rb +43 -0
  30. data/lib/google/cloud/datacatalog/v1beta1/datacatalog_pb.rb +99 -0
  31. data/lib/google/cloud/datacatalog/v1beta1/datacatalog_services_pb.rb +229 -0
  32. data/lib/google/cloud/datacatalog/v1beta1/gcs_fileset_spec_pb.rb +47 -0
  33. data/lib/google/cloud/datacatalog/v1beta1/policytagmanager_pb.rb +70 -0
  34. data/lib/google/cloud/datacatalog/v1beta1/policytagmanager_services_pb.rb +73 -0
  35. data/lib/google/cloud/datacatalog/v1beta1/policytagmanagerserialization_pb.rb +55 -0
  36. data/lib/google/cloud/datacatalog/v1beta1/policytagmanagerserialization_services_pb.rb +55 -0
  37. data/lib/google/cloud/datacatalog/v1beta1/schema_pb.rb +45 -0
  38. data/lib/google/cloud/datacatalog/v1beta1/search_pb.rb +47 -0
  39. data/lib/google/cloud/datacatalog/v1beta1/table_spec_pb.rb +49 -0
  40. data/lib/google/cloud/datacatalog/v1beta1/tags_pb.rb +55 -0
  41. data/lib/google/cloud/datacatalog/v1beta1/timestamps_pb.rb +46 -0
  42. data/lib/google/cloud/datacatalog/v1beta1/usage_pb.rb +46 -0
  43. data/lib/google-cloud-data_catalog-v1beta1.rb +21 -0
  44. data/proto_docs/README.md +4 -0
  45. data/proto_docs/google/api/client.rb +381 -0
  46. data/proto_docs/google/api/field_behavior.rb +85 -0
  47. data/proto_docs/google/api/launch_stage.rb +71 -0
  48. data/proto_docs/google/api/resource.rb +222 -0
  49. data/proto_docs/google/cloud/datacatalog/v1beta1/common.rb +52 -0
  50. data/proto_docs/google/cloud/datacatalog/v1beta1/datacatalog.rb +830 -0
  51. data/proto_docs/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.rb +81 -0
  52. data/proto_docs/google/cloud/datacatalog/v1beta1/policytagmanager.rb +300 -0
  53. data/proto_docs/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.rb +131 -0
  54. data/proto_docs/google/cloud/datacatalog/v1beta1/schema.rb +61 -0
  55. data/proto_docs/google/cloud/datacatalog/v1beta1/search.rb +75 -0
  56. data/proto_docs/google/cloud/datacatalog/v1beta1/table_spec.rb +102 -0
  57. data/proto_docs/google/cloud/datacatalog/v1beta1/tags.rb +242 -0
  58. data/proto_docs/google/cloud/datacatalog/v1beta1/timestamps.rb +42 -0
  59. data/proto_docs/google/cloud/datacatalog/v1beta1/usage.rb +74 -0
  60. data/proto_docs/google/protobuf/duration.rb +98 -0
  61. data/proto_docs/google/protobuf/empty.rb +34 -0
  62. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  63. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  64. data/proto_docs/google/type/expr.rb +75 -0
  65. metadata +242 -13
@@ -0,0 +1,3093 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/datacatalog/v1beta1/datacatalog_pb"
21
+ require "google/cloud/data_catalog/v1beta1/data_catalog/rest/service_stub"
22
+ require "google/iam/v1/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module DataCatalog
27
+ module V1beta1
28
+ module DataCatalog
29
+ module Rest
30
+ ##
31
+ # REST client for the DataCatalog service.
32
+ #
33
+ # Data Catalog API service allows clients to discover, understand, and manage
34
+ # their data.
35
+ #
36
+ class Client
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :data_catalog_stub
41
+
42
+ ##
43
+ # Configure the DataCatalog Client class.
44
+ #
45
+ # See {::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all DataCatalog clients
51
+ # ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "DataCatalog", "V1beta1"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config.timeout = 60.0
72
+ default_config.retry_policy = {
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 8, 13]
74
+ }
75
+
76
+ default_config
77
+ end
78
+ yield @configure if block_given?
79
+ @configure
80
+ end
81
+
82
+ ##
83
+ # Configure the DataCatalog Client instance.
84
+ #
85
+ # The configuration is set to the derived mode, meaning that values can be changed,
86
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
87
+ # should be made on {Client.configure}.
88
+ #
89
+ # See {::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client::Configuration}
90
+ # for a description of the configuration fields.
91
+ #
92
+ # @yield [config] Configure the Client client.
93
+ # @yieldparam config [Client::Configuration]
94
+ #
95
+ # @return [Client::Configuration]
96
+ #
97
+ def configure
98
+ yield @config if block_given?
99
+ @config
100
+ end
101
+
102
+ ##
103
+ # Create a new DataCatalog REST client object.
104
+ #
105
+ # @example
106
+ #
107
+ # # Create a client using the default configuration
108
+ # client = ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
109
+ #
110
+ # # Create a client using a custom configuration
111
+ # client = ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new do |config|
112
+ # config.timeout = 10.0
113
+ # end
114
+ #
115
+ # @yield [config] Configure the DataCatalog client.
116
+ # @yieldparam config [Client::Configuration]
117
+ #
118
+ def initialize
119
+ # Create the configuration object
120
+ @config = Configuration.new Client.configure
121
+
122
+ # Yield the configuration if needed
123
+ yield @config if block_given?
124
+
125
+ # Create credentials
126
+ credentials = @config.credentials
127
+ # Use self-signed JWT if the endpoint is unchanged from default,
128
+ # but only if the default endpoint does not have a region prefix.
129
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
130
+ !@config.endpoint.split(".").first.include?("-")
131
+ credentials ||= Credentials.default scope: @config.scope,
132
+ enable_self_signed_jwt: enable_self_signed_jwt
133
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
134
+ credentials = Credentials.new credentials, scope: @config.scope
135
+ end
136
+
137
+ @quota_project_id = @config.quota_project
138
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
139
+
140
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
141
+ config.credentials = credentials
142
+ config.quota_project = @quota_project_id
143
+ config.endpoint = @config.endpoint
144
+ end
145
+
146
+ @data_catalog_stub = ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
147
+ end
148
+
149
+ ##
150
+ # Get the associated client for mix-in of the IAMPolicy.
151
+ #
152
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
153
+ #
154
+ attr_reader :iam_policy_client
155
+
156
+ # Service calls
157
+
158
+ ##
159
+ # Searches Data Catalog for multiple resources like entries, tags that
160
+ # match a query.
161
+ #
162
+ # This is a custom method
163
+ # (https://cloud.google.com/apis/design/custom_methods) and does not return
164
+ # the complete resource, only the resource identifier and high level
165
+ # fields. Clients can subsequently call `Get` methods.
166
+ #
167
+ # Note that Data Catalog search queries do not guarantee full recall. Query
168
+ # results that match your query may not be returned, even in subsequent
169
+ # result pages. Also note that results returned (and not returned) can vary
170
+ # across repeated search queries.
171
+ #
172
+ # See [Data Catalog Search
173
+ # Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference)
174
+ # for more information.
175
+ #
176
+ # @overload search_catalog(request, options = nil)
177
+ # Pass arguments to `search_catalog` via a request object, either of type
178
+ # {::Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest} or an equivalent Hash.
179
+ #
180
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest, ::Hash]
181
+ # A request object representing the call parameters. Required. To specify no
182
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
183
+ # @param options [::Gapic::CallOptions, ::Hash]
184
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
185
+ #
186
+ # @overload search_catalog(scope: nil, query: nil, page_size: nil, page_token: nil, order_by: nil)
187
+ # Pass arguments to `search_catalog` via keyword arguments. Note that at
188
+ # least one keyword argument is required. To specify no parameters, or to keep all
189
+ # the default parameter values, pass an empty Hash as a request object (see above).
190
+ #
191
+ # @param scope [::Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest::Scope, ::Hash]
192
+ # Required. The scope of this search request. A `scope` that has empty
193
+ # `include_org_ids`, `include_project_ids` AND false
194
+ # `include_gcp_public_datasets` is considered invalid. Data Catalog will
195
+ # return an error in such a case.
196
+ # @param query [::String]
197
+ # Optional. The query string in search query syntax. An empty query string
198
+ # will result in all data assets (in the specified scope) that the user has
199
+ # access to. Query strings can be simple as "x" or more qualified as:
200
+ #
201
+ # * name:x
202
+ # * column:x
203
+ # * description:y
204
+ #
205
+ # Note: Query tokens need to have a minimum of 3 characters for substring
206
+ # matching to work correctly. See [Data Catalog Search
207
+ # Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference)
208
+ # for more information.
209
+ # @param page_size [::Integer]
210
+ # Number of results in the search page. If <=0 then defaults to 10. Max limit
211
+ # for page_size is 1000. Throws an invalid argument for page_size > 1000.
212
+ # @param page_token [::String]
213
+ # Optional. Pagination token returned in an earlier
214
+ # {::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResponse#next_page_token SearchCatalogResponse.next_page_token},
215
+ # which indicates that this is a continuation of a prior
216
+ # {::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client#search_catalog SearchCatalogRequest}
217
+ # call, and that the system should return the next page of data. If empty,
218
+ # the first page is returned.
219
+ # @param order_by [::String]
220
+ # Specifies the ordering of results, currently supported case-sensitive
221
+ # choices are:
222
+ #
223
+ # * `relevance`, only supports descending
224
+ # * `last_modified_timestamp [asc|desc]`, defaults to descending if not
225
+ # specified
226
+ # * `default` that can only be descending
227
+ #
228
+ # If not specified, defaults to `relevance` descending.
229
+ # @yield [result, operation] Access the result along with the TransportOperation object
230
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResponse]
231
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
232
+ #
233
+ # @return [::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResponse]
234
+ #
235
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
236
+ #
237
+ # @example Basic example
238
+ # require "google/cloud/data_catalog/v1beta1"
239
+ #
240
+ # # Create a client object. The client can be reused for multiple calls.
241
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
242
+ #
243
+ # # Create a request. To set request fields, pass in keyword arguments.
244
+ # request = Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest.new
245
+ #
246
+ # # Call the search_catalog method.
247
+ # result = client.search_catalog request
248
+ #
249
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
250
+ # # over elements, and API calls will be issued to fetch pages as needed.
251
+ # result.each do |item|
252
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResult.
253
+ # p item
254
+ # end
255
+ #
256
+ def search_catalog request, options = nil
257
+ raise ::ArgumentError, "request must be provided" if request.nil?
258
+
259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest
260
+
261
+ # Converts hash and nil to an options object
262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
+
264
+ # Customize the options with defaults
265
+ call_metadata = @config.rpcs.search_catalog.metadata.to_h
266
+
267
+ # Set x-goog-api-client and x-goog-user-project headers
268
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
270
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
271
+ transports_version_send: [:rest]
272
+
273
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
+
275
+ options.apply_defaults timeout: @config.rpcs.search_catalog.timeout,
276
+ metadata: call_metadata,
277
+ retry_policy: @config.rpcs.search_catalog.retry_policy
278
+
279
+ options.apply_defaults timeout: @config.timeout,
280
+ metadata: @config.metadata,
281
+ retry_policy: @config.retry_policy
282
+
283
+ @data_catalog_stub.search_catalog request, options do |result, operation|
284
+ yield result, operation if block_given?
285
+ return result
286
+ end
287
+ rescue ::Gapic::Rest::Error => e
288
+ raise ::Google::Cloud::Error.from_error(e)
289
+ end
290
+
291
+ ##
292
+ # A maximum of 10,000 entry groups may be created per organization across all
293
+ # locations.
294
+ #
295
+ # Users should enable the Data Catalog API in the project identified by
296
+ # the `parent` parameter (see [Data Catalog Resource Project]
297
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
298
+ # more information).
299
+ #
300
+ # @overload create_entry_group(request, options = nil)
301
+ # Pass arguments to `create_entry_group` via a request object, either of type
302
+ # {::Google::Cloud::DataCatalog::V1beta1::CreateEntryGroupRequest} or an equivalent Hash.
303
+ #
304
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::CreateEntryGroupRequest, ::Hash]
305
+ # A request object representing the call parameters. Required. To specify no
306
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
307
+ # @param options [::Gapic::CallOptions, ::Hash]
308
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
309
+ #
310
+ # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil)
311
+ # Pass arguments to `create_entry_group` via keyword arguments. Note that at
312
+ # least one keyword argument is required. To specify no parameters, or to keep all
313
+ # the default parameter values, pass an empty Hash as a request object (see above).
314
+ #
315
+ # @param parent [::String]
316
+ # Required. The name of the project this entry group is in. Example:
317
+ #
318
+ # * projects/\\{project_id}/locations/\\{location}
319
+ #
320
+ # Note that this EntryGroup and its child resources may not actually be
321
+ # stored in the location in this name.
322
+ # @param entry_group_id [::String]
323
+ # Required. The id of the entry group to create.
324
+ # The id must begin with a letter or underscore, contain only English
325
+ # letters, numbers and underscores, and be at most 64 characters.
326
+ # @param entry_group [::Google::Cloud::DataCatalog::V1beta1::EntryGroup, ::Hash]
327
+ # The entry group to create. Defaults to an empty entry group.
328
+ # @yield [result, operation] Access the result along with the TransportOperation object
329
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::EntryGroup]
330
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
331
+ #
332
+ # @return [::Google::Cloud::DataCatalog::V1beta1::EntryGroup]
333
+ #
334
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
335
+ #
336
+ # @example Basic example
337
+ # require "google/cloud/data_catalog/v1beta1"
338
+ #
339
+ # # Create a client object. The client can be reused for multiple calls.
340
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
341
+ #
342
+ # # Create a request. To set request fields, pass in keyword arguments.
343
+ # request = Google::Cloud::DataCatalog::V1beta1::CreateEntryGroupRequest.new
344
+ #
345
+ # # Call the create_entry_group method.
346
+ # result = client.create_entry_group request
347
+ #
348
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::EntryGroup.
349
+ # p result
350
+ #
351
+ def create_entry_group request, options = nil
352
+ raise ::ArgumentError, "request must be provided" if request.nil?
353
+
354
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::CreateEntryGroupRequest
355
+
356
+ # Converts hash and nil to an options object
357
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
358
+
359
+ # Customize the options with defaults
360
+ call_metadata = @config.rpcs.create_entry_group.metadata.to_h
361
+
362
+ # Set x-goog-api-client and x-goog-user-project headers
363
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
364
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
365
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
366
+ transports_version_send: [:rest]
367
+
368
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
369
+
370
+ options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout,
371
+ metadata: call_metadata,
372
+ retry_policy: @config.rpcs.create_entry_group.retry_policy
373
+
374
+ options.apply_defaults timeout: @config.timeout,
375
+ metadata: @config.metadata,
376
+ retry_policy: @config.retry_policy
377
+
378
+ @data_catalog_stub.create_entry_group request, options do |result, operation|
379
+ yield result, operation if block_given?
380
+ return result
381
+ end
382
+ rescue ::Gapic::Rest::Error => e
383
+ raise ::Google::Cloud::Error.from_error(e)
384
+ end
385
+
386
+ ##
387
+ # Updates an EntryGroup. The user should enable the Data Catalog API in the
388
+ # project identified by the `entry_group.name` parameter (see [Data Catalog
389
+ # Resource Project]
390
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
391
+ # more information).
392
+ #
393
+ # @overload update_entry_group(request, options = nil)
394
+ # Pass arguments to `update_entry_group` via a request object, either of type
395
+ # {::Google::Cloud::DataCatalog::V1beta1::UpdateEntryGroupRequest} or an equivalent Hash.
396
+ #
397
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::UpdateEntryGroupRequest, ::Hash]
398
+ # A request object representing the call parameters. Required. To specify no
399
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
400
+ # @param options [::Gapic::CallOptions, ::Hash]
401
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
402
+ #
403
+ # @overload update_entry_group(entry_group: nil, update_mask: nil)
404
+ # Pass arguments to `update_entry_group` via keyword arguments. Note that at
405
+ # least one keyword argument is required. To specify no parameters, or to keep all
406
+ # the default parameter values, pass an empty Hash as a request object (see above).
407
+ #
408
+ # @param entry_group [::Google::Cloud::DataCatalog::V1beta1::EntryGroup, ::Hash]
409
+ # Required. The updated entry group. "name" field must be set.
410
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
411
+ # Names of fields whose values to overwrite on an entry group.
412
+ #
413
+ # If this parameter is absent or empty, all modifiable fields
414
+ # are overwritten. If such fields are non-required and omitted in the
415
+ # request body, their values are emptied.
416
+ # @yield [result, operation] Access the result along with the TransportOperation object
417
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::EntryGroup]
418
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
419
+ #
420
+ # @return [::Google::Cloud::DataCatalog::V1beta1::EntryGroup]
421
+ #
422
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
423
+ #
424
+ # @example Basic example
425
+ # require "google/cloud/data_catalog/v1beta1"
426
+ #
427
+ # # Create a client object. The client can be reused for multiple calls.
428
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
429
+ #
430
+ # # Create a request. To set request fields, pass in keyword arguments.
431
+ # request = Google::Cloud::DataCatalog::V1beta1::UpdateEntryGroupRequest.new
432
+ #
433
+ # # Call the update_entry_group method.
434
+ # result = client.update_entry_group request
435
+ #
436
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::EntryGroup.
437
+ # p result
438
+ #
439
+ def update_entry_group request, options = nil
440
+ raise ::ArgumentError, "request must be provided" if request.nil?
441
+
442
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::UpdateEntryGroupRequest
443
+
444
+ # Converts hash and nil to an options object
445
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
446
+
447
+ # Customize the options with defaults
448
+ call_metadata = @config.rpcs.update_entry_group.metadata.to_h
449
+
450
+ # Set x-goog-api-client and x-goog-user-project headers
451
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
452
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
453
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
454
+ transports_version_send: [:rest]
455
+
456
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
+
458
+ options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout,
459
+ metadata: call_metadata,
460
+ retry_policy: @config.rpcs.update_entry_group.retry_policy
461
+
462
+ options.apply_defaults timeout: @config.timeout,
463
+ metadata: @config.metadata,
464
+ retry_policy: @config.retry_policy
465
+
466
+ @data_catalog_stub.update_entry_group request, options do |result, operation|
467
+ yield result, operation if block_given?
468
+ return result
469
+ end
470
+ rescue ::Gapic::Rest::Error => e
471
+ raise ::Google::Cloud::Error.from_error(e)
472
+ end
473
+
474
+ ##
475
+ # Gets an EntryGroup.
476
+ #
477
+ # @overload get_entry_group(request, options = nil)
478
+ # Pass arguments to `get_entry_group` via a request object, either of type
479
+ # {::Google::Cloud::DataCatalog::V1beta1::GetEntryGroupRequest} or an equivalent Hash.
480
+ #
481
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::GetEntryGroupRequest, ::Hash]
482
+ # A request object representing the call parameters. Required. To specify no
483
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
484
+ # @param options [::Gapic::CallOptions, ::Hash]
485
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
486
+ #
487
+ # @overload get_entry_group(name: nil, read_mask: nil)
488
+ # Pass arguments to `get_entry_group` via keyword arguments. Note that at
489
+ # least one keyword argument is required. To specify no parameters, or to keep all
490
+ # the default parameter values, pass an empty Hash as a request object (see above).
491
+ #
492
+ # @param name [::String]
493
+ # Required. The name of the entry group. For example,
494
+ # `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
495
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
496
+ # The fields to return. If not set or empty, all fields are returned.
497
+ # @yield [result, operation] Access the result along with the TransportOperation object
498
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::EntryGroup]
499
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
500
+ #
501
+ # @return [::Google::Cloud::DataCatalog::V1beta1::EntryGroup]
502
+ #
503
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
504
+ #
505
+ # @example Basic example
506
+ # require "google/cloud/data_catalog/v1beta1"
507
+ #
508
+ # # Create a client object. The client can be reused for multiple calls.
509
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
510
+ #
511
+ # # Create a request. To set request fields, pass in keyword arguments.
512
+ # request = Google::Cloud::DataCatalog::V1beta1::GetEntryGroupRequest.new
513
+ #
514
+ # # Call the get_entry_group method.
515
+ # result = client.get_entry_group request
516
+ #
517
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::EntryGroup.
518
+ # p result
519
+ #
520
+ def get_entry_group request, options = nil
521
+ raise ::ArgumentError, "request must be provided" if request.nil?
522
+
523
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::GetEntryGroupRequest
524
+
525
+ # Converts hash and nil to an options object
526
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
527
+
528
+ # Customize the options with defaults
529
+ call_metadata = @config.rpcs.get_entry_group.metadata.to_h
530
+
531
+ # Set x-goog-api-client and x-goog-user-project headers
532
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
533
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
534
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
535
+ transports_version_send: [:rest]
536
+
537
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
538
+
539
+ options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout,
540
+ metadata: call_metadata,
541
+ retry_policy: @config.rpcs.get_entry_group.retry_policy
542
+
543
+ options.apply_defaults timeout: @config.timeout,
544
+ metadata: @config.metadata,
545
+ retry_policy: @config.retry_policy
546
+
547
+ @data_catalog_stub.get_entry_group request, options do |result, operation|
548
+ yield result, operation if block_given?
549
+ return result
550
+ end
551
+ rescue ::Gapic::Rest::Error => e
552
+ raise ::Google::Cloud::Error.from_error(e)
553
+ end
554
+
555
+ ##
556
+ # Deletes an EntryGroup. Only entry groups that do not contain entries can be
557
+ # deleted. Users should enable the Data Catalog API in the project
558
+ # identified by the `name` parameter (see [Data Catalog Resource Project]
559
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
560
+ # more information).
561
+ #
562
+ # @overload delete_entry_group(request, options = nil)
563
+ # Pass arguments to `delete_entry_group` via a request object, either of type
564
+ # {::Google::Cloud::DataCatalog::V1beta1::DeleteEntryGroupRequest} or an equivalent Hash.
565
+ #
566
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::DeleteEntryGroupRequest, ::Hash]
567
+ # A request object representing the call parameters. Required. To specify no
568
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
569
+ # @param options [::Gapic::CallOptions, ::Hash]
570
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
571
+ #
572
+ # @overload delete_entry_group(name: nil, force: nil)
573
+ # Pass arguments to `delete_entry_group` via keyword arguments. Note that at
574
+ # least one keyword argument is required. To specify no parameters, or to keep all
575
+ # the default parameter values, pass an empty Hash as a request object (see above).
576
+ #
577
+ # @param name [::String]
578
+ # Required. The name of the entry group. For example,
579
+ # `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
580
+ # @param force [::Boolean]
581
+ # Optional. If true, deletes all entries in the entry group.
582
+ # @yield [result, operation] Access the result along with the TransportOperation object
583
+ # @yieldparam result [::Google::Protobuf::Empty]
584
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
585
+ #
586
+ # @return [::Google::Protobuf::Empty]
587
+ #
588
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
589
+ #
590
+ # @example Basic example
591
+ # require "google/cloud/data_catalog/v1beta1"
592
+ #
593
+ # # Create a client object. The client can be reused for multiple calls.
594
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
595
+ #
596
+ # # Create a request. To set request fields, pass in keyword arguments.
597
+ # request = Google::Cloud::DataCatalog::V1beta1::DeleteEntryGroupRequest.new
598
+ #
599
+ # # Call the delete_entry_group method.
600
+ # result = client.delete_entry_group request
601
+ #
602
+ # # The returned object is of type Google::Protobuf::Empty.
603
+ # p result
604
+ #
605
+ def delete_entry_group request, options = nil
606
+ raise ::ArgumentError, "request must be provided" if request.nil?
607
+
608
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::DeleteEntryGroupRequest
609
+
610
+ # Converts hash and nil to an options object
611
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
612
+
613
+ # Customize the options with defaults
614
+ call_metadata = @config.rpcs.delete_entry_group.metadata.to_h
615
+
616
+ # Set x-goog-api-client and x-goog-user-project headers
617
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
618
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
619
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
620
+ transports_version_send: [:rest]
621
+
622
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
623
+
624
+ options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout,
625
+ metadata: call_metadata,
626
+ retry_policy: @config.rpcs.delete_entry_group.retry_policy
627
+
628
+ options.apply_defaults timeout: @config.timeout,
629
+ metadata: @config.metadata,
630
+ retry_policy: @config.retry_policy
631
+
632
+ @data_catalog_stub.delete_entry_group request, options do |result, operation|
633
+ yield result, operation if block_given?
634
+ return result
635
+ end
636
+ rescue ::Gapic::Rest::Error => e
637
+ raise ::Google::Cloud::Error.from_error(e)
638
+ end
639
+
640
+ ##
641
+ # Lists entry groups.
642
+ #
643
+ # @overload list_entry_groups(request, options = nil)
644
+ # Pass arguments to `list_entry_groups` via a request object, either of type
645
+ # {::Google::Cloud::DataCatalog::V1beta1::ListEntryGroupsRequest} or an equivalent Hash.
646
+ #
647
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::ListEntryGroupsRequest, ::Hash]
648
+ # A request object representing the call parameters. Required. To specify no
649
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
650
+ # @param options [::Gapic::CallOptions, ::Hash]
651
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
652
+ #
653
+ # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil)
654
+ # Pass arguments to `list_entry_groups` via keyword arguments. Note that at
655
+ # least one keyword argument is required. To specify no parameters, or to keep all
656
+ # the default parameter values, pass an empty Hash as a request object (see above).
657
+ #
658
+ # @param parent [::String]
659
+ # Required. The name of the location that contains the entry groups, which
660
+ # can be provided in URL format. Example:
661
+ #
662
+ # * projects/\\{project_id}/locations/\\{location}
663
+ # @param page_size [::Integer]
664
+ # Optional. The maximum number of items to return. Default is 10. Max limit
665
+ # is 1000. Throws an invalid argument for `page_size > 1000`.
666
+ # @param page_token [::String]
667
+ # Optional. Token that specifies which page is requested. If empty, the first
668
+ # page is returned.
669
+ # @yield [result, operation] Access the result along with the TransportOperation object
670
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::EntryGroup>]
671
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
672
+ #
673
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::EntryGroup>]
674
+ #
675
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
676
+ #
677
+ # @example Basic example
678
+ # require "google/cloud/data_catalog/v1beta1"
679
+ #
680
+ # # Create a client object. The client can be reused for multiple calls.
681
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
682
+ #
683
+ # # Create a request. To set request fields, pass in keyword arguments.
684
+ # request = Google::Cloud::DataCatalog::V1beta1::ListEntryGroupsRequest.new
685
+ #
686
+ # # Call the list_entry_groups method.
687
+ # result = client.list_entry_groups request
688
+ #
689
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
690
+ # # over elements, and API calls will be issued to fetch pages as needed.
691
+ # result.each do |item|
692
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::EntryGroup.
693
+ # p item
694
+ # end
695
+ #
696
+ def list_entry_groups request, options = nil
697
+ raise ::ArgumentError, "request must be provided" if request.nil?
698
+
699
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::ListEntryGroupsRequest
700
+
701
+ # Converts hash and nil to an options object
702
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
703
+
704
+ # Customize the options with defaults
705
+ call_metadata = @config.rpcs.list_entry_groups.metadata.to_h
706
+
707
+ # Set x-goog-api-client and x-goog-user-project headers
708
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
709
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
710
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
711
+ transports_version_send: [:rest]
712
+
713
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
714
+
715
+ options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout,
716
+ metadata: call_metadata,
717
+ retry_policy: @config.rpcs.list_entry_groups.retry_policy
718
+
719
+ options.apply_defaults timeout: @config.timeout,
720
+ metadata: @config.metadata,
721
+ retry_policy: @config.retry_policy
722
+
723
+ @data_catalog_stub.list_entry_groups request, options do |result, operation|
724
+ result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_entry_groups, "entry_groups", request, result, options
725
+ yield result, operation if block_given?
726
+ return result
727
+ end
728
+ rescue ::Gapic::Rest::Error => e
729
+ raise ::Google::Cloud::Error.from_error(e)
730
+ end
731
+
732
+ ##
733
+ # Creates an entry. Only entries of 'FILESET' type or user-specified type can
734
+ # be created.
735
+ #
736
+ # Users should enable the Data Catalog API in the project identified by
737
+ # the `parent` parameter (see [Data Catalog Resource Project]
738
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
739
+ # more information).
740
+ #
741
+ # A maximum of 100,000 entries may be created per entry group.
742
+ #
743
+ # @overload create_entry(request, options = nil)
744
+ # Pass arguments to `create_entry` via a request object, either of type
745
+ # {::Google::Cloud::DataCatalog::V1beta1::CreateEntryRequest} or an equivalent Hash.
746
+ #
747
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::CreateEntryRequest, ::Hash]
748
+ # A request object representing the call parameters. Required. To specify no
749
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
750
+ # @param options [::Gapic::CallOptions, ::Hash]
751
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
752
+ #
753
+ # @overload create_entry(parent: nil, entry_id: nil, entry: nil)
754
+ # Pass arguments to `create_entry` via keyword arguments. Note that at
755
+ # least one keyword argument is required. To specify no parameters, or to keep all
756
+ # the default parameter values, pass an empty Hash as a request object (see above).
757
+ #
758
+ # @param parent [::String]
759
+ # Required. The name of the entry group this entry is in. Example:
760
+ #
761
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}
762
+ #
763
+ # Note that this Entry and its child resources may not actually be stored in
764
+ # the location in this name.
765
+ # @param entry_id [::String]
766
+ # Required. The id of the entry to create.
767
+ # @param entry [::Google::Cloud::DataCatalog::V1beta1::Entry, ::Hash]
768
+ # Required. The entry to create.
769
+ # @yield [result, operation] Access the result along with the TransportOperation object
770
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Entry]
771
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
772
+ #
773
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Entry]
774
+ #
775
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
776
+ #
777
+ # @example Basic example
778
+ # require "google/cloud/data_catalog/v1beta1"
779
+ #
780
+ # # Create a client object. The client can be reused for multiple calls.
781
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
782
+ #
783
+ # # Create a request. To set request fields, pass in keyword arguments.
784
+ # request = Google::Cloud::DataCatalog::V1beta1::CreateEntryRequest.new
785
+ #
786
+ # # Call the create_entry method.
787
+ # result = client.create_entry request
788
+ #
789
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
790
+ # p result
791
+ #
792
+ def create_entry request, options = nil
793
+ raise ::ArgumentError, "request must be provided" if request.nil?
794
+
795
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::CreateEntryRequest
796
+
797
+ # Converts hash and nil to an options object
798
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
799
+
800
+ # Customize the options with defaults
801
+ call_metadata = @config.rpcs.create_entry.metadata.to_h
802
+
803
+ # Set x-goog-api-client and x-goog-user-project headers
804
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
805
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
806
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
807
+ transports_version_send: [:rest]
808
+
809
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
810
+
811
+ options.apply_defaults timeout: @config.rpcs.create_entry.timeout,
812
+ metadata: call_metadata,
813
+ retry_policy: @config.rpcs.create_entry.retry_policy
814
+
815
+ options.apply_defaults timeout: @config.timeout,
816
+ metadata: @config.metadata,
817
+ retry_policy: @config.retry_policy
818
+
819
+ @data_catalog_stub.create_entry request, options do |result, operation|
820
+ yield result, operation if block_given?
821
+ return result
822
+ end
823
+ rescue ::Gapic::Rest::Error => e
824
+ raise ::Google::Cloud::Error.from_error(e)
825
+ end
826
+
827
+ ##
828
+ # Updates an existing entry.
829
+ # Users should enable the Data Catalog API in the project identified by
830
+ # the `entry.name` parameter (see [Data Catalog Resource Project]
831
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
832
+ # more information).
833
+ #
834
+ # @overload update_entry(request, options = nil)
835
+ # Pass arguments to `update_entry` via a request object, either of type
836
+ # {::Google::Cloud::DataCatalog::V1beta1::UpdateEntryRequest} or an equivalent Hash.
837
+ #
838
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::UpdateEntryRequest, ::Hash]
839
+ # A request object representing the call parameters. Required. To specify no
840
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
841
+ # @param options [::Gapic::CallOptions, ::Hash]
842
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
843
+ #
844
+ # @overload update_entry(entry: nil, update_mask: nil)
845
+ # Pass arguments to `update_entry` via keyword arguments. Note that at
846
+ # least one keyword argument is required. To specify no parameters, or to keep all
847
+ # the default parameter values, pass an empty Hash as a request object (see above).
848
+ #
849
+ # @param entry [::Google::Cloud::DataCatalog::V1beta1::Entry, ::Hash]
850
+ # Required. The updated entry. The "name" field must be set.
851
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
852
+ # Names of fields whose values to overwrite on an entry.
853
+ #
854
+ # If this parameter is absent or empty, all modifiable fields
855
+ # are overwritten. If such fields are non-required and omitted in the
856
+ # request body, their values are emptied.
857
+ #
858
+ # The following fields are modifiable:
859
+ #
860
+ # * For entries with type `DATA_STREAM`:
861
+ # * `schema`
862
+ # * For entries with type `FILESET`:
863
+ # * `schema`
864
+ # * `display_name`
865
+ # * `description`
866
+ # * `gcs_fileset_spec`
867
+ # * `gcs_fileset_spec.file_patterns`
868
+ # * For entries with `user_specified_type`:
869
+ # * `schema`
870
+ # * `display_name`
871
+ # * `description`
872
+ # * `user_specified_type`
873
+ # * `user_specified_system`
874
+ # * `linked_resource`
875
+ # * `source_system_timestamps`
876
+ # @yield [result, operation] Access the result along with the TransportOperation object
877
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Entry]
878
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
879
+ #
880
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Entry]
881
+ #
882
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
883
+ #
884
+ # @example Basic example
885
+ # require "google/cloud/data_catalog/v1beta1"
886
+ #
887
+ # # Create a client object. The client can be reused for multiple calls.
888
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
889
+ #
890
+ # # Create a request. To set request fields, pass in keyword arguments.
891
+ # request = Google::Cloud::DataCatalog::V1beta1::UpdateEntryRequest.new
892
+ #
893
+ # # Call the update_entry method.
894
+ # result = client.update_entry request
895
+ #
896
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
897
+ # p result
898
+ #
899
+ def update_entry request, options = nil
900
+ raise ::ArgumentError, "request must be provided" if request.nil?
901
+
902
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::UpdateEntryRequest
903
+
904
+ # Converts hash and nil to an options object
905
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
906
+
907
+ # Customize the options with defaults
908
+ call_metadata = @config.rpcs.update_entry.metadata.to_h
909
+
910
+ # Set x-goog-api-client and x-goog-user-project headers
911
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
912
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
913
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
914
+ transports_version_send: [:rest]
915
+
916
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
917
+
918
+ options.apply_defaults timeout: @config.rpcs.update_entry.timeout,
919
+ metadata: call_metadata,
920
+ retry_policy: @config.rpcs.update_entry.retry_policy
921
+
922
+ options.apply_defaults timeout: @config.timeout,
923
+ metadata: @config.metadata,
924
+ retry_policy: @config.retry_policy
925
+
926
+ @data_catalog_stub.update_entry request, options do |result, operation|
927
+ yield result, operation if block_given?
928
+ return result
929
+ end
930
+ rescue ::Gapic::Rest::Error => e
931
+ raise ::Google::Cloud::Error.from_error(e)
932
+ end
933
+
934
+ ##
935
+ # Deletes an existing entry. Only entries created through
936
+ # {::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client#create_entry CreateEntry}
937
+ # method can be deleted.
938
+ # Users should enable the Data Catalog API in the project identified by
939
+ # the `name` parameter (see [Data Catalog Resource Project]
940
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
941
+ # more information).
942
+ #
943
+ # @overload delete_entry(request, options = nil)
944
+ # Pass arguments to `delete_entry` via a request object, either of type
945
+ # {::Google::Cloud::DataCatalog::V1beta1::DeleteEntryRequest} or an equivalent Hash.
946
+ #
947
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::DeleteEntryRequest, ::Hash]
948
+ # A request object representing the call parameters. Required. To specify no
949
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
950
+ # @param options [::Gapic::CallOptions, ::Hash]
951
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
952
+ #
953
+ # @overload delete_entry(name: nil)
954
+ # Pass arguments to `delete_entry` via keyword arguments. Note that at
955
+ # least one keyword argument is required. To specify no parameters, or to keep all
956
+ # the default parameter values, pass an empty Hash as a request object (see above).
957
+ #
958
+ # @param name [::String]
959
+ # Required. The name of the entry. Example:
960
+ #
961
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}/entries/\\{entry_id}
962
+ # @yield [result, operation] Access the result along with the TransportOperation object
963
+ # @yieldparam result [::Google::Protobuf::Empty]
964
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
965
+ #
966
+ # @return [::Google::Protobuf::Empty]
967
+ #
968
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
969
+ #
970
+ # @example Basic example
971
+ # require "google/cloud/data_catalog/v1beta1"
972
+ #
973
+ # # Create a client object. The client can be reused for multiple calls.
974
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
975
+ #
976
+ # # Create a request. To set request fields, pass in keyword arguments.
977
+ # request = Google::Cloud::DataCatalog::V1beta1::DeleteEntryRequest.new
978
+ #
979
+ # # Call the delete_entry method.
980
+ # result = client.delete_entry request
981
+ #
982
+ # # The returned object is of type Google::Protobuf::Empty.
983
+ # p result
984
+ #
985
+ def delete_entry request, options = nil
986
+ raise ::ArgumentError, "request must be provided" if request.nil?
987
+
988
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::DeleteEntryRequest
989
+
990
+ # Converts hash and nil to an options object
991
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
992
+
993
+ # Customize the options with defaults
994
+ call_metadata = @config.rpcs.delete_entry.metadata.to_h
995
+
996
+ # Set x-goog-api-client and x-goog-user-project headers
997
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
998
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
999
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1000
+ transports_version_send: [:rest]
1001
+
1002
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1003
+
1004
+ options.apply_defaults timeout: @config.rpcs.delete_entry.timeout,
1005
+ metadata: call_metadata,
1006
+ retry_policy: @config.rpcs.delete_entry.retry_policy
1007
+
1008
+ options.apply_defaults timeout: @config.timeout,
1009
+ metadata: @config.metadata,
1010
+ retry_policy: @config.retry_policy
1011
+
1012
+ @data_catalog_stub.delete_entry request, options do |result, operation|
1013
+ yield result, operation if block_given?
1014
+ return result
1015
+ end
1016
+ rescue ::Gapic::Rest::Error => e
1017
+ raise ::Google::Cloud::Error.from_error(e)
1018
+ end
1019
+
1020
+ ##
1021
+ # Gets an entry.
1022
+ #
1023
+ # @overload get_entry(request, options = nil)
1024
+ # Pass arguments to `get_entry` via a request object, either of type
1025
+ # {::Google::Cloud::DataCatalog::V1beta1::GetEntryRequest} or an equivalent Hash.
1026
+ #
1027
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::GetEntryRequest, ::Hash]
1028
+ # A request object representing the call parameters. Required. To specify no
1029
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1030
+ # @param options [::Gapic::CallOptions, ::Hash]
1031
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1032
+ #
1033
+ # @overload get_entry(name: nil)
1034
+ # Pass arguments to `get_entry` via keyword arguments. Note that at
1035
+ # least one keyword argument is required. To specify no parameters, or to keep all
1036
+ # the default parameter values, pass an empty Hash as a request object (see above).
1037
+ #
1038
+ # @param name [::String]
1039
+ # Required. The name of the entry. Example:
1040
+ #
1041
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}/entries/\\{entry_id}
1042
+ # @yield [result, operation] Access the result along with the TransportOperation object
1043
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Entry]
1044
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1045
+ #
1046
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Entry]
1047
+ #
1048
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1049
+ #
1050
+ # @example Basic example
1051
+ # require "google/cloud/data_catalog/v1beta1"
1052
+ #
1053
+ # # Create a client object. The client can be reused for multiple calls.
1054
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1055
+ #
1056
+ # # Create a request. To set request fields, pass in keyword arguments.
1057
+ # request = Google::Cloud::DataCatalog::V1beta1::GetEntryRequest.new
1058
+ #
1059
+ # # Call the get_entry method.
1060
+ # result = client.get_entry request
1061
+ #
1062
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
1063
+ # p result
1064
+ #
1065
+ def get_entry request, options = nil
1066
+ raise ::ArgumentError, "request must be provided" if request.nil?
1067
+
1068
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::GetEntryRequest
1069
+
1070
+ # Converts hash and nil to an options object
1071
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1072
+
1073
+ # Customize the options with defaults
1074
+ call_metadata = @config.rpcs.get_entry.metadata.to_h
1075
+
1076
+ # Set x-goog-api-client and x-goog-user-project headers
1077
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1078
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1079
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1080
+ transports_version_send: [:rest]
1081
+
1082
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1083
+
1084
+ options.apply_defaults timeout: @config.rpcs.get_entry.timeout,
1085
+ metadata: call_metadata,
1086
+ retry_policy: @config.rpcs.get_entry.retry_policy
1087
+
1088
+ options.apply_defaults timeout: @config.timeout,
1089
+ metadata: @config.metadata,
1090
+ retry_policy: @config.retry_policy
1091
+
1092
+ @data_catalog_stub.get_entry request, options do |result, operation|
1093
+ yield result, operation if block_given?
1094
+ return result
1095
+ end
1096
+ rescue ::Gapic::Rest::Error => e
1097
+ raise ::Google::Cloud::Error.from_error(e)
1098
+ end
1099
+
1100
+ ##
1101
+ # Get an entry by target resource name. This method allows clients to use
1102
+ # the resource name from the source Google Cloud Platform service to get the
1103
+ # Data Catalog Entry.
1104
+ #
1105
+ # @overload lookup_entry(request, options = nil)
1106
+ # Pass arguments to `lookup_entry` via a request object, either of type
1107
+ # {::Google::Cloud::DataCatalog::V1beta1::LookupEntryRequest} or an equivalent Hash.
1108
+ #
1109
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::LookupEntryRequest, ::Hash]
1110
+ # A request object representing the call parameters. Required. To specify no
1111
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1112
+ # @param options [::Gapic::CallOptions, ::Hash]
1113
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1114
+ #
1115
+ # @overload lookup_entry(linked_resource: nil, sql_resource: nil)
1116
+ # Pass arguments to `lookup_entry` via keyword arguments. Note that at
1117
+ # least one keyword argument is required. To specify no parameters, or to keep all
1118
+ # the default parameter values, pass an empty Hash as a request object (see above).
1119
+ #
1120
+ # @param linked_resource [::String]
1121
+ # The full name of the Google Cloud Platform resource the Data Catalog
1122
+ # entry represents. See:
1123
+ # https://cloud.google.com/apis/design/resource_names#full_resource_name.
1124
+ # Full names are case-sensitive.
1125
+ #
1126
+ # Examples:
1127
+ #
1128
+ # * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
1129
+ # * //pubsub.googleapis.com/projects/projectId/topics/topicId
1130
+ # @param sql_resource [::String]
1131
+ # The SQL name of the entry. SQL names are case-sensitive.
1132
+ #
1133
+ # Examples:
1134
+ #
1135
+ # * `pubsub.project_id.topic_id`
1136
+ # * ``pubsub.project_id.`topic.id.with.dots` ``
1137
+ # * `bigquery.table.project_id.dataset_id.table_id`
1138
+ # * `bigquery.dataset.project_id.dataset_id`
1139
+ # * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
1140
+ #
1141
+ # `*_id`s should satisfy the standard SQL rules for identifiers.
1142
+ # https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
1143
+ # @yield [result, operation] Access the result along with the TransportOperation object
1144
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Entry]
1145
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1146
+ #
1147
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Entry]
1148
+ #
1149
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1150
+ #
1151
+ # @example Basic example
1152
+ # require "google/cloud/data_catalog/v1beta1"
1153
+ #
1154
+ # # Create a client object. The client can be reused for multiple calls.
1155
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1156
+ #
1157
+ # # Create a request. To set request fields, pass in keyword arguments.
1158
+ # request = Google::Cloud::DataCatalog::V1beta1::LookupEntryRequest.new
1159
+ #
1160
+ # # Call the lookup_entry method.
1161
+ # result = client.lookup_entry request
1162
+ #
1163
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
1164
+ # p result
1165
+ #
1166
+ def lookup_entry request, options = nil
1167
+ raise ::ArgumentError, "request must be provided" if request.nil?
1168
+
1169
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::LookupEntryRequest
1170
+
1171
+ # Converts hash and nil to an options object
1172
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1173
+
1174
+ # Customize the options with defaults
1175
+ call_metadata = @config.rpcs.lookup_entry.metadata.to_h
1176
+
1177
+ # Set x-goog-api-client and x-goog-user-project headers
1178
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1179
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1180
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1181
+ transports_version_send: [:rest]
1182
+
1183
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1184
+
1185
+ options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout,
1186
+ metadata: call_metadata,
1187
+ retry_policy: @config.rpcs.lookup_entry.retry_policy
1188
+
1189
+ options.apply_defaults timeout: @config.timeout,
1190
+ metadata: @config.metadata,
1191
+ retry_policy: @config.retry_policy
1192
+
1193
+ @data_catalog_stub.lookup_entry request, options do |result, operation|
1194
+ yield result, operation if block_given?
1195
+ return result
1196
+ end
1197
+ rescue ::Gapic::Rest::Error => e
1198
+ raise ::Google::Cloud::Error.from_error(e)
1199
+ end
1200
+
1201
+ ##
1202
+ # Lists entries.
1203
+ #
1204
+ # @overload list_entries(request, options = nil)
1205
+ # Pass arguments to `list_entries` via a request object, either of type
1206
+ # {::Google::Cloud::DataCatalog::V1beta1::ListEntriesRequest} or an equivalent Hash.
1207
+ #
1208
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::ListEntriesRequest, ::Hash]
1209
+ # A request object representing the call parameters. Required. To specify no
1210
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1211
+ # @param options [::Gapic::CallOptions, ::Hash]
1212
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1213
+ #
1214
+ # @overload list_entries(parent: nil, page_size: nil, page_token: nil, read_mask: nil)
1215
+ # Pass arguments to `list_entries` via keyword arguments. Note that at
1216
+ # least one keyword argument is required. To specify no parameters, or to keep all
1217
+ # the default parameter values, pass an empty Hash as a request object (see above).
1218
+ #
1219
+ # @param parent [::String]
1220
+ # Required. The name of the entry group that contains the entries, which can
1221
+ # be provided in URL format. Example:
1222
+ #
1223
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}
1224
+ # @param page_size [::Integer]
1225
+ # The maximum number of items to return. Default is 10. Max limit is 1000.
1226
+ # Throws an invalid argument for `page_size > 1000`.
1227
+ # @param page_token [::String]
1228
+ # Token that specifies which page is requested. If empty, the first page is
1229
+ # returned.
1230
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1231
+ # The fields to return for each Entry. If not set or empty, all
1232
+ # fields are returned.
1233
+ # For example, setting read_mask to contain only one path "name" will cause
1234
+ # ListEntries to return a list of Entries with only "name" field.
1235
+ # @yield [result, operation] Access the result along with the TransportOperation object
1236
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Entry>]
1237
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1238
+ #
1239
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Entry>]
1240
+ #
1241
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1242
+ #
1243
+ # @example Basic example
1244
+ # require "google/cloud/data_catalog/v1beta1"
1245
+ #
1246
+ # # Create a client object. The client can be reused for multiple calls.
1247
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1248
+ #
1249
+ # # Create a request. To set request fields, pass in keyword arguments.
1250
+ # request = Google::Cloud::DataCatalog::V1beta1::ListEntriesRequest.new
1251
+ #
1252
+ # # Call the list_entries method.
1253
+ # result = client.list_entries request
1254
+ #
1255
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1256
+ # # over elements, and API calls will be issued to fetch pages as needed.
1257
+ # result.each do |item|
1258
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::Entry.
1259
+ # p item
1260
+ # end
1261
+ #
1262
+ def list_entries request, options = nil
1263
+ raise ::ArgumentError, "request must be provided" if request.nil?
1264
+
1265
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::ListEntriesRequest
1266
+
1267
+ # Converts hash and nil to an options object
1268
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1269
+
1270
+ # Customize the options with defaults
1271
+ call_metadata = @config.rpcs.list_entries.metadata.to_h
1272
+
1273
+ # Set x-goog-api-client and x-goog-user-project headers
1274
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1275
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1276
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1277
+ transports_version_send: [:rest]
1278
+
1279
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1280
+
1281
+ options.apply_defaults timeout: @config.rpcs.list_entries.timeout,
1282
+ metadata: call_metadata,
1283
+ retry_policy: @config.rpcs.list_entries.retry_policy
1284
+
1285
+ options.apply_defaults timeout: @config.timeout,
1286
+ metadata: @config.metadata,
1287
+ retry_policy: @config.retry_policy
1288
+
1289
+ @data_catalog_stub.list_entries request, options do |result, operation|
1290
+ result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_entries, "entries", request, result, options
1291
+ yield result, operation if block_given?
1292
+ return result
1293
+ end
1294
+ rescue ::Gapic::Rest::Error => e
1295
+ raise ::Google::Cloud::Error.from_error(e)
1296
+ end
1297
+
1298
+ ##
1299
+ # Creates a tag template. The user should enable the Data Catalog API in
1300
+ # the project identified by the `parent` parameter (see [Data Catalog
1301
+ # Resource
1302
+ # Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project)
1303
+ # for more information).
1304
+ #
1305
+ # @overload create_tag_template(request, options = nil)
1306
+ # Pass arguments to `create_tag_template` via a request object, either of type
1307
+ # {::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateRequest} or an equivalent Hash.
1308
+ #
1309
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateRequest, ::Hash]
1310
+ # A request object representing the call parameters. Required. To specify no
1311
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1312
+ # @param options [::Gapic::CallOptions, ::Hash]
1313
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1314
+ #
1315
+ # @overload create_tag_template(parent: nil, tag_template_id: nil, tag_template: nil)
1316
+ # Pass arguments to `create_tag_template` via keyword arguments. Note that at
1317
+ # least one keyword argument is required. To specify no parameters, or to keep all
1318
+ # the default parameter values, pass an empty Hash as a request object (see above).
1319
+ #
1320
+ # @param parent [::String]
1321
+ # Required. The name of the project and the template location
1322
+ # [region](https://cloud.google.com/data-catalog/docs/concepts/regions.
1323
+ #
1324
+ # Example:
1325
+ #
1326
+ # * projects/\\{project_id}/locations/us-central1
1327
+ # @param tag_template_id [::String]
1328
+ # Required. The id of the tag template to create.
1329
+ # @param tag_template [::Google::Cloud::DataCatalog::V1beta1::TagTemplate, ::Hash]
1330
+ # Required. The tag template to create.
1331
+ # @yield [result, operation] Access the result along with the TransportOperation object
1332
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::TagTemplate]
1333
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1334
+ #
1335
+ # @return [::Google::Cloud::DataCatalog::V1beta1::TagTemplate]
1336
+ #
1337
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1338
+ #
1339
+ # @example Basic example
1340
+ # require "google/cloud/data_catalog/v1beta1"
1341
+ #
1342
+ # # Create a client object. The client can be reused for multiple calls.
1343
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1344
+ #
1345
+ # # Create a request. To set request fields, pass in keyword arguments.
1346
+ # request = Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateRequest.new
1347
+ #
1348
+ # # Call the create_tag_template method.
1349
+ # result = client.create_tag_template request
1350
+ #
1351
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplate.
1352
+ # p result
1353
+ #
1354
+ def create_tag_template request, options = nil
1355
+ raise ::ArgumentError, "request must be provided" if request.nil?
1356
+
1357
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateRequest
1358
+
1359
+ # Converts hash and nil to an options object
1360
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1361
+
1362
+ # Customize the options with defaults
1363
+ call_metadata = @config.rpcs.create_tag_template.metadata.to_h
1364
+
1365
+ # Set x-goog-api-client and x-goog-user-project headers
1366
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1367
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1368
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1369
+ transports_version_send: [:rest]
1370
+
1371
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1372
+
1373
+ options.apply_defaults timeout: @config.rpcs.create_tag_template.timeout,
1374
+ metadata: call_metadata,
1375
+ retry_policy: @config.rpcs.create_tag_template.retry_policy
1376
+
1377
+ options.apply_defaults timeout: @config.timeout,
1378
+ metadata: @config.metadata,
1379
+ retry_policy: @config.retry_policy
1380
+
1381
+ @data_catalog_stub.create_tag_template request, options do |result, operation|
1382
+ yield result, operation if block_given?
1383
+ return result
1384
+ end
1385
+ rescue ::Gapic::Rest::Error => e
1386
+ raise ::Google::Cloud::Error.from_error(e)
1387
+ end
1388
+
1389
+ ##
1390
+ # Gets a tag template.
1391
+ #
1392
+ # @overload get_tag_template(request, options = nil)
1393
+ # Pass arguments to `get_tag_template` via a request object, either of type
1394
+ # {::Google::Cloud::DataCatalog::V1beta1::GetTagTemplateRequest} or an equivalent Hash.
1395
+ #
1396
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::GetTagTemplateRequest, ::Hash]
1397
+ # A request object representing the call parameters. Required. To specify no
1398
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1399
+ # @param options [::Gapic::CallOptions, ::Hash]
1400
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1401
+ #
1402
+ # @overload get_tag_template(name: nil)
1403
+ # Pass arguments to `get_tag_template` via keyword arguments. Note that at
1404
+ # least one keyword argument is required. To specify no parameters, or to keep all
1405
+ # the default parameter values, pass an empty Hash as a request object (see above).
1406
+ #
1407
+ # @param name [::String]
1408
+ # Required. The name of the tag template. Example:
1409
+ #
1410
+ # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}
1411
+ # @yield [result, operation] Access the result along with the TransportOperation object
1412
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::TagTemplate]
1413
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1414
+ #
1415
+ # @return [::Google::Cloud::DataCatalog::V1beta1::TagTemplate]
1416
+ #
1417
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1418
+ #
1419
+ # @example Basic example
1420
+ # require "google/cloud/data_catalog/v1beta1"
1421
+ #
1422
+ # # Create a client object. The client can be reused for multiple calls.
1423
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1424
+ #
1425
+ # # Create a request. To set request fields, pass in keyword arguments.
1426
+ # request = Google::Cloud::DataCatalog::V1beta1::GetTagTemplateRequest.new
1427
+ #
1428
+ # # Call the get_tag_template method.
1429
+ # result = client.get_tag_template request
1430
+ #
1431
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplate.
1432
+ # p result
1433
+ #
1434
+ def get_tag_template request, options = nil
1435
+ raise ::ArgumentError, "request must be provided" if request.nil?
1436
+
1437
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::GetTagTemplateRequest
1438
+
1439
+ # Converts hash and nil to an options object
1440
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1441
+
1442
+ # Customize the options with defaults
1443
+ call_metadata = @config.rpcs.get_tag_template.metadata.to_h
1444
+
1445
+ # Set x-goog-api-client and x-goog-user-project headers
1446
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1447
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1448
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1449
+ transports_version_send: [:rest]
1450
+
1451
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1452
+
1453
+ options.apply_defaults timeout: @config.rpcs.get_tag_template.timeout,
1454
+ metadata: call_metadata,
1455
+ retry_policy: @config.rpcs.get_tag_template.retry_policy
1456
+
1457
+ options.apply_defaults timeout: @config.timeout,
1458
+ metadata: @config.metadata,
1459
+ retry_policy: @config.retry_policy
1460
+
1461
+ @data_catalog_stub.get_tag_template request, options do |result, operation|
1462
+ yield result, operation if block_given?
1463
+ return result
1464
+ end
1465
+ rescue ::Gapic::Rest::Error => e
1466
+ raise ::Google::Cloud::Error.from_error(e)
1467
+ end
1468
+
1469
+ ##
1470
+ # Updates a tag template. This method cannot be used to update the fields of
1471
+ # a template. The tag template fields are represented as separate resources
1472
+ # and should be updated using their own create/update/delete methods.
1473
+ # Users should enable the Data Catalog API in the project identified by
1474
+ # the `tag_template.name` parameter (see [Data Catalog Resource Project]
1475
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
1476
+ # more information).
1477
+ #
1478
+ # @overload update_tag_template(request, options = nil)
1479
+ # Pass arguments to `update_tag_template` via a request object, either of type
1480
+ # {::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateRequest} or an equivalent Hash.
1481
+ #
1482
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateRequest, ::Hash]
1483
+ # A request object representing the call parameters. Required. To specify no
1484
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1485
+ # @param options [::Gapic::CallOptions, ::Hash]
1486
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1487
+ #
1488
+ # @overload update_tag_template(tag_template: nil, update_mask: nil)
1489
+ # Pass arguments to `update_tag_template` via keyword arguments. Note that at
1490
+ # least one keyword argument is required. To specify no parameters, or to keep all
1491
+ # the default parameter values, pass an empty Hash as a request object (see above).
1492
+ #
1493
+ # @param tag_template [::Google::Cloud::DataCatalog::V1beta1::TagTemplate, ::Hash]
1494
+ # Required. The template to update. The "name" field must be set.
1495
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1496
+ # Names of fields whose values to overwrite on a tag template. Currently,
1497
+ # only `display_name` can be overwritten.
1498
+ #
1499
+ # In general, if this parameter is absent or empty, all modifiable fields
1500
+ # are overwritten. If such fields are non-required and omitted in the
1501
+ # request body, their values are emptied.
1502
+ # @yield [result, operation] Access the result along with the TransportOperation object
1503
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::TagTemplate]
1504
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1505
+ #
1506
+ # @return [::Google::Cloud::DataCatalog::V1beta1::TagTemplate]
1507
+ #
1508
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1509
+ #
1510
+ # @example Basic example
1511
+ # require "google/cloud/data_catalog/v1beta1"
1512
+ #
1513
+ # # Create a client object. The client can be reused for multiple calls.
1514
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1515
+ #
1516
+ # # Create a request. To set request fields, pass in keyword arguments.
1517
+ # request = Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateRequest.new
1518
+ #
1519
+ # # Call the update_tag_template method.
1520
+ # result = client.update_tag_template request
1521
+ #
1522
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplate.
1523
+ # p result
1524
+ #
1525
+ def update_tag_template request, options = nil
1526
+ raise ::ArgumentError, "request must be provided" if request.nil?
1527
+
1528
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateRequest
1529
+
1530
+ # Converts hash and nil to an options object
1531
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1532
+
1533
+ # Customize the options with defaults
1534
+ call_metadata = @config.rpcs.update_tag_template.metadata.to_h
1535
+
1536
+ # Set x-goog-api-client and x-goog-user-project headers
1537
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1538
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1539
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1540
+ transports_version_send: [:rest]
1541
+
1542
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1543
+
1544
+ options.apply_defaults timeout: @config.rpcs.update_tag_template.timeout,
1545
+ metadata: call_metadata,
1546
+ retry_policy: @config.rpcs.update_tag_template.retry_policy
1547
+
1548
+ options.apply_defaults timeout: @config.timeout,
1549
+ metadata: @config.metadata,
1550
+ retry_policy: @config.retry_policy
1551
+
1552
+ @data_catalog_stub.update_tag_template request, options do |result, operation|
1553
+ yield result, operation if block_given?
1554
+ return result
1555
+ end
1556
+ rescue ::Gapic::Rest::Error => e
1557
+ raise ::Google::Cloud::Error.from_error(e)
1558
+ end
1559
+
1560
+ ##
1561
+ # Deletes a tag template and all tags using the template.
1562
+ # Users should enable the Data Catalog API in the project identified by
1563
+ # the `name` parameter (see [Data Catalog Resource Project]
1564
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
1565
+ # more information).
1566
+ #
1567
+ # @overload delete_tag_template(request, options = nil)
1568
+ # Pass arguments to `delete_tag_template` via a request object, either of type
1569
+ # {::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateRequest} or an equivalent Hash.
1570
+ #
1571
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateRequest, ::Hash]
1572
+ # A request object representing the call parameters. Required. To specify no
1573
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1574
+ # @param options [::Gapic::CallOptions, ::Hash]
1575
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1576
+ #
1577
+ # @overload delete_tag_template(name: nil, force: nil)
1578
+ # Pass arguments to `delete_tag_template` via keyword arguments. Note that at
1579
+ # least one keyword argument is required. To specify no parameters, or to keep all
1580
+ # the default parameter values, pass an empty Hash as a request object (see above).
1581
+ #
1582
+ # @param name [::String]
1583
+ # Required. The name of the tag template to delete. Example:
1584
+ #
1585
+ # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}
1586
+ # @param force [::Boolean]
1587
+ # Required. Currently, this field must always be set to `true`.
1588
+ # This confirms the deletion of any possible tags using this template.
1589
+ # `force = false` will be supported in the future.
1590
+ # @yield [result, operation] Access the result along with the TransportOperation object
1591
+ # @yieldparam result [::Google::Protobuf::Empty]
1592
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1593
+ #
1594
+ # @return [::Google::Protobuf::Empty]
1595
+ #
1596
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1597
+ #
1598
+ # @example Basic example
1599
+ # require "google/cloud/data_catalog/v1beta1"
1600
+ #
1601
+ # # Create a client object. The client can be reused for multiple calls.
1602
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1603
+ #
1604
+ # # Create a request. To set request fields, pass in keyword arguments.
1605
+ # request = Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateRequest.new
1606
+ #
1607
+ # # Call the delete_tag_template method.
1608
+ # result = client.delete_tag_template request
1609
+ #
1610
+ # # The returned object is of type Google::Protobuf::Empty.
1611
+ # p result
1612
+ #
1613
+ def delete_tag_template request, options = nil
1614
+ raise ::ArgumentError, "request must be provided" if request.nil?
1615
+
1616
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateRequest
1617
+
1618
+ # Converts hash and nil to an options object
1619
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1620
+
1621
+ # Customize the options with defaults
1622
+ call_metadata = @config.rpcs.delete_tag_template.metadata.to_h
1623
+
1624
+ # Set x-goog-api-client and x-goog-user-project headers
1625
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1626
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1627
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1628
+ transports_version_send: [:rest]
1629
+
1630
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1631
+
1632
+ options.apply_defaults timeout: @config.rpcs.delete_tag_template.timeout,
1633
+ metadata: call_metadata,
1634
+ retry_policy: @config.rpcs.delete_tag_template.retry_policy
1635
+
1636
+ options.apply_defaults timeout: @config.timeout,
1637
+ metadata: @config.metadata,
1638
+ retry_policy: @config.retry_policy
1639
+
1640
+ @data_catalog_stub.delete_tag_template request, options do |result, operation|
1641
+ yield result, operation if block_given?
1642
+ return result
1643
+ end
1644
+ rescue ::Gapic::Rest::Error => e
1645
+ raise ::Google::Cloud::Error.from_error(e)
1646
+ end
1647
+
1648
+ ##
1649
+ # Creates a field in a tag template. The user should enable the Data Catalog
1650
+ # API in the project identified by the `parent` parameter (see
1651
+ # [Data Catalog Resource
1652
+ # Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project)
1653
+ # for more information).
1654
+ #
1655
+ # @overload create_tag_template_field(request, options = nil)
1656
+ # Pass arguments to `create_tag_template_field` via a request object, either of type
1657
+ # {::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateFieldRequest} or an equivalent Hash.
1658
+ #
1659
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateFieldRequest, ::Hash]
1660
+ # A request object representing the call parameters. Required. To specify no
1661
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1662
+ # @param options [::Gapic::CallOptions, ::Hash]
1663
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1664
+ #
1665
+ # @overload create_tag_template_field(parent: nil, tag_template_field_id: nil, tag_template_field: nil)
1666
+ # Pass arguments to `create_tag_template_field` via keyword arguments. Note that at
1667
+ # least one keyword argument is required. To specify no parameters, or to keep all
1668
+ # the default parameter values, pass an empty Hash as a request object (see above).
1669
+ #
1670
+ # @param parent [::String]
1671
+ # Required. The name of the project and the template location
1672
+ # [region](https://cloud.google.com/data-catalog/docs/concepts/regions).
1673
+ #
1674
+ # Example:
1675
+ #
1676
+ # * projects/\\{project_id}/locations/us-central1/tagTemplates/\\{tag_template_id}
1677
+ # @param tag_template_field_id [::String]
1678
+ # Required. The ID of the tag template field to create.
1679
+ # Field ids can contain letters (both uppercase and lowercase), numbers
1680
+ # (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
1681
+ # character long and at most 128 characters long. Field IDs must also be
1682
+ # unique within their template.
1683
+ # @param tag_template_field [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField, ::Hash]
1684
+ # Required. The tag template field to create.
1685
+ # @yield [result, operation] Access the result along with the TransportOperation object
1686
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1687
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1688
+ #
1689
+ # @return [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1690
+ #
1691
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1692
+ #
1693
+ # @example Basic example
1694
+ # require "google/cloud/data_catalog/v1beta1"
1695
+ #
1696
+ # # Create a client object. The client can be reused for multiple calls.
1697
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1698
+ #
1699
+ # # Create a request. To set request fields, pass in keyword arguments.
1700
+ # request = Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateFieldRequest.new
1701
+ #
1702
+ # # Call the create_tag_template_field method.
1703
+ # result = client.create_tag_template_field request
1704
+ #
1705
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
1706
+ # p result
1707
+ #
1708
+ def create_tag_template_field request, options = nil
1709
+ raise ::ArgumentError, "request must be provided" if request.nil?
1710
+
1711
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateFieldRequest
1712
+
1713
+ # Converts hash and nil to an options object
1714
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1715
+
1716
+ # Customize the options with defaults
1717
+ call_metadata = @config.rpcs.create_tag_template_field.metadata.to_h
1718
+
1719
+ # Set x-goog-api-client and x-goog-user-project headers
1720
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1721
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1722
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1723
+ transports_version_send: [:rest]
1724
+
1725
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1726
+
1727
+ options.apply_defaults timeout: @config.rpcs.create_tag_template_field.timeout,
1728
+ metadata: call_metadata,
1729
+ retry_policy: @config.rpcs.create_tag_template_field.retry_policy
1730
+
1731
+ options.apply_defaults timeout: @config.timeout,
1732
+ metadata: @config.metadata,
1733
+ retry_policy: @config.retry_policy
1734
+
1735
+ @data_catalog_stub.create_tag_template_field request, options do |result, operation|
1736
+ yield result, operation if block_given?
1737
+ return result
1738
+ end
1739
+ rescue ::Gapic::Rest::Error => e
1740
+ raise ::Google::Cloud::Error.from_error(e)
1741
+ end
1742
+
1743
+ ##
1744
+ # Updates a field in a tag template. This method cannot be used to update the
1745
+ # field type. Users should enable the Data Catalog API in the project
1746
+ # identified by the `name` parameter (see [Data Catalog Resource Project]
1747
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
1748
+ # more information).
1749
+ #
1750
+ # @overload update_tag_template_field(request, options = nil)
1751
+ # Pass arguments to `update_tag_template_field` via a request object, either of type
1752
+ # {::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateFieldRequest} or an equivalent Hash.
1753
+ #
1754
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateFieldRequest, ::Hash]
1755
+ # A request object representing the call parameters. Required. To specify no
1756
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1757
+ # @param options [::Gapic::CallOptions, ::Hash]
1758
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1759
+ #
1760
+ # @overload update_tag_template_field(name: nil, tag_template_field: nil, update_mask: nil)
1761
+ # Pass arguments to `update_tag_template_field` via keyword arguments. Note that at
1762
+ # least one keyword argument is required. To specify no parameters, or to keep all
1763
+ # the default parameter values, pass an empty Hash as a request object (see above).
1764
+ #
1765
+ # @param name [::String]
1766
+ # Required. The name of the tag template field. Example:
1767
+ #
1768
+ # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}/fields/\\{tag_template_field_id}
1769
+ # @param tag_template_field [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField, ::Hash]
1770
+ # Required. The template to update.
1771
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1772
+ # Optional. Names of fields whose values to overwrite on an individual field
1773
+ # of a tag template. The following fields are modifiable:
1774
+ #
1775
+ # * `display_name`
1776
+ # * `type.enum_type`
1777
+ # * `is_required`
1778
+ #
1779
+ # If this parameter is absent or empty, all modifiable fields
1780
+ # are overwritten. If such fields are non-required and omitted in the request
1781
+ # body, their values are emptied with one exception: when updating an enum
1782
+ # type, the provided values are merged with the existing values. Therefore,
1783
+ # enum values can only be added, existing enum values cannot be deleted or
1784
+ # renamed.
1785
+ #
1786
+ # Additionally, updating a template field from optional to required is
1787
+ # *not* allowed.
1788
+ # @yield [result, operation] Access the result along with the TransportOperation object
1789
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1790
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1791
+ #
1792
+ # @return [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1793
+ #
1794
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1795
+ #
1796
+ # @example Basic example
1797
+ # require "google/cloud/data_catalog/v1beta1"
1798
+ #
1799
+ # # Create a client object. The client can be reused for multiple calls.
1800
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1801
+ #
1802
+ # # Create a request. To set request fields, pass in keyword arguments.
1803
+ # request = Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateFieldRequest.new
1804
+ #
1805
+ # # Call the update_tag_template_field method.
1806
+ # result = client.update_tag_template_field request
1807
+ #
1808
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
1809
+ # p result
1810
+ #
1811
+ def update_tag_template_field request, options = nil
1812
+ raise ::ArgumentError, "request must be provided" if request.nil?
1813
+
1814
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateFieldRequest
1815
+
1816
+ # Converts hash and nil to an options object
1817
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1818
+
1819
+ # Customize the options with defaults
1820
+ call_metadata = @config.rpcs.update_tag_template_field.metadata.to_h
1821
+
1822
+ # Set x-goog-api-client and x-goog-user-project headers
1823
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1824
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1825
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1826
+ transports_version_send: [:rest]
1827
+
1828
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1829
+
1830
+ options.apply_defaults timeout: @config.rpcs.update_tag_template_field.timeout,
1831
+ metadata: call_metadata,
1832
+ retry_policy: @config.rpcs.update_tag_template_field.retry_policy
1833
+
1834
+ options.apply_defaults timeout: @config.timeout,
1835
+ metadata: @config.metadata,
1836
+ retry_policy: @config.retry_policy
1837
+
1838
+ @data_catalog_stub.update_tag_template_field request, options do |result, operation|
1839
+ yield result, operation if block_given?
1840
+ return result
1841
+ end
1842
+ rescue ::Gapic::Rest::Error => e
1843
+ raise ::Google::Cloud::Error.from_error(e)
1844
+ end
1845
+
1846
+ ##
1847
+ # Renames a field in a tag template. The user should enable the Data Catalog
1848
+ # API in the project identified by the `name` parameter (see [Data Catalog
1849
+ # Resource
1850
+ # Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project)
1851
+ # for more information).
1852
+ #
1853
+ # @overload rename_tag_template_field(request, options = nil)
1854
+ # Pass arguments to `rename_tag_template_field` via a request object, either of type
1855
+ # {::Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldRequest} or an equivalent Hash.
1856
+ #
1857
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldRequest, ::Hash]
1858
+ # A request object representing the call parameters. Required. To specify no
1859
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1860
+ # @param options [::Gapic::CallOptions, ::Hash]
1861
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1862
+ #
1863
+ # @overload rename_tag_template_field(name: nil, new_tag_template_field_id: nil)
1864
+ # Pass arguments to `rename_tag_template_field` via keyword arguments. Note that at
1865
+ # least one keyword argument is required. To specify no parameters, or to keep all
1866
+ # the default parameter values, pass an empty Hash as a request object (see above).
1867
+ #
1868
+ # @param name [::String]
1869
+ # Required. The name of the tag template. Example:
1870
+ #
1871
+ # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}/fields/\\{tag_template_field_id}
1872
+ # @param new_tag_template_field_id [::String]
1873
+ # Required. The new ID of this tag template field. For example,
1874
+ # `my_new_field`.
1875
+ # @yield [result, operation] Access the result along with the TransportOperation object
1876
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1877
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1878
+ #
1879
+ # @return [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1880
+ #
1881
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1882
+ #
1883
+ # @example Basic example
1884
+ # require "google/cloud/data_catalog/v1beta1"
1885
+ #
1886
+ # # Create a client object. The client can be reused for multiple calls.
1887
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1888
+ #
1889
+ # # Create a request. To set request fields, pass in keyword arguments.
1890
+ # request = Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldRequest.new
1891
+ #
1892
+ # # Call the rename_tag_template_field method.
1893
+ # result = client.rename_tag_template_field request
1894
+ #
1895
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
1896
+ # p result
1897
+ #
1898
+ def rename_tag_template_field request, options = nil
1899
+ raise ::ArgumentError, "request must be provided" if request.nil?
1900
+
1901
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldRequest
1902
+
1903
+ # Converts hash and nil to an options object
1904
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1905
+
1906
+ # Customize the options with defaults
1907
+ call_metadata = @config.rpcs.rename_tag_template_field.metadata.to_h
1908
+
1909
+ # Set x-goog-api-client and x-goog-user-project headers
1910
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1911
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1912
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1913
+ transports_version_send: [:rest]
1914
+
1915
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1916
+
1917
+ options.apply_defaults timeout: @config.rpcs.rename_tag_template_field.timeout,
1918
+ metadata: call_metadata,
1919
+ retry_policy: @config.rpcs.rename_tag_template_field.retry_policy
1920
+
1921
+ options.apply_defaults timeout: @config.timeout,
1922
+ metadata: @config.metadata,
1923
+ retry_policy: @config.retry_policy
1924
+
1925
+ @data_catalog_stub.rename_tag_template_field request, options do |result, operation|
1926
+ yield result, operation if block_given?
1927
+ return result
1928
+ end
1929
+ rescue ::Gapic::Rest::Error => e
1930
+ raise ::Google::Cloud::Error.from_error(e)
1931
+ end
1932
+
1933
+ ##
1934
+ # Renames an enum value in a tag template. The enum values have to be unique
1935
+ # within one enum field. Thus, an enum value cannot be renamed with a name
1936
+ # used in any other enum value within the same enum field.
1937
+ #
1938
+ # @overload rename_tag_template_field_enum_value(request, options = nil)
1939
+ # Pass arguments to `rename_tag_template_field_enum_value` via a request object, either of type
1940
+ # {::Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldEnumValueRequest} or an equivalent Hash.
1941
+ #
1942
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldEnumValueRequest, ::Hash]
1943
+ # A request object representing the call parameters. Required. To specify no
1944
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1945
+ # @param options [::Gapic::CallOptions, ::Hash]
1946
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1947
+ #
1948
+ # @overload rename_tag_template_field_enum_value(name: nil, new_enum_value_display_name: nil)
1949
+ # Pass arguments to `rename_tag_template_field_enum_value` via keyword arguments. Note that at
1950
+ # least one keyword argument is required. To specify no parameters, or to keep all
1951
+ # the default parameter values, pass an empty Hash as a request object (see above).
1952
+ #
1953
+ # @param name [::String]
1954
+ # Required. The name of the enum field value. Example:
1955
+ #
1956
+ # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}/fields/\\{tag_template_field_id}/enumValues/\\{enum_value_display_name}
1957
+ # @param new_enum_value_display_name [::String]
1958
+ # Required. The new display name of the enum value. For example,
1959
+ # `my_new_enum_value`.
1960
+ # @yield [result, operation] Access the result along with the TransportOperation object
1961
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1962
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1963
+ #
1964
+ # @return [::Google::Cloud::DataCatalog::V1beta1::TagTemplateField]
1965
+ #
1966
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1967
+ #
1968
+ # @example Basic example
1969
+ # require "google/cloud/data_catalog/v1beta1"
1970
+ #
1971
+ # # Create a client object. The client can be reused for multiple calls.
1972
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
1973
+ #
1974
+ # # Create a request. To set request fields, pass in keyword arguments.
1975
+ # request = Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldEnumValueRequest.new
1976
+ #
1977
+ # # Call the rename_tag_template_field_enum_value method.
1978
+ # result = client.rename_tag_template_field_enum_value request
1979
+ #
1980
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
1981
+ # p result
1982
+ #
1983
+ def rename_tag_template_field_enum_value request, options = nil
1984
+ raise ::ArgumentError, "request must be provided" if request.nil?
1985
+
1986
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldEnumValueRequest
1987
+
1988
+ # Converts hash and nil to an options object
1989
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1990
+
1991
+ # Customize the options with defaults
1992
+ call_metadata = @config.rpcs.rename_tag_template_field_enum_value.metadata.to_h
1993
+
1994
+ # Set x-goog-api-client and x-goog-user-project headers
1995
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1996
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1997
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
1998
+ transports_version_send: [:rest]
1999
+
2000
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2001
+
2002
+ options.apply_defaults timeout: @config.rpcs.rename_tag_template_field_enum_value.timeout,
2003
+ metadata: call_metadata,
2004
+ retry_policy: @config.rpcs.rename_tag_template_field_enum_value.retry_policy
2005
+
2006
+ options.apply_defaults timeout: @config.timeout,
2007
+ metadata: @config.metadata,
2008
+ retry_policy: @config.retry_policy
2009
+
2010
+ @data_catalog_stub.rename_tag_template_field_enum_value request, options do |result, operation|
2011
+ yield result, operation if block_given?
2012
+ return result
2013
+ end
2014
+ rescue ::Gapic::Rest::Error => e
2015
+ raise ::Google::Cloud::Error.from_error(e)
2016
+ end
2017
+
2018
+ ##
2019
+ # Deletes a field in a tag template and all uses of that field.
2020
+ # Users should enable the Data Catalog API in the project identified by
2021
+ # the `name` parameter (see [Data Catalog Resource Project]
2022
+ # (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
2023
+ # more information).
2024
+ #
2025
+ # @overload delete_tag_template_field(request, options = nil)
2026
+ # Pass arguments to `delete_tag_template_field` via a request object, either of type
2027
+ # {::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateFieldRequest} or an equivalent Hash.
2028
+ #
2029
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateFieldRequest, ::Hash]
2030
+ # A request object representing the call parameters. Required. To specify no
2031
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2032
+ # @param options [::Gapic::CallOptions, ::Hash]
2033
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2034
+ #
2035
+ # @overload delete_tag_template_field(name: nil, force: nil)
2036
+ # Pass arguments to `delete_tag_template_field` via keyword arguments. Note that at
2037
+ # least one keyword argument is required. To specify no parameters, or to keep all
2038
+ # the default parameter values, pass an empty Hash as a request object (see above).
2039
+ #
2040
+ # @param name [::String]
2041
+ # Required. The name of the tag template field to delete. Example:
2042
+ #
2043
+ # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}/fields/\\{tag_template_field_id}
2044
+ # @param force [::Boolean]
2045
+ # Required. Currently, this field must always be set to `true`.
2046
+ # This confirms the deletion of this field from any tags using this field.
2047
+ # `force = false` will be supported in the future.
2048
+ # @yield [result, operation] Access the result along with the TransportOperation object
2049
+ # @yieldparam result [::Google::Protobuf::Empty]
2050
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2051
+ #
2052
+ # @return [::Google::Protobuf::Empty]
2053
+ #
2054
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2055
+ #
2056
+ # @example Basic example
2057
+ # require "google/cloud/data_catalog/v1beta1"
2058
+ #
2059
+ # # Create a client object. The client can be reused for multiple calls.
2060
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2061
+ #
2062
+ # # Create a request. To set request fields, pass in keyword arguments.
2063
+ # request = Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateFieldRequest.new
2064
+ #
2065
+ # # Call the delete_tag_template_field method.
2066
+ # result = client.delete_tag_template_field request
2067
+ #
2068
+ # # The returned object is of type Google::Protobuf::Empty.
2069
+ # p result
2070
+ #
2071
+ def delete_tag_template_field request, options = nil
2072
+ raise ::ArgumentError, "request must be provided" if request.nil?
2073
+
2074
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateFieldRequest
2075
+
2076
+ # Converts hash and nil to an options object
2077
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2078
+
2079
+ # Customize the options with defaults
2080
+ call_metadata = @config.rpcs.delete_tag_template_field.metadata.to_h
2081
+
2082
+ # Set x-goog-api-client and x-goog-user-project headers
2083
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2084
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2085
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2086
+ transports_version_send: [:rest]
2087
+
2088
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2089
+
2090
+ options.apply_defaults timeout: @config.rpcs.delete_tag_template_field.timeout,
2091
+ metadata: call_metadata,
2092
+ retry_policy: @config.rpcs.delete_tag_template_field.retry_policy
2093
+
2094
+ options.apply_defaults timeout: @config.timeout,
2095
+ metadata: @config.metadata,
2096
+ retry_policy: @config.retry_policy
2097
+
2098
+ @data_catalog_stub.delete_tag_template_field request, options do |result, operation|
2099
+ yield result, operation if block_given?
2100
+ return result
2101
+ end
2102
+ rescue ::Gapic::Rest::Error => e
2103
+ raise ::Google::Cloud::Error.from_error(e)
2104
+ end
2105
+
2106
+ ##
2107
+ # Creates a tag on an {::Google::Cloud::DataCatalog::V1beta1::Entry Entry}.
2108
+ # Note: The project identified by the `parent` parameter for the
2109
+ # [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters)
2110
+ # and the
2111
+ # [tag
2112
+ # template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters)
2113
+ # used to create the tag must be from the same organization.
2114
+ #
2115
+ # @overload create_tag(request, options = nil)
2116
+ # Pass arguments to `create_tag` via a request object, either of type
2117
+ # {::Google::Cloud::DataCatalog::V1beta1::CreateTagRequest} or an equivalent Hash.
2118
+ #
2119
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::CreateTagRequest, ::Hash]
2120
+ # A request object representing the call parameters. Required. To specify no
2121
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2122
+ # @param options [::Gapic::CallOptions, ::Hash]
2123
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2124
+ #
2125
+ # @overload create_tag(parent: nil, tag: nil)
2126
+ # Pass arguments to `create_tag` via keyword arguments. Note that at
2127
+ # least one keyword argument is required. To specify no parameters, or to keep all
2128
+ # the default parameter values, pass an empty Hash as a request object (see above).
2129
+ #
2130
+ # @param parent [::String]
2131
+ # Required. The name of the resource to attach this tag to. Tags can be
2132
+ # attached to Entries. Example:
2133
+ #
2134
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}/entries/\\{entry_id}
2135
+ #
2136
+ # Note that this Tag and its child resources may not actually be stored in
2137
+ # the location in this name.
2138
+ # @param tag [::Google::Cloud::DataCatalog::V1beta1::Tag, ::Hash]
2139
+ # Required. The tag to create.
2140
+ # @yield [result, operation] Access the result along with the TransportOperation object
2141
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Tag]
2142
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2143
+ #
2144
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Tag]
2145
+ #
2146
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2147
+ #
2148
+ # @example Basic example
2149
+ # require "google/cloud/data_catalog/v1beta1"
2150
+ #
2151
+ # # Create a client object. The client can be reused for multiple calls.
2152
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2153
+ #
2154
+ # # Create a request. To set request fields, pass in keyword arguments.
2155
+ # request = Google::Cloud::DataCatalog::V1beta1::CreateTagRequest.new
2156
+ #
2157
+ # # Call the create_tag method.
2158
+ # result = client.create_tag request
2159
+ #
2160
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Tag.
2161
+ # p result
2162
+ #
2163
+ def create_tag request, options = nil
2164
+ raise ::ArgumentError, "request must be provided" if request.nil?
2165
+
2166
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::CreateTagRequest
2167
+
2168
+ # Converts hash and nil to an options object
2169
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2170
+
2171
+ # Customize the options with defaults
2172
+ call_metadata = @config.rpcs.create_tag.metadata.to_h
2173
+
2174
+ # Set x-goog-api-client and x-goog-user-project headers
2175
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2176
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2177
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2178
+ transports_version_send: [:rest]
2179
+
2180
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2181
+
2182
+ options.apply_defaults timeout: @config.rpcs.create_tag.timeout,
2183
+ metadata: call_metadata,
2184
+ retry_policy: @config.rpcs.create_tag.retry_policy
2185
+
2186
+ options.apply_defaults timeout: @config.timeout,
2187
+ metadata: @config.metadata,
2188
+ retry_policy: @config.retry_policy
2189
+
2190
+ @data_catalog_stub.create_tag request, options do |result, operation|
2191
+ yield result, operation if block_given?
2192
+ return result
2193
+ end
2194
+ rescue ::Gapic::Rest::Error => e
2195
+ raise ::Google::Cloud::Error.from_error(e)
2196
+ end
2197
+
2198
+ ##
2199
+ # Updates an existing tag.
2200
+ #
2201
+ # @overload update_tag(request, options = nil)
2202
+ # Pass arguments to `update_tag` via a request object, either of type
2203
+ # {::Google::Cloud::DataCatalog::V1beta1::UpdateTagRequest} or an equivalent Hash.
2204
+ #
2205
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::UpdateTagRequest, ::Hash]
2206
+ # A request object representing the call parameters. Required. To specify no
2207
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2208
+ # @param options [::Gapic::CallOptions, ::Hash]
2209
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2210
+ #
2211
+ # @overload update_tag(tag: nil, update_mask: nil)
2212
+ # Pass arguments to `update_tag` via keyword arguments. Note that at
2213
+ # least one keyword argument is required. To specify no parameters, or to keep all
2214
+ # the default parameter values, pass an empty Hash as a request object (see above).
2215
+ #
2216
+ # @param tag [::Google::Cloud::DataCatalog::V1beta1::Tag, ::Hash]
2217
+ # Required. The updated tag. The "name" field must be set.
2218
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2219
+ # Note: Currently, this parameter can only take `"fields"` as value.
2220
+ #
2221
+ # Names of fields whose values to overwrite on a tag. Currently, a tag has
2222
+ # the only modifiable field with the name `fields`.
2223
+ #
2224
+ # In general, if this parameter is absent or empty, all modifiable fields
2225
+ # are overwritten. If such fields are non-required and omitted in the
2226
+ # request body, their values are emptied.
2227
+ # @yield [result, operation] Access the result along with the TransportOperation object
2228
+ # @yieldparam result [::Google::Cloud::DataCatalog::V1beta1::Tag]
2229
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2230
+ #
2231
+ # @return [::Google::Cloud::DataCatalog::V1beta1::Tag]
2232
+ #
2233
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2234
+ #
2235
+ # @example Basic example
2236
+ # require "google/cloud/data_catalog/v1beta1"
2237
+ #
2238
+ # # Create a client object. The client can be reused for multiple calls.
2239
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2240
+ #
2241
+ # # Create a request. To set request fields, pass in keyword arguments.
2242
+ # request = Google::Cloud::DataCatalog::V1beta1::UpdateTagRequest.new
2243
+ #
2244
+ # # Call the update_tag method.
2245
+ # result = client.update_tag request
2246
+ #
2247
+ # # The returned object is of type Google::Cloud::DataCatalog::V1beta1::Tag.
2248
+ # p result
2249
+ #
2250
+ def update_tag request, options = nil
2251
+ raise ::ArgumentError, "request must be provided" if request.nil?
2252
+
2253
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::UpdateTagRequest
2254
+
2255
+ # Converts hash and nil to an options object
2256
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2257
+
2258
+ # Customize the options with defaults
2259
+ call_metadata = @config.rpcs.update_tag.metadata.to_h
2260
+
2261
+ # Set x-goog-api-client and x-goog-user-project headers
2262
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2263
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2264
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2265
+ transports_version_send: [:rest]
2266
+
2267
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2268
+
2269
+ options.apply_defaults timeout: @config.rpcs.update_tag.timeout,
2270
+ metadata: call_metadata,
2271
+ retry_policy: @config.rpcs.update_tag.retry_policy
2272
+
2273
+ options.apply_defaults timeout: @config.timeout,
2274
+ metadata: @config.metadata,
2275
+ retry_policy: @config.retry_policy
2276
+
2277
+ @data_catalog_stub.update_tag request, options do |result, operation|
2278
+ yield result, operation if block_given?
2279
+ return result
2280
+ end
2281
+ rescue ::Gapic::Rest::Error => e
2282
+ raise ::Google::Cloud::Error.from_error(e)
2283
+ end
2284
+
2285
+ ##
2286
+ # Deletes a tag.
2287
+ #
2288
+ # @overload delete_tag(request, options = nil)
2289
+ # Pass arguments to `delete_tag` via a request object, either of type
2290
+ # {::Google::Cloud::DataCatalog::V1beta1::DeleteTagRequest} or an equivalent Hash.
2291
+ #
2292
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::DeleteTagRequest, ::Hash]
2293
+ # A request object representing the call parameters. Required. To specify no
2294
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2295
+ # @param options [::Gapic::CallOptions, ::Hash]
2296
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2297
+ #
2298
+ # @overload delete_tag(name: nil)
2299
+ # Pass arguments to `delete_tag` via keyword arguments. Note that at
2300
+ # least one keyword argument is required. To specify no parameters, or to keep all
2301
+ # the default parameter values, pass an empty Hash as a request object (see above).
2302
+ #
2303
+ # @param name [::String]
2304
+ # Required. The name of the tag to delete. Example:
2305
+ #
2306
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}/entries/\\{entry_id}/tags/\\{tag_id}
2307
+ # @yield [result, operation] Access the result along with the TransportOperation object
2308
+ # @yieldparam result [::Google::Protobuf::Empty]
2309
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2310
+ #
2311
+ # @return [::Google::Protobuf::Empty]
2312
+ #
2313
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2314
+ #
2315
+ # @example Basic example
2316
+ # require "google/cloud/data_catalog/v1beta1"
2317
+ #
2318
+ # # Create a client object. The client can be reused for multiple calls.
2319
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2320
+ #
2321
+ # # Create a request. To set request fields, pass in keyword arguments.
2322
+ # request = Google::Cloud::DataCatalog::V1beta1::DeleteTagRequest.new
2323
+ #
2324
+ # # Call the delete_tag method.
2325
+ # result = client.delete_tag request
2326
+ #
2327
+ # # The returned object is of type Google::Protobuf::Empty.
2328
+ # p result
2329
+ #
2330
+ def delete_tag request, options = nil
2331
+ raise ::ArgumentError, "request must be provided" if request.nil?
2332
+
2333
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::DeleteTagRequest
2334
+
2335
+ # Converts hash and nil to an options object
2336
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2337
+
2338
+ # Customize the options with defaults
2339
+ call_metadata = @config.rpcs.delete_tag.metadata.to_h
2340
+
2341
+ # Set x-goog-api-client and x-goog-user-project headers
2342
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2343
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2344
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2345
+ transports_version_send: [:rest]
2346
+
2347
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2348
+
2349
+ options.apply_defaults timeout: @config.rpcs.delete_tag.timeout,
2350
+ metadata: call_metadata,
2351
+ retry_policy: @config.rpcs.delete_tag.retry_policy
2352
+
2353
+ options.apply_defaults timeout: @config.timeout,
2354
+ metadata: @config.metadata,
2355
+ retry_policy: @config.retry_policy
2356
+
2357
+ @data_catalog_stub.delete_tag request, options do |result, operation|
2358
+ yield result, operation if block_given?
2359
+ return result
2360
+ end
2361
+ rescue ::Gapic::Rest::Error => e
2362
+ raise ::Google::Cloud::Error.from_error(e)
2363
+ end
2364
+
2365
+ ##
2366
+ # Lists tags assigned to an {::Google::Cloud::DataCatalog::V1beta1::Entry Entry}.
2367
+ # The {::Google::Cloud::DataCatalog::V1beta1::Tag#column columns} in the response
2368
+ # are lowercased.
2369
+ #
2370
+ # @overload list_tags(request, options = nil)
2371
+ # Pass arguments to `list_tags` via a request object, either of type
2372
+ # {::Google::Cloud::DataCatalog::V1beta1::ListTagsRequest} or an equivalent Hash.
2373
+ #
2374
+ # @param request [::Google::Cloud::DataCatalog::V1beta1::ListTagsRequest, ::Hash]
2375
+ # A request object representing the call parameters. Required. To specify no
2376
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2377
+ # @param options [::Gapic::CallOptions, ::Hash]
2378
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2379
+ #
2380
+ # @overload list_tags(parent: nil, page_size: nil, page_token: nil)
2381
+ # Pass arguments to `list_tags` via keyword arguments. Note that at
2382
+ # least one keyword argument is required. To specify no parameters, or to keep all
2383
+ # the default parameter values, pass an empty Hash as a request object (see above).
2384
+ #
2385
+ # @param parent [::String]
2386
+ # Required. The name of the Data Catalog resource to list the tags of. The
2387
+ # resource could be an {::Google::Cloud::DataCatalog::V1beta1::Entry Entry} or an
2388
+ # {::Google::Cloud::DataCatalog::V1beta1::EntryGroup EntryGroup}.
2389
+ #
2390
+ # Examples:
2391
+ #
2392
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}
2393
+ # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}/entries/\\{entry_id}
2394
+ # @param page_size [::Integer]
2395
+ # The maximum number of tags to return. Default is 10. Max limit is 1000.
2396
+ # @param page_token [::String]
2397
+ # Token that specifies which page is requested. If empty, the first page is
2398
+ # returned.
2399
+ # @yield [result, operation] Access the result along with the TransportOperation object
2400
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Tag>]
2401
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2402
+ #
2403
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Tag>]
2404
+ #
2405
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2406
+ #
2407
+ # @example Basic example
2408
+ # require "google/cloud/data_catalog/v1beta1"
2409
+ #
2410
+ # # Create a client object. The client can be reused for multiple calls.
2411
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2412
+ #
2413
+ # # Create a request. To set request fields, pass in keyword arguments.
2414
+ # request = Google::Cloud::DataCatalog::V1beta1::ListTagsRequest.new
2415
+ #
2416
+ # # Call the list_tags method.
2417
+ # result = client.list_tags request
2418
+ #
2419
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2420
+ # # over elements, and API calls will be issued to fetch pages as needed.
2421
+ # result.each do |item|
2422
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::Tag.
2423
+ # p item
2424
+ # end
2425
+ #
2426
+ def list_tags request, options = nil
2427
+ raise ::ArgumentError, "request must be provided" if request.nil?
2428
+
2429
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1beta1::ListTagsRequest
2430
+
2431
+ # Converts hash and nil to an options object
2432
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2433
+
2434
+ # Customize the options with defaults
2435
+ call_metadata = @config.rpcs.list_tags.metadata.to_h
2436
+
2437
+ # Set x-goog-api-client and x-goog-user-project headers
2438
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2439
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2440
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2441
+ transports_version_send: [:rest]
2442
+
2443
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2444
+
2445
+ options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
2446
+ metadata: call_metadata,
2447
+ retry_policy: @config.rpcs.list_tags.retry_policy
2448
+
2449
+ options.apply_defaults timeout: @config.timeout,
2450
+ metadata: @config.metadata,
2451
+ retry_policy: @config.retry_policy
2452
+
2453
+ @data_catalog_stub.list_tags request, options do |result, operation|
2454
+ result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_tags, "tags", request, result, options
2455
+ yield result, operation if block_given?
2456
+ return result
2457
+ end
2458
+ rescue ::Gapic::Rest::Error => e
2459
+ raise ::Google::Cloud::Error.from_error(e)
2460
+ end
2461
+
2462
+ ##
2463
+ # Sets the access control policy for a resource. Replaces any existing
2464
+ # policy.
2465
+ # Supported resources are:
2466
+ # - Tag templates.
2467
+ # - Entries.
2468
+ # - Entry groups.
2469
+ # Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
2470
+ # and any external Google Cloud Platform resources synced to Data Catalog.
2471
+ #
2472
+ # Callers must have following Google IAM permission
2473
+ # - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag
2474
+ # templates.
2475
+ # - `datacatalog.entries.setIamPolicy` to set policies on entries.
2476
+ # - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
2477
+ #
2478
+ # @overload set_iam_policy(request, options = nil)
2479
+ # Pass arguments to `set_iam_policy` via a request object, either of type
2480
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
2481
+ #
2482
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
2483
+ # A request object representing the call parameters. Required. To specify no
2484
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2485
+ # @param options [::Gapic::CallOptions, ::Hash]
2486
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2487
+ #
2488
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
2489
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
2490
+ # least one keyword argument is required. To specify no parameters, or to keep all
2491
+ # the default parameter values, pass an empty Hash as a request object (see above).
2492
+ #
2493
+ # @param resource [::String]
2494
+ # REQUIRED: The resource for which the policy is being specified.
2495
+ # See the operation documentation for the appropriate value for this field.
2496
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
2497
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
2498
+ # the policy is limited to a few 10s of KB. An empty policy is a
2499
+ # valid policy but certain Cloud Platform services (such as Projects)
2500
+ # might reject them.
2501
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2502
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
2503
+ # the fields in the mask will be modified. If no mask is provided, the
2504
+ # following default mask is used:
2505
+ #
2506
+ # `paths: "bindings, etag"`
2507
+ # @yield [result, operation] Access the result along with the TransportOperation object
2508
+ # @yieldparam result [::Google::Iam::V1::Policy]
2509
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2510
+ #
2511
+ # @return [::Google::Iam::V1::Policy]
2512
+ #
2513
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2514
+ #
2515
+ # @example Basic example
2516
+ # require "google/cloud/data_catalog/v1beta1"
2517
+ #
2518
+ # # Create a client object. The client can be reused for multiple calls.
2519
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2520
+ #
2521
+ # # Create a request. To set request fields, pass in keyword arguments.
2522
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
2523
+ #
2524
+ # # Call the set_iam_policy method.
2525
+ # result = client.set_iam_policy request
2526
+ #
2527
+ # # The returned object is of type Google::Iam::V1::Policy.
2528
+ # p result
2529
+ #
2530
+ def set_iam_policy request, options = nil
2531
+ raise ::ArgumentError, "request must be provided" if request.nil?
2532
+
2533
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
2534
+
2535
+ # Converts hash and nil to an options object
2536
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2537
+
2538
+ # Customize the options with defaults
2539
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
2540
+
2541
+ # Set x-goog-api-client and x-goog-user-project headers
2542
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2543
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2544
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2545
+ transports_version_send: [:rest]
2546
+
2547
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2548
+
2549
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
2550
+ metadata: call_metadata,
2551
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
2552
+
2553
+ options.apply_defaults timeout: @config.timeout,
2554
+ metadata: @config.metadata,
2555
+ retry_policy: @config.retry_policy
2556
+
2557
+ @data_catalog_stub.set_iam_policy request, options do |result, operation|
2558
+ yield result, operation if block_given?
2559
+ return result
2560
+ end
2561
+ rescue ::Gapic::Rest::Error => e
2562
+ raise ::Google::Cloud::Error.from_error(e)
2563
+ end
2564
+
2565
+ ##
2566
+ # Gets the access control policy for a resource. A `NOT_FOUND` error
2567
+ # is returned if the resource does not exist. An empty policy is returned
2568
+ # if the resource exists but does not have a policy set on it.
2569
+ #
2570
+ # Supported resources are:
2571
+ # - Tag templates.
2572
+ # - Entries.
2573
+ # - Entry groups.
2574
+ # Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
2575
+ # and any external Google Cloud Platform resources synced to Data Catalog.
2576
+ #
2577
+ # Callers must have following Google IAM permission
2578
+ # - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
2579
+ # templates.
2580
+ # - `datacatalog.entries.getIamPolicy` to get policies on entries.
2581
+ # - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
2582
+ #
2583
+ # @overload get_iam_policy(request, options = nil)
2584
+ # Pass arguments to `get_iam_policy` via a request object, either of type
2585
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
2586
+ #
2587
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
2588
+ # A request object representing the call parameters. Required. To specify no
2589
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2590
+ # @param options [::Gapic::CallOptions, ::Hash]
2591
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2592
+ #
2593
+ # @overload get_iam_policy(resource: nil, options: nil)
2594
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
2595
+ # least one keyword argument is required. To specify no parameters, or to keep all
2596
+ # the default parameter values, pass an empty Hash as a request object (see above).
2597
+ #
2598
+ # @param resource [::String]
2599
+ # REQUIRED: The resource for which the policy is being requested.
2600
+ # See the operation documentation for the appropriate value for this field.
2601
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
2602
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
2603
+ # `GetIamPolicy`.
2604
+ # @yield [result, operation] Access the result along with the TransportOperation object
2605
+ # @yieldparam result [::Google::Iam::V1::Policy]
2606
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2607
+ #
2608
+ # @return [::Google::Iam::V1::Policy]
2609
+ #
2610
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2611
+ #
2612
+ # @example Basic example
2613
+ # require "google/cloud/data_catalog/v1beta1"
2614
+ #
2615
+ # # Create a client object. The client can be reused for multiple calls.
2616
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2617
+ #
2618
+ # # Create a request. To set request fields, pass in keyword arguments.
2619
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
2620
+ #
2621
+ # # Call the get_iam_policy method.
2622
+ # result = client.get_iam_policy request
2623
+ #
2624
+ # # The returned object is of type Google::Iam::V1::Policy.
2625
+ # p result
2626
+ #
2627
+ def get_iam_policy request, options = nil
2628
+ raise ::ArgumentError, "request must be provided" if request.nil?
2629
+
2630
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
2631
+
2632
+ # Converts hash and nil to an options object
2633
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2634
+
2635
+ # Customize the options with defaults
2636
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
2637
+
2638
+ # Set x-goog-api-client and x-goog-user-project headers
2639
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2640
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2641
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2642
+ transports_version_send: [:rest]
2643
+
2644
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2645
+
2646
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
2647
+ metadata: call_metadata,
2648
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
2649
+
2650
+ options.apply_defaults timeout: @config.timeout,
2651
+ metadata: @config.metadata,
2652
+ retry_policy: @config.retry_policy
2653
+
2654
+ @data_catalog_stub.get_iam_policy request, options do |result, operation|
2655
+ yield result, operation if block_given?
2656
+ return result
2657
+ end
2658
+ rescue ::Gapic::Rest::Error => e
2659
+ raise ::Google::Cloud::Error.from_error(e)
2660
+ end
2661
+
2662
+ ##
2663
+ # Returns the caller's permissions on a resource.
2664
+ # If the resource does not exist, an empty set of permissions is returned
2665
+ # (We don't return a `NOT_FOUND` error).
2666
+ #
2667
+ # Supported resources are:
2668
+ # - Tag templates.
2669
+ # - Entries.
2670
+ # - Entry groups.
2671
+ # Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
2672
+ # and any external Google Cloud Platform resources synced to Data Catalog.
2673
+ #
2674
+ # A caller is not required to have Google IAM permission to make this
2675
+ # request.
2676
+ #
2677
+ # @overload test_iam_permissions(request, options = nil)
2678
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
2679
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
2680
+ #
2681
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
2682
+ # A request object representing the call parameters. Required. To specify no
2683
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2684
+ # @param options [::Gapic::CallOptions, ::Hash]
2685
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2686
+ #
2687
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
2688
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
2689
+ # least one keyword argument is required. To specify no parameters, or to keep all
2690
+ # the default parameter values, pass an empty Hash as a request object (see above).
2691
+ #
2692
+ # @param resource [::String]
2693
+ # REQUIRED: The resource for which the policy detail is being requested.
2694
+ # See the operation documentation for the appropriate value for this field.
2695
+ # @param permissions [::Array<::String>]
2696
+ # The set of permissions to check for the `resource`. Permissions with
2697
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
2698
+ # information see
2699
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2700
+ # @yield [result, operation] Access the result along with the TransportOperation object
2701
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
2702
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2703
+ #
2704
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
2705
+ #
2706
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2707
+ #
2708
+ # @example Basic example
2709
+ # require "google/cloud/data_catalog/v1beta1"
2710
+ #
2711
+ # # Create a client object. The client can be reused for multiple calls.
2712
+ # client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new
2713
+ #
2714
+ # # Create a request. To set request fields, pass in keyword arguments.
2715
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
2716
+ #
2717
+ # # Call the test_iam_permissions method.
2718
+ # result = client.test_iam_permissions request
2719
+ #
2720
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
2721
+ # p result
2722
+ #
2723
+ def test_iam_permissions request, options = nil
2724
+ raise ::ArgumentError, "request must be provided" if request.nil?
2725
+
2726
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
2727
+
2728
+ # Converts hash and nil to an options object
2729
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2730
+
2731
+ # Customize the options with defaults
2732
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
2733
+
2734
+ # Set x-goog-api-client and x-goog-user-project headers
2735
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2736
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2737
+ gapic_version: ::Google::Cloud::DataCatalog::V1beta1::VERSION,
2738
+ transports_version_send: [:rest]
2739
+
2740
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2741
+
2742
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
2743
+ metadata: call_metadata,
2744
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
2745
+
2746
+ options.apply_defaults timeout: @config.timeout,
2747
+ metadata: @config.metadata,
2748
+ retry_policy: @config.retry_policy
2749
+
2750
+ @data_catalog_stub.test_iam_permissions request, options do |result, operation|
2751
+ yield result, operation if block_given?
2752
+ return result
2753
+ end
2754
+ rescue ::Gapic::Rest::Error => e
2755
+ raise ::Google::Cloud::Error.from_error(e)
2756
+ end
2757
+
2758
+ ##
2759
+ # Configuration class for the DataCatalog REST API.
2760
+ #
2761
+ # This class represents the configuration for DataCatalog REST,
2762
+ # providing control over timeouts, retry behavior, logging, transport
2763
+ # parameters, and other low-level controls. Certain parameters can also be
2764
+ # applied individually to specific RPCs. See
2765
+ # {::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client::Configuration::Rpcs}
2766
+ # for a list of RPCs that can be configured independently.
2767
+ #
2768
+ # Configuration can be applied globally to all clients, or to a single client
2769
+ # on construction.
2770
+ #
2771
+ # @example
2772
+ #
2773
+ # # Modify the global config, setting the timeout for
2774
+ # # search_catalog to 20 seconds,
2775
+ # # and all remaining timeouts to 10 seconds.
2776
+ # ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.configure do |config|
2777
+ # config.timeout = 10.0
2778
+ # config.rpcs.search_catalog.timeout = 20.0
2779
+ # end
2780
+ #
2781
+ # # Apply the above configuration only to a new client.
2782
+ # client = ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Rest::Client.new do |config|
2783
+ # config.timeout = 10.0
2784
+ # config.rpcs.search_catalog.timeout = 20.0
2785
+ # end
2786
+ #
2787
+ # @!attribute [rw] endpoint
2788
+ # The hostname or hostname:port of the service endpoint.
2789
+ # Defaults to `"datacatalog.googleapis.com"`.
2790
+ # @return [::String]
2791
+ # @!attribute [rw] credentials
2792
+ # Credentials to send with calls. You may provide any of the following types:
2793
+ # * (`String`) The path to a service account key file in JSON format
2794
+ # * (`Hash`) A service account key as a Hash
2795
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2796
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2797
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2798
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2799
+ # * (`nil`) indicating no credentials
2800
+ # @return [::Object]
2801
+ # @!attribute [rw] scope
2802
+ # The OAuth scopes
2803
+ # @return [::Array<::String>]
2804
+ # @!attribute [rw] lib_name
2805
+ # The library name as recorded in instrumentation and logging
2806
+ # @return [::String]
2807
+ # @!attribute [rw] lib_version
2808
+ # The library version as recorded in instrumentation and logging
2809
+ # @return [::String]
2810
+ # @!attribute [rw] timeout
2811
+ # The call timeout in seconds.
2812
+ # @return [::Numeric]
2813
+ # @!attribute [rw] metadata
2814
+ # Additional headers to be sent with the call.
2815
+ # @return [::Hash{::Symbol=>::String}]
2816
+ # @!attribute [rw] retry_policy
2817
+ # The retry policy. The value is a hash with the following keys:
2818
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2819
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2820
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2821
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2822
+ # trigger a retry.
2823
+ # @return [::Hash]
2824
+ # @!attribute [rw] quota_project
2825
+ # A separate project against which to charge quota.
2826
+ # @return [::String]
2827
+ #
2828
+ class Configuration
2829
+ extend ::Gapic::Config
2830
+
2831
+ DEFAULT_ENDPOINT = "datacatalog.googleapis.com"
2832
+
2833
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2834
+ config_attr :credentials, nil do |value|
2835
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2836
+ allowed.any? { |klass| klass === value }
2837
+ end
2838
+ config_attr :scope, nil, ::String, ::Array, nil
2839
+ config_attr :lib_name, nil, ::String, nil
2840
+ config_attr :lib_version, nil, ::String, nil
2841
+ config_attr :timeout, nil, ::Numeric, nil
2842
+ config_attr :metadata, nil, ::Hash, nil
2843
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2844
+ config_attr :quota_project, nil, ::String, nil
2845
+
2846
+ # @private
2847
+ def initialize parent_config = nil
2848
+ @parent_config = parent_config unless parent_config.nil?
2849
+
2850
+ yield self if block_given?
2851
+ end
2852
+
2853
+ ##
2854
+ # Configurations for individual RPCs
2855
+ # @return [Rpcs]
2856
+ #
2857
+ def rpcs
2858
+ @rpcs ||= begin
2859
+ parent_rpcs = nil
2860
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2861
+ Rpcs.new parent_rpcs
2862
+ end
2863
+ end
2864
+
2865
+ ##
2866
+ # Configuration RPC class for the DataCatalog API.
2867
+ #
2868
+ # Includes fields providing the configuration for each RPC in this service.
2869
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2870
+ # the following configuration fields:
2871
+ #
2872
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2873
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2874
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2875
+ # include the following keys:
2876
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2877
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2878
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2879
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2880
+ # trigger a retry.
2881
+ #
2882
+ class Rpcs
2883
+ ##
2884
+ # RPC-specific configuration for `search_catalog`
2885
+ # @return [::Gapic::Config::Method]
2886
+ #
2887
+ attr_reader :search_catalog
2888
+ ##
2889
+ # RPC-specific configuration for `create_entry_group`
2890
+ # @return [::Gapic::Config::Method]
2891
+ #
2892
+ attr_reader :create_entry_group
2893
+ ##
2894
+ # RPC-specific configuration for `update_entry_group`
2895
+ # @return [::Gapic::Config::Method]
2896
+ #
2897
+ attr_reader :update_entry_group
2898
+ ##
2899
+ # RPC-specific configuration for `get_entry_group`
2900
+ # @return [::Gapic::Config::Method]
2901
+ #
2902
+ attr_reader :get_entry_group
2903
+ ##
2904
+ # RPC-specific configuration for `delete_entry_group`
2905
+ # @return [::Gapic::Config::Method]
2906
+ #
2907
+ attr_reader :delete_entry_group
2908
+ ##
2909
+ # RPC-specific configuration for `list_entry_groups`
2910
+ # @return [::Gapic::Config::Method]
2911
+ #
2912
+ attr_reader :list_entry_groups
2913
+ ##
2914
+ # RPC-specific configuration for `create_entry`
2915
+ # @return [::Gapic::Config::Method]
2916
+ #
2917
+ attr_reader :create_entry
2918
+ ##
2919
+ # RPC-specific configuration for `update_entry`
2920
+ # @return [::Gapic::Config::Method]
2921
+ #
2922
+ attr_reader :update_entry
2923
+ ##
2924
+ # RPC-specific configuration for `delete_entry`
2925
+ # @return [::Gapic::Config::Method]
2926
+ #
2927
+ attr_reader :delete_entry
2928
+ ##
2929
+ # RPC-specific configuration for `get_entry`
2930
+ # @return [::Gapic::Config::Method]
2931
+ #
2932
+ attr_reader :get_entry
2933
+ ##
2934
+ # RPC-specific configuration for `lookup_entry`
2935
+ # @return [::Gapic::Config::Method]
2936
+ #
2937
+ attr_reader :lookup_entry
2938
+ ##
2939
+ # RPC-specific configuration for `list_entries`
2940
+ # @return [::Gapic::Config::Method]
2941
+ #
2942
+ attr_reader :list_entries
2943
+ ##
2944
+ # RPC-specific configuration for `create_tag_template`
2945
+ # @return [::Gapic::Config::Method]
2946
+ #
2947
+ attr_reader :create_tag_template
2948
+ ##
2949
+ # RPC-specific configuration for `get_tag_template`
2950
+ # @return [::Gapic::Config::Method]
2951
+ #
2952
+ attr_reader :get_tag_template
2953
+ ##
2954
+ # RPC-specific configuration for `update_tag_template`
2955
+ # @return [::Gapic::Config::Method]
2956
+ #
2957
+ attr_reader :update_tag_template
2958
+ ##
2959
+ # RPC-specific configuration for `delete_tag_template`
2960
+ # @return [::Gapic::Config::Method]
2961
+ #
2962
+ attr_reader :delete_tag_template
2963
+ ##
2964
+ # RPC-specific configuration for `create_tag_template_field`
2965
+ # @return [::Gapic::Config::Method]
2966
+ #
2967
+ attr_reader :create_tag_template_field
2968
+ ##
2969
+ # RPC-specific configuration for `update_tag_template_field`
2970
+ # @return [::Gapic::Config::Method]
2971
+ #
2972
+ attr_reader :update_tag_template_field
2973
+ ##
2974
+ # RPC-specific configuration for `rename_tag_template_field`
2975
+ # @return [::Gapic::Config::Method]
2976
+ #
2977
+ attr_reader :rename_tag_template_field
2978
+ ##
2979
+ # RPC-specific configuration for `rename_tag_template_field_enum_value`
2980
+ # @return [::Gapic::Config::Method]
2981
+ #
2982
+ attr_reader :rename_tag_template_field_enum_value
2983
+ ##
2984
+ # RPC-specific configuration for `delete_tag_template_field`
2985
+ # @return [::Gapic::Config::Method]
2986
+ #
2987
+ attr_reader :delete_tag_template_field
2988
+ ##
2989
+ # RPC-specific configuration for `create_tag`
2990
+ # @return [::Gapic::Config::Method]
2991
+ #
2992
+ attr_reader :create_tag
2993
+ ##
2994
+ # RPC-specific configuration for `update_tag`
2995
+ # @return [::Gapic::Config::Method]
2996
+ #
2997
+ attr_reader :update_tag
2998
+ ##
2999
+ # RPC-specific configuration for `delete_tag`
3000
+ # @return [::Gapic::Config::Method]
3001
+ #
3002
+ attr_reader :delete_tag
3003
+ ##
3004
+ # RPC-specific configuration for `list_tags`
3005
+ # @return [::Gapic::Config::Method]
3006
+ #
3007
+ attr_reader :list_tags
3008
+ ##
3009
+ # RPC-specific configuration for `set_iam_policy`
3010
+ # @return [::Gapic::Config::Method]
3011
+ #
3012
+ attr_reader :set_iam_policy
3013
+ ##
3014
+ # RPC-specific configuration for `get_iam_policy`
3015
+ # @return [::Gapic::Config::Method]
3016
+ #
3017
+ attr_reader :get_iam_policy
3018
+ ##
3019
+ # RPC-specific configuration for `test_iam_permissions`
3020
+ # @return [::Gapic::Config::Method]
3021
+ #
3022
+ attr_reader :test_iam_permissions
3023
+
3024
+ # @private
3025
+ def initialize parent_rpcs = nil
3026
+ search_catalog_config = parent_rpcs.search_catalog if parent_rpcs.respond_to? :search_catalog
3027
+ @search_catalog = ::Gapic::Config::Method.new search_catalog_config
3028
+ create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group
3029
+ @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config
3030
+ update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group
3031
+ @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config
3032
+ get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group
3033
+ @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config
3034
+ delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group
3035
+ @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config
3036
+ list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups
3037
+ @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config
3038
+ create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry
3039
+ @create_entry = ::Gapic::Config::Method.new create_entry_config
3040
+ update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry
3041
+ @update_entry = ::Gapic::Config::Method.new update_entry_config
3042
+ delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry
3043
+ @delete_entry = ::Gapic::Config::Method.new delete_entry_config
3044
+ get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry
3045
+ @get_entry = ::Gapic::Config::Method.new get_entry_config
3046
+ lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry
3047
+ @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config
3048
+ list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries
3049
+ @list_entries = ::Gapic::Config::Method.new list_entries_config
3050
+ create_tag_template_config = parent_rpcs.create_tag_template if parent_rpcs.respond_to? :create_tag_template
3051
+ @create_tag_template = ::Gapic::Config::Method.new create_tag_template_config
3052
+ get_tag_template_config = parent_rpcs.get_tag_template if parent_rpcs.respond_to? :get_tag_template
3053
+ @get_tag_template = ::Gapic::Config::Method.new get_tag_template_config
3054
+ update_tag_template_config = parent_rpcs.update_tag_template if parent_rpcs.respond_to? :update_tag_template
3055
+ @update_tag_template = ::Gapic::Config::Method.new update_tag_template_config
3056
+ delete_tag_template_config = parent_rpcs.delete_tag_template if parent_rpcs.respond_to? :delete_tag_template
3057
+ @delete_tag_template = ::Gapic::Config::Method.new delete_tag_template_config
3058
+ create_tag_template_field_config = parent_rpcs.create_tag_template_field if parent_rpcs.respond_to? :create_tag_template_field
3059
+ @create_tag_template_field = ::Gapic::Config::Method.new create_tag_template_field_config
3060
+ update_tag_template_field_config = parent_rpcs.update_tag_template_field if parent_rpcs.respond_to? :update_tag_template_field
3061
+ @update_tag_template_field = ::Gapic::Config::Method.new update_tag_template_field_config
3062
+ rename_tag_template_field_config = parent_rpcs.rename_tag_template_field if parent_rpcs.respond_to? :rename_tag_template_field
3063
+ @rename_tag_template_field = ::Gapic::Config::Method.new rename_tag_template_field_config
3064
+ rename_tag_template_field_enum_value_config = parent_rpcs.rename_tag_template_field_enum_value if parent_rpcs.respond_to? :rename_tag_template_field_enum_value
3065
+ @rename_tag_template_field_enum_value = ::Gapic::Config::Method.new rename_tag_template_field_enum_value_config
3066
+ delete_tag_template_field_config = parent_rpcs.delete_tag_template_field if parent_rpcs.respond_to? :delete_tag_template_field
3067
+ @delete_tag_template_field = ::Gapic::Config::Method.new delete_tag_template_field_config
3068
+ create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag
3069
+ @create_tag = ::Gapic::Config::Method.new create_tag_config
3070
+ update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag
3071
+ @update_tag = ::Gapic::Config::Method.new update_tag_config
3072
+ delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag
3073
+ @delete_tag = ::Gapic::Config::Method.new delete_tag_config
3074
+ list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags
3075
+ @list_tags = ::Gapic::Config::Method.new list_tags_config
3076
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
3077
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
3078
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
3079
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
3080
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
3081
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
3082
+
3083
+ yield self if block_given?
3084
+ end
3085
+ end
3086
+ end
3087
+ end
3088
+ end
3089
+ end
3090
+ end
3091
+ end
3092
+ end
3093
+ end