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

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