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