google-cloud-dataplex-v1 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +3 -3
  4. data/lib/google/cloud/dataplex/v1/bindings_override.rb +1 -1
  5. data/lib/google/cloud/dataplex/v1/catalog_pb.rb +101 -0
  6. data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +2822 -0
  7. data/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb +47 -0
  8. data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +809 -0
  9. data/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +128 -0
  10. data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +2647 -0
  11. data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +902 -0
  12. data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +1375 -0
  13. data/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +58 -0
  14. data/lib/google/cloud/dataplex/v1/catalog_service.rb +60 -0
  15. data/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +91 -0
  16. data/lib/google/cloud/dataplex/v1/content_service/client.rb +19 -8
  17. data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +19 -8
  18. data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +7 -1
  19. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +115 -8
  20. data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +13 -5
  21. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +108 -8
  22. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +11 -4
  23. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +68 -0
  24. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +33 -15
  25. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +13 -5
  26. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +33 -15
  27. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +11 -4
  28. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +69 -33
  29. data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +13 -5
  30. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +69 -33
  31. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +11 -4
  32. data/lib/google/cloud/dataplex/v1/datascans_pb.rb +4 -2
  33. data/lib/google/cloud/dataplex/v1/datascans_services_pb.rb +2 -0
  34. data/lib/google/cloud/dataplex/v1/logs_pb.rb +1 -1
  35. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +21 -9
  36. data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +21 -9
  37. data/lib/google/cloud/dataplex/v1/rest.rb +3 -2
  38. data/lib/google/cloud/dataplex/v1/version.rb +1 -1
  39. data/lib/google/cloud/dataplex/v1.rb +4 -3
  40. data/proto_docs/google/api/client.rb +4 -0
  41. data/proto_docs/google/cloud/dataplex/v1/catalog.rb +1092 -0
  42. data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +86 -0
  43. data/proto_docs/google/cloud/dataplex/v1/datascans.rb +21 -0
  44. data/proto_docs/google/cloud/dataplex/v1/logs.rb +8 -0
  45. data/proto_docs/google/protobuf/struct.rb +96 -0
  46. metadata +15 -2
@@ -0,0 +1,2822 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/dataplex/v1/catalog_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Dataplex
27
+ module V1
28
+ module CatalogService
29
+ ##
30
+ # Client for the CatalogService service.
31
+ #
32
+ # The primary resources offered by this service are EntryGroups, EntryTypes,
33
+ # AspectTypes, Entry and Aspect which collectively allow a data administrator
34
+ # to organize, manage, secure and catalog data across their organization
35
+ # located across cloud projects in a variety of storage systems including Cloud
36
+ # Storage and BigQuery.
37
+ #
38
+ class Client
39
+ # @private
40
+ API_VERSION = ""
41
+
42
+ # @private
43
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
44
+
45
+ include Paths
46
+
47
+ # @private
48
+ attr_reader :catalog_service_stub
49
+
50
+ ##
51
+ # Configure the CatalogService Client class.
52
+ #
53
+ # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration}
54
+ # for a description of the configuration fields.
55
+ #
56
+ # @example
57
+ #
58
+ # # Modify the configuration for all CatalogService clients
59
+ # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config|
60
+ # config.timeout = 10.0
61
+ # end
62
+ #
63
+ # @yield [config] Configure the Client client.
64
+ # @yieldparam config [Client::Configuration]
65
+ #
66
+ # @return [Client::Configuration]
67
+ #
68
+ def self.configure
69
+ @configure ||= begin
70
+ namespace = ["Google", "Cloud", "Dataplex", "V1"]
71
+ parent_config = while namespace.any?
72
+ parent_name = namespace.join "::"
73
+ parent_const = const_get parent_name
74
+ break parent_const.configure if parent_const.respond_to? :configure
75
+ namespace.pop
76
+ end
77
+ default_config = Client::Configuration.new parent_config
78
+
79
+ default_config.rpcs.create_entry_type.timeout = 60.0
80
+
81
+ default_config.rpcs.update_entry_type.timeout = 60.0
82
+
83
+ default_config.rpcs.delete_entry_type.timeout = 60.0
84
+
85
+ default_config.rpcs.list_entry_types.timeout = 60.0
86
+ default_config.rpcs.list_entry_types.retry_policy = {
87
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
88
+ }
89
+
90
+ default_config.rpcs.get_entry_type.timeout = 60.0
91
+ default_config.rpcs.get_entry_type.retry_policy = {
92
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
93
+ }
94
+
95
+ default_config.rpcs.create_aspect_type.timeout = 60.0
96
+
97
+ default_config.rpcs.update_aspect_type.timeout = 60.0
98
+
99
+ default_config.rpcs.delete_aspect_type.timeout = 60.0
100
+
101
+ default_config.rpcs.list_aspect_types.timeout = 60.0
102
+ default_config.rpcs.list_aspect_types.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
104
+ }
105
+
106
+ default_config.rpcs.get_aspect_type.timeout = 60.0
107
+ default_config.rpcs.get_aspect_type.retry_policy = {
108
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
109
+ }
110
+
111
+ default_config.rpcs.create_entry_group.timeout = 60.0
112
+
113
+ default_config.rpcs.update_entry_group.timeout = 60.0
114
+
115
+ default_config.rpcs.delete_entry_group.timeout = 60.0
116
+
117
+ default_config.rpcs.list_entry_groups.timeout = 60.0
118
+ default_config.rpcs.list_entry_groups.retry_policy = {
119
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
120
+ }
121
+
122
+ default_config.rpcs.get_entry_group.timeout = 60.0
123
+ default_config.rpcs.get_entry_group.retry_policy = {
124
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
125
+ }
126
+
127
+ default_config.rpcs.create_entry.timeout = 60.0
128
+
129
+ default_config.rpcs.update_entry.timeout = 60.0
130
+ default_config.rpcs.update_entry.retry_policy = {
131
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
132
+ }
133
+
134
+ default_config.rpcs.delete_entry.timeout = 60.0
135
+
136
+ default_config.rpcs.list_entries.timeout = 20.0
137
+ default_config.rpcs.list_entries.retry_policy = {
138
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
139
+ }
140
+
141
+ default_config.rpcs.get_entry.timeout = 20.0
142
+ default_config.rpcs.get_entry.retry_policy = {
143
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
144
+ }
145
+
146
+ default_config.rpcs.lookup_entry.timeout = 20.0
147
+ default_config.rpcs.lookup_entry.retry_policy = {
148
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
149
+ }
150
+
151
+ default_config.rpcs.search_entries.timeout = 60.0
152
+ default_config.rpcs.search_entries.retry_policy = {
153
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8]
154
+ }
155
+
156
+ default_config
157
+ end
158
+ yield @configure if block_given?
159
+ @configure
160
+ end
161
+
162
+ ##
163
+ # Configure the CatalogService Client instance.
164
+ #
165
+ # The configuration is set to the derived mode, meaning that values can be changed,
166
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
167
+ # should be made on {Client.configure}.
168
+ #
169
+ # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration}
170
+ # for a description of the configuration fields.
171
+ #
172
+ # @yield [config] Configure the Client client.
173
+ # @yieldparam config [Client::Configuration]
174
+ #
175
+ # @return [Client::Configuration]
176
+ #
177
+ def configure
178
+ yield @config if block_given?
179
+ @config
180
+ end
181
+
182
+ ##
183
+ # The effective universe domain
184
+ #
185
+ # @return [String]
186
+ #
187
+ def universe_domain
188
+ @catalog_service_stub.universe_domain
189
+ end
190
+
191
+ ##
192
+ # Create a new CatalogService client object.
193
+ #
194
+ # @example
195
+ #
196
+ # # Create a client using the default configuration
197
+ # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new
198
+ #
199
+ # # Create a client using a custom configuration
200
+ # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config|
201
+ # config.timeout = 10.0
202
+ # end
203
+ #
204
+ # @yield [config] Configure the CatalogService client.
205
+ # @yieldparam config [Client::Configuration]
206
+ #
207
+ def initialize
208
+ # These require statements are intentionally placed here to initialize
209
+ # the gRPC module only when it's required.
210
+ # See https://github.com/googleapis/toolkit/issues/446
211
+ require "gapic/grpc"
212
+ require "google/cloud/dataplex/v1/catalog_services_pb"
213
+
214
+ # Create the configuration object
215
+ @config = Configuration.new Client.configure
216
+
217
+ # Yield the configuration if needed
218
+ yield @config if block_given?
219
+
220
+ # Create credentials
221
+ credentials = @config.credentials
222
+ # Use self-signed JWT if the endpoint is unchanged from default,
223
+ # but only if the default endpoint does not have a region prefix.
224
+ enable_self_signed_jwt = @config.endpoint.nil? ||
225
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
226
+ !@config.endpoint.split(".").first.include?("-"))
227
+ credentials ||= Credentials.default scope: @config.scope,
228
+ enable_self_signed_jwt: enable_self_signed_jwt
229
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
230
+ credentials = Credentials.new credentials, scope: @config.scope
231
+ end
232
+ @quota_project_id = @config.quota_project
233
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
234
+
235
+ @operations_client = Operations.new do |config|
236
+ config.credentials = credentials
237
+ config.quota_project = @quota_project_id
238
+ config.endpoint = @config.endpoint
239
+ config.universe_domain = @config.universe_domain
240
+ end
241
+
242
+ @catalog_service_stub = ::Gapic::ServiceStub.new(
243
+ ::Google::Cloud::Dataplex::V1::CatalogService::Stub,
244
+ credentials: credentials,
245
+ endpoint: @config.endpoint,
246
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
247
+ universe_domain: @config.universe_domain,
248
+ channel_args: @config.channel_args,
249
+ interceptors: @config.interceptors,
250
+ channel_pool_config: @config.channel_pool
251
+ )
252
+
253
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
254
+ config.credentials = credentials
255
+ config.quota_project = @quota_project_id
256
+ config.endpoint = @catalog_service_stub.endpoint
257
+ config.universe_domain = @catalog_service_stub.universe_domain
258
+ end
259
+
260
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
261
+ config.credentials = credentials
262
+ config.quota_project = @quota_project_id
263
+ config.endpoint = @catalog_service_stub.endpoint
264
+ config.universe_domain = @catalog_service_stub.universe_domain
265
+ end
266
+ end
267
+
268
+ ##
269
+ # Get the associated client for long-running operations.
270
+ #
271
+ # @return [::Google::Cloud::Dataplex::V1::CatalogService::Operations]
272
+ #
273
+ attr_reader :operations_client
274
+
275
+ ##
276
+ # Get the associated client for mix-in of the Locations.
277
+ #
278
+ # @return [Google::Cloud::Location::Locations::Client]
279
+ #
280
+ attr_reader :location_client
281
+
282
+ ##
283
+ # Get the associated client for mix-in of the IAMPolicy.
284
+ #
285
+ # @return [Google::Iam::V1::IAMPolicy::Client]
286
+ #
287
+ attr_reader :iam_policy_client
288
+
289
+ # Service calls
290
+
291
+ ##
292
+ # Creates an EntryType
293
+ #
294
+ # @overload create_entry_type(request, options = nil)
295
+ # Pass arguments to `create_entry_type` via a request object, either of type
296
+ # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash.
297
+ #
298
+ # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash]
299
+ # A request object representing the call parameters. Required. To specify no
300
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
301
+ # @param options [::Gapic::CallOptions, ::Hash]
302
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
303
+ #
304
+ # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil)
305
+ # Pass arguments to `create_entry_type` via keyword arguments. Note that at
306
+ # least one keyword argument is required. To specify no parameters, or to keep all
307
+ # the default parameter values, pass an empty Hash as a request object (see above).
308
+ #
309
+ # @param parent [::String]
310
+ # Required. The resource name of the EntryType, of the form:
311
+ # projects/\\{project_number}/locations/\\{location_id}
312
+ # where `location_id` refers to a GCP region.
313
+ # @param entry_type_id [::String]
314
+ # Required. EntryType identifier.
315
+ # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash]
316
+ # Required. EntryType Resource
317
+ # @param validate_only [::Boolean]
318
+ # Optional. Only validate the request, but do not perform mutations.
319
+ # The default is false.
320
+ #
321
+ # @yield [response, operation] Access the result along with the RPC operation
322
+ # @yieldparam response [::Gapic::Operation]
323
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
324
+ #
325
+ # @return [::Gapic::Operation]
326
+ #
327
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
328
+ #
329
+ # @example Basic example
330
+ # require "google/cloud/dataplex/v1"
331
+ #
332
+ # # Create a client object. The client can be reused for multiple calls.
333
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
334
+ #
335
+ # # Create a request. To set request fields, pass in keyword arguments.
336
+ # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new
337
+ #
338
+ # # Call the create_entry_type method.
339
+ # result = client.create_entry_type request
340
+ #
341
+ # # The returned object is of type Gapic::Operation. You can use it to
342
+ # # check the status of an operation, cancel it, or wait for results.
343
+ # # Here is how to wait for a response.
344
+ # result.wait_until_done! timeout: 60
345
+ # if result.response?
346
+ # p result.response
347
+ # else
348
+ # puts "No response received."
349
+ # end
350
+ #
351
+ def create_entry_type request, options = nil
352
+ raise ::ArgumentError, "request must be provided" if request.nil?
353
+
354
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest
355
+
356
+ # Converts hash and nil to an options object
357
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
358
+
359
+ # Customize the options with defaults
360
+ metadata = @config.rpcs.create_entry_type.metadata.to_h
361
+
362
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
363
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
364
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
365
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
366
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
367
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
368
+
369
+ header_params = {}
370
+ if request.parent
371
+ header_params["parent"] = request.parent
372
+ end
373
+
374
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
375
+ metadata[:"x-goog-request-params"] ||= request_params_header
376
+
377
+ options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout,
378
+ metadata: metadata,
379
+ retry_policy: @config.rpcs.create_entry_type.retry_policy
380
+
381
+ options.apply_defaults timeout: @config.timeout,
382
+ metadata: @config.metadata,
383
+ retry_policy: @config.retry_policy
384
+
385
+ @catalog_service_stub.call_rpc :create_entry_type, request, options: options do |response, operation|
386
+ response = ::Gapic::Operation.new response, @operations_client, options: options
387
+ yield response, operation if block_given?
388
+ return response
389
+ end
390
+ rescue ::GRPC::BadStatus => e
391
+ raise ::Google::Cloud::Error.from_error(e)
392
+ end
393
+
394
+ ##
395
+ # Updates a EntryType resource.
396
+ #
397
+ # @overload update_entry_type(request, options = nil)
398
+ # Pass arguments to `update_entry_type` via a request object, either of type
399
+ # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash.
400
+ #
401
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash]
402
+ # A request object representing the call parameters. Required. To specify no
403
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
404
+ # @param options [::Gapic::CallOptions, ::Hash]
405
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
406
+ #
407
+ # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil)
408
+ # Pass arguments to `update_entry_type` via keyword arguments. Note that at
409
+ # least one keyword argument is required. To specify no parameters, or to keep all
410
+ # the default parameter values, pass an empty Hash as a request object (see above).
411
+ #
412
+ # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash]
413
+ # Required. EntryType Resource
414
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
415
+ # Required. Mask of fields to update.
416
+ # @param validate_only [::Boolean]
417
+ # Optional. Only validate the request, but do not perform mutations.
418
+ # The default is false.
419
+ #
420
+ # @yield [response, operation] Access the result along with the RPC operation
421
+ # @yieldparam response [::Gapic::Operation]
422
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
423
+ #
424
+ # @return [::Gapic::Operation]
425
+ #
426
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
427
+ #
428
+ # @example Basic example
429
+ # require "google/cloud/dataplex/v1"
430
+ #
431
+ # # Create a client object. The client can be reused for multiple calls.
432
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
433
+ #
434
+ # # Create a request. To set request fields, pass in keyword arguments.
435
+ # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new
436
+ #
437
+ # # Call the update_entry_type method.
438
+ # result = client.update_entry_type request
439
+ #
440
+ # # The returned object is of type Gapic::Operation. You can use it to
441
+ # # check the status of an operation, cancel it, or wait for results.
442
+ # # Here is how to wait for a response.
443
+ # result.wait_until_done! timeout: 60
444
+ # if result.response?
445
+ # p result.response
446
+ # else
447
+ # puts "No response received."
448
+ # end
449
+ #
450
+ def update_entry_type request, options = nil
451
+ raise ::ArgumentError, "request must be provided" if request.nil?
452
+
453
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest
454
+
455
+ # Converts hash and nil to an options object
456
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
457
+
458
+ # Customize the options with defaults
459
+ metadata = @config.rpcs.update_entry_type.metadata.to_h
460
+
461
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
462
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
463
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
464
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
465
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
466
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
467
+
468
+ header_params = {}
469
+ if request.entry_type&.name
470
+ header_params["entry_type.name"] = request.entry_type.name
471
+ end
472
+
473
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
474
+ metadata[:"x-goog-request-params"] ||= request_params_header
475
+
476
+ options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout,
477
+ metadata: metadata,
478
+ retry_policy: @config.rpcs.update_entry_type.retry_policy
479
+
480
+ options.apply_defaults timeout: @config.timeout,
481
+ metadata: @config.metadata,
482
+ retry_policy: @config.retry_policy
483
+
484
+ @catalog_service_stub.call_rpc :update_entry_type, request, options: options do |response, operation|
485
+ response = ::Gapic::Operation.new response, @operations_client, options: options
486
+ yield response, operation if block_given?
487
+ return response
488
+ end
489
+ rescue ::GRPC::BadStatus => e
490
+ raise ::Google::Cloud::Error.from_error(e)
491
+ end
492
+
493
+ ##
494
+ # Deletes a EntryType resource.
495
+ #
496
+ # @overload delete_entry_type(request, options = nil)
497
+ # Pass arguments to `delete_entry_type` via a request object, either of type
498
+ # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash.
499
+ #
500
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash]
501
+ # A request object representing the call parameters. Required. To specify no
502
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
503
+ # @param options [::Gapic::CallOptions, ::Hash]
504
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
505
+ #
506
+ # @overload delete_entry_type(name: nil, etag: nil)
507
+ # Pass arguments to `delete_entry_type` via keyword arguments. Note that at
508
+ # least one keyword argument is required. To specify no parameters, or to keep all
509
+ # the default parameter values, pass an empty Hash as a request object (see above).
510
+ #
511
+ # @param name [::String]
512
+ # Required. The resource name of the EntryType:
513
+ # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
514
+ # @param etag [::String]
515
+ # Optional. If the client provided etag value does not match the current etag
516
+ # value, the DeleteEntryTypeRequest method returns an ABORTED error response
517
+ #
518
+ # @yield [response, operation] Access the result along with the RPC operation
519
+ # @yieldparam response [::Gapic::Operation]
520
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
521
+ #
522
+ # @return [::Gapic::Operation]
523
+ #
524
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
525
+ #
526
+ # @example Basic example
527
+ # require "google/cloud/dataplex/v1"
528
+ #
529
+ # # Create a client object. The client can be reused for multiple calls.
530
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
531
+ #
532
+ # # Create a request. To set request fields, pass in keyword arguments.
533
+ # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new
534
+ #
535
+ # # Call the delete_entry_type method.
536
+ # result = client.delete_entry_type request
537
+ #
538
+ # # The returned object is of type Gapic::Operation. You can use it to
539
+ # # check the status of an operation, cancel it, or wait for results.
540
+ # # Here is how to wait for a response.
541
+ # result.wait_until_done! timeout: 60
542
+ # if result.response?
543
+ # p result.response
544
+ # else
545
+ # puts "No response received."
546
+ # end
547
+ #
548
+ def delete_entry_type request, options = nil
549
+ raise ::ArgumentError, "request must be provided" if request.nil?
550
+
551
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest
552
+
553
+ # Converts hash and nil to an options object
554
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
555
+
556
+ # Customize the options with defaults
557
+ metadata = @config.rpcs.delete_entry_type.metadata.to_h
558
+
559
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
560
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
561
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
562
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
563
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
564
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
565
+
566
+ header_params = {}
567
+ if request.name
568
+ header_params["name"] = request.name
569
+ end
570
+
571
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
572
+ metadata[:"x-goog-request-params"] ||= request_params_header
573
+
574
+ options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout,
575
+ metadata: metadata,
576
+ retry_policy: @config.rpcs.delete_entry_type.retry_policy
577
+
578
+ options.apply_defaults timeout: @config.timeout,
579
+ metadata: @config.metadata,
580
+ retry_policy: @config.retry_policy
581
+
582
+ @catalog_service_stub.call_rpc :delete_entry_type, request, options: options do |response, operation|
583
+ response = ::Gapic::Operation.new response, @operations_client, options: options
584
+ yield response, operation if block_given?
585
+ return response
586
+ end
587
+ rescue ::GRPC::BadStatus => e
588
+ raise ::Google::Cloud::Error.from_error(e)
589
+ end
590
+
591
+ ##
592
+ # Lists EntryType resources in a project and location.
593
+ #
594
+ # @overload list_entry_types(request, options = nil)
595
+ # Pass arguments to `list_entry_types` via a request object, either of type
596
+ # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash.
597
+ #
598
+ # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash]
599
+ # A request object representing the call parameters. Required. To specify no
600
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
601
+ # @param options [::Gapic::CallOptions, ::Hash]
602
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
603
+ #
604
+ # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
605
+ # Pass arguments to `list_entry_types` via keyword arguments. Note that at
606
+ # least one keyword argument is required. To specify no parameters, or to keep all
607
+ # the default parameter values, pass an empty Hash as a request object (see above).
608
+ #
609
+ # @param parent [::String]
610
+ # Required. The resource name of the EntryType location, of the form:
611
+ # `projects/{project_number}/locations/{location_id}`
612
+ # where `location_id` refers to a GCP region.
613
+ # @param page_size [::Integer]
614
+ # Optional. Maximum number of EntryTypes to return. The service may return
615
+ # fewer than this value. If unspecified, at most 10 EntryTypes will be
616
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
617
+ # 1000.
618
+ # @param page_token [::String]
619
+ # Optional. Page token received from a previous `ListEntryTypes` call.
620
+ # Provide this to retrieve the subsequent page. When paginating, all other
621
+ # parameters provided to `ListEntryTypes` must match the call that provided
622
+ # the page token.
623
+ # @param filter [::String]
624
+ # Optional. Filter request. Filters are case-sensitive.
625
+ # The following formats are supported:
626
+ #
627
+ # labels.key1 = "value1"
628
+ # labels:key1
629
+ # name = "value"
630
+ # These restrictions can be coinjoined with AND, OR and NOT conjunctions.
631
+ # @param order_by [::String]
632
+ # Optional. Order by fields (`name` or `create_time`) for the result.
633
+ # If not specified, the ordering is undefined.
634
+ #
635
+ # @yield [response, operation] Access the result along with the RPC operation
636
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>]
637
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
638
+ #
639
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>]
640
+ #
641
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
642
+ #
643
+ # @example Basic example
644
+ # require "google/cloud/dataplex/v1"
645
+ #
646
+ # # Create a client object. The client can be reused for multiple calls.
647
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
648
+ #
649
+ # # Create a request. To set request fields, pass in keyword arguments.
650
+ # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new
651
+ #
652
+ # # Call the list_entry_types method.
653
+ # result = client.list_entry_types request
654
+ #
655
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
656
+ # # over elements, and API calls will be issued to fetch pages as needed.
657
+ # result.each do |item|
658
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType.
659
+ # p item
660
+ # end
661
+ #
662
+ def list_entry_types request, options = nil
663
+ raise ::ArgumentError, "request must be provided" if request.nil?
664
+
665
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest
666
+
667
+ # Converts hash and nil to an options object
668
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
669
+
670
+ # Customize the options with defaults
671
+ metadata = @config.rpcs.list_entry_types.metadata.to_h
672
+
673
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
674
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
675
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
676
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
677
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
678
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
679
+
680
+ header_params = {}
681
+ if request.parent
682
+ header_params["parent"] = request.parent
683
+ end
684
+
685
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
686
+ metadata[:"x-goog-request-params"] ||= request_params_header
687
+
688
+ options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout,
689
+ metadata: metadata,
690
+ retry_policy: @config.rpcs.list_entry_types.retry_policy
691
+
692
+ options.apply_defaults timeout: @config.timeout,
693
+ metadata: @config.metadata,
694
+ retry_policy: @config.retry_policy
695
+
696
+ @catalog_service_stub.call_rpc :list_entry_types, request, options: options do |response, operation|
697
+ response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_types, request, response, operation, options
698
+ yield response, operation if block_given?
699
+ return response
700
+ end
701
+ rescue ::GRPC::BadStatus => e
702
+ raise ::Google::Cloud::Error.from_error(e)
703
+ end
704
+
705
+ ##
706
+ # Retrieves a EntryType resource.
707
+ #
708
+ # @overload get_entry_type(request, options = nil)
709
+ # Pass arguments to `get_entry_type` via a request object, either of type
710
+ # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash.
711
+ #
712
+ # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash]
713
+ # A request object representing the call parameters. Required. To specify no
714
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
715
+ # @param options [::Gapic::CallOptions, ::Hash]
716
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
717
+ #
718
+ # @overload get_entry_type(name: nil)
719
+ # Pass arguments to `get_entry_type` via keyword arguments. Note that at
720
+ # least one keyword argument is required. To specify no parameters, or to keep all
721
+ # the default parameter values, pass an empty Hash as a request object (see above).
722
+ #
723
+ # @param name [::String]
724
+ # Required. The resource name of the EntryType:
725
+ # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
726
+ #
727
+ # @yield [response, operation] Access the result along with the RPC operation
728
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryType]
729
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
730
+ #
731
+ # @return [::Google::Cloud::Dataplex::V1::EntryType]
732
+ #
733
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
734
+ #
735
+ # @example Basic example
736
+ # require "google/cloud/dataplex/v1"
737
+ #
738
+ # # Create a client object. The client can be reused for multiple calls.
739
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
740
+ #
741
+ # # Create a request. To set request fields, pass in keyword arguments.
742
+ # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new
743
+ #
744
+ # # Call the get_entry_type method.
745
+ # result = client.get_entry_type request
746
+ #
747
+ # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType.
748
+ # p result
749
+ #
750
+ def get_entry_type request, options = nil
751
+ raise ::ArgumentError, "request must be provided" if request.nil?
752
+
753
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest
754
+
755
+ # Converts hash and nil to an options object
756
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
757
+
758
+ # Customize the options with defaults
759
+ metadata = @config.rpcs.get_entry_type.metadata.to_h
760
+
761
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
762
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
763
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
764
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
765
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
766
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
767
+
768
+ header_params = {}
769
+ if request.name
770
+ header_params["name"] = request.name
771
+ end
772
+
773
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
774
+ metadata[:"x-goog-request-params"] ||= request_params_header
775
+
776
+ options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout,
777
+ metadata: metadata,
778
+ retry_policy: @config.rpcs.get_entry_type.retry_policy
779
+
780
+ options.apply_defaults timeout: @config.timeout,
781
+ metadata: @config.metadata,
782
+ retry_policy: @config.retry_policy
783
+
784
+ @catalog_service_stub.call_rpc :get_entry_type, request, options: options do |response, operation|
785
+ yield response, operation if block_given?
786
+ return response
787
+ end
788
+ rescue ::GRPC::BadStatus => e
789
+ raise ::Google::Cloud::Error.from_error(e)
790
+ end
791
+
792
+ ##
793
+ # Creates an AspectType
794
+ #
795
+ # @overload create_aspect_type(request, options = nil)
796
+ # Pass arguments to `create_aspect_type` via a request object, either of type
797
+ # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash.
798
+ #
799
+ # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash]
800
+ # A request object representing the call parameters. Required. To specify no
801
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
802
+ # @param options [::Gapic::CallOptions, ::Hash]
803
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
804
+ #
805
+ # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil)
806
+ # Pass arguments to `create_aspect_type` via keyword arguments. Note that at
807
+ # least one keyword argument is required. To specify no parameters, or to keep all
808
+ # the default parameter values, pass an empty Hash as a request object (see above).
809
+ #
810
+ # @param parent [::String]
811
+ # Required. The resource name of the AspectType, of the form:
812
+ # projects/\\{project_number}/locations/\\{location_id}
813
+ # where `location_id` refers to a GCP region.
814
+ # @param aspect_type_id [::String]
815
+ # Required. AspectType identifier.
816
+ # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash]
817
+ # Required. AspectType Resource
818
+ # @param validate_only [::Boolean]
819
+ # Optional. Only validate the request, but do not perform mutations.
820
+ # The default is false.
821
+ #
822
+ # @yield [response, operation] Access the result along with the RPC operation
823
+ # @yieldparam response [::Gapic::Operation]
824
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
825
+ #
826
+ # @return [::Gapic::Operation]
827
+ #
828
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
829
+ #
830
+ # @example Basic example
831
+ # require "google/cloud/dataplex/v1"
832
+ #
833
+ # # Create a client object. The client can be reused for multiple calls.
834
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
835
+ #
836
+ # # Create a request. To set request fields, pass in keyword arguments.
837
+ # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new
838
+ #
839
+ # # Call the create_aspect_type method.
840
+ # result = client.create_aspect_type request
841
+ #
842
+ # # The returned object is of type Gapic::Operation. You can use it to
843
+ # # check the status of an operation, cancel it, or wait for results.
844
+ # # Here is how to wait for a response.
845
+ # result.wait_until_done! timeout: 60
846
+ # if result.response?
847
+ # p result.response
848
+ # else
849
+ # puts "No response received."
850
+ # end
851
+ #
852
+ def create_aspect_type request, options = nil
853
+ raise ::ArgumentError, "request must be provided" if request.nil?
854
+
855
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest
856
+
857
+ # Converts hash and nil to an options object
858
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
859
+
860
+ # Customize the options with defaults
861
+ metadata = @config.rpcs.create_aspect_type.metadata.to_h
862
+
863
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
864
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
865
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
866
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
867
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
868
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
869
+
870
+ header_params = {}
871
+ if request.parent
872
+ header_params["parent"] = request.parent
873
+ end
874
+
875
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
876
+ metadata[:"x-goog-request-params"] ||= request_params_header
877
+
878
+ options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout,
879
+ metadata: metadata,
880
+ retry_policy: @config.rpcs.create_aspect_type.retry_policy
881
+
882
+ options.apply_defaults timeout: @config.timeout,
883
+ metadata: @config.metadata,
884
+ retry_policy: @config.retry_policy
885
+
886
+ @catalog_service_stub.call_rpc :create_aspect_type, request, options: options do |response, operation|
887
+ response = ::Gapic::Operation.new response, @operations_client, options: options
888
+ yield response, operation if block_given?
889
+ return response
890
+ end
891
+ rescue ::GRPC::BadStatus => e
892
+ raise ::Google::Cloud::Error.from_error(e)
893
+ end
894
+
895
+ ##
896
+ # Updates a AspectType resource.
897
+ #
898
+ # @overload update_aspect_type(request, options = nil)
899
+ # Pass arguments to `update_aspect_type` via a request object, either of type
900
+ # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash.
901
+ #
902
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash]
903
+ # A request object representing the call parameters. Required. To specify no
904
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
905
+ # @param options [::Gapic::CallOptions, ::Hash]
906
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
907
+ #
908
+ # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil)
909
+ # Pass arguments to `update_aspect_type` via keyword arguments. Note that at
910
+ # least one keyword argument is required. To specify no parameters, or to keep all
911
+ # the default parameter values, pass an empty Hash as a request object (see above).
912
+ #
913
+ # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash]
914
+ # Required. AspectType Resource
915
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
916
+ # Required. Mask of fields to update.
917
+ # @param validate_only [::Boolean]
918
+ # Optional. Only validate the request, but do not perform mutations.
919
+ # The default is false.
920
+ #
921
+ # @yield [response, operation] Access the result along with the RPC operation
922
+ # @yieldparam response [::Gapic::Operation]
923
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
924
+ #
925
+ # @return [::Gapic::Operation]
926
+ #
927
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
928
+ #
929
+ # @example Basic example
930
+ # require "google/cloud/dataplex/v1"
931
+ #
932
+ # # Create a client object. The client can be reused for multiple calls.
933
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
934
+ #
935
+ # # Create a request. To set request fields, pass in keyword arguments.
936
+ # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new
937
+ #
938
+ # # Call the update_aspect_type method.
939
+ # result = client.update_aspect_type request
940
+ #
941
+ # # The returned object is of type Gapic::Operation. You can use it to
942
+ # # check the status of an operation, cancel it, or wait for results.
943
+ # # Here is how to wait for a response.
944
+ # result.wait_until_done! timeout: 60
945
+ # if result.response?
946
+ # p result.response
947
+ # else
948
+ # puts "No response received."
949
+ # end
950
+ #
951
+ def update_aspect_type request, options = nil
952
+ raise ::ArgumentError, "request must be provided" if request.nil?
953
+
954
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest
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_aspect_type.metadata.to_h
961
+
962
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Dataplex::V1::VERSION
966
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
967
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
968
+
969
+ header_params = {}
970
+ if request.aspect_type&.name
971
+ header_params["aspect_type.name"] = request.aspect_type.name
972
+ end
973
+
974
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
975
+ metadata[:"x-goog-request-params"] ||= request_params_header
976
+
977
+ options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout,
978
+ metadata: metadata,
979
+ retry_policy: @config.rpcs.update_aspect_type.retry_policy
980
+
981
+ options.apply_defaults timeout: @config.timeout,
982
+ metadata: @config.metadata,
983
+ retry_policy: @config.retry_policy
984
+
985
+ @catalog_service_stub.call_rpc :update_aspect_type, request, options: options do |response, operation|
986
+ response = ::Gapic::Operation.new response, @operations_client, options: options
987
+ yield response, operation if block_given?
988
+ return response
989
+ end
990
+ rescue ::GRPC::BadStatus => e
991
+ raise ::Google::Cloud::Error.from_error(e)
992
+ end
993
+
994
+ ##
995
+ # Deletes a AspectType resource.
996
+ #
997
+ # @overload delete_aspect_type(request, options = nil)
998
+ # Pass arguments to `delete_aspect_type` via a request object, either of type
999
+ # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash.
1000
+ #
1001
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash]
1002
+ # A request object representing the call parameters. Required. To specify no
1003
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1004
+ # @param options [::Gapic::CallOptions, ::Hash]
1005
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1006
+ #
1007
+ # @overload delete_aspect_type(name: nil, etag: nil)
1008
+ # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at
1009
+ # least one keyword argument is required. To specify no parameters, or to keep all
1010
+ # the default parameter values, pass an empty Hash as a request object (see above).
1011
+ #
1012
+ # @param name [::String]
1013
+ # Required. The resource name of the AspectType:
1014
+ # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
1015
+ # @param etag [::String]
1016
+ # Optional. If the client provided etag value does not match the current etag
1017
+ # value, the DeleteAspectTypeRequest method returns an ABORTED error response
1018
+ #
1019
+ # @yield [response, operation] Access the result along with the RPC operation
1020
+ # @yieldparam response [::Gapic::Operation]
1021
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1022
+ #
1023
+ # @return [::Gapic::Operation]
1024
+ #
1025
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1026
+ #
1027
+ # @example Basic example
1028
+ # require "google/cloud/dataplex/v1"
1029
+ #
1030
+ # # Create a client object. The client can be reused for multiple calls.
1031
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1032
+ #
1033
+ # # Create a request. To set request fields, pass in keyword arguments.
1034
+ # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new
1035
+ #
1036
+ # # Call the delete_aspect_type method.
1037
+ # result = client.delete_aspect_type request
1038
+ #
1039
+ # # The returned object is of type Gapic::Operation. You can use it to
1040
+ # # check the status of an operation, cancel it, or wait for results.
1041
+ # # Here is how to wait for a response.
1042
+ # result.wait_until_done! timeout: 60
1043
+ # if result.response?
1044
+ # p result.response
1045
+ # else
1046
+ # puts "No response received."
1047
+ # end
1048
+ #
1049
+ def delete_aspect_type request, options = nil
1050
+ raise ::ArgumentError, "request must be provided" if request.nil?
1051
+
1052
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest
1053
+
1054
+ # Converts hash and nil to an options object
1055
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1056
+
1057
+ # Customize the options with defaults
1058
+ metadata = @config.rpcs.delete_aspect_type.metadata.to_h
1059
+
1060
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1061
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1062
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1063
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1064
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1065
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1066
+
1067
+ header_params = {}
1068
+ if request.name
1069
+ header_params["name"] = request.name
1070
+ end
1071
+
1072
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1073
+ metadata[:"x-goog-request-params"] ||= request_params_header
1074
+
1075
+ options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout,
1076
+ metadata: metadata,
1077
+ retry_policy: @config.rpcs.delete_aspect_type.retry_policy
1078
+
1079
+ options.apply_defaults timeout: @config.timeout,
1080
+ metadata: @config.metadata,
1081
+ retry_policy: @config.retry_policy
1082
+
1083
+ @catalog_service_stub.call_rpc :delete_aspect_type, request, options: options do |response, operation|
1084
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1085
+ yield response, operation if block_given?
1086
+ return response
1087
+ end
1088
+ rescue ::GRPC::BadStatus => e
1089
+ raise ::Google::Cloud::Error.from_error(e)
1090
+ end
1091
+
1092
+ ##
1093
+ # Lists AspectType resources in a project and location.
1094
+ #
1095
+ # @overload list_aspect_types(request, options = nil)
1096
+ # Pass arguments to `list_aspect_types` via a request object, either of type
1097
+ # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash.
1098
+ #
1099
+ # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash]
1100
+ # A request object representing the call parameters. Required. To specify no
1101
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1102
+ # @param options [::Gapic::CallOptions, ::Hash]
1103
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1104
+ #
1105
+ # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1106
+ # Pass arguments to `list_aspect_types` via keyword arguments. Note that at
1107
+ # least one keyword argument is required. To specify no parameters, or to keep all
1108
+ # the default parameter values, pass an empty Hash as a request object (see above).
1109
+ #
1110
+ # @param parent [::String]
1111
+ # Required. The resource name of the AspectType location, of the form:
1112
+ # `projects/{project_number}/locations/{location_id}`
1113
+ # where `location_id` refers to a GCP region.
1114
+ # @param page_size [::Integer]
1115
+ # Optional. Maximum number of AspectTypes to return. The service may return
1116
+ # fewer than this value. If unspecified, at most 10 AspectTypes will be
1117
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
1118
+ # 1000.
1119
+ # @param page_token [::String]
1120
+ # Optional. Page token received from a previous `ListAspectTypes` call.
1121
+ # Provide this to retrieve the subsequent page. When paginating, all other
1122
+ # parameters provided to `ListAspectTypes` must match the call that provided
1123
+ # the page token.
1124
+ # @param filter [::String]
1125
+ # Optional. Filter request. Filters are case-sensitive.
1126
+ # The following formats are supported:
1127
+ #
1128
+ # labels.key1 = "value1"
1129
+ # labels:key1
1130
+ # name = "value"
1131
+ # These restrictions can be coinjoined with AND, OR and NOT conjunctions.
1132
+ # @param order_by [::String]
1133
+ # Optional. Order by fields (`name` or `create_time`) for the result.
1134
+ # If not specified, the ordering is undefined.
1135
+ #
1136
+ # @yield [response, operation] Access the result along with the RPC operation
1137
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>]
1138
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1139
+ #
1140
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>]
1141
+ #
1142
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1143
+ #
1144
+ # @example Basic example
1145
+ # require "google/cloud/dataplex/v1"
1146
+ #
1147
+ # # Create a client object. The client can be reused for multiple calls.
1148
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1149
+ #
1150
+ # # Create a request. To set request fields, pass in keyword arguments.
1151
+ # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new
1152
+ #
1153
+ # # Call the list_aspect_types method.
1154
+ # result = client.list_aspect_types request
1155
+ #
1156
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1157
+ # # over elements, and API calls will be issued to fetch pages as needed.
1158
+ # result.each do |item|
1159
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType.
1160
+ # p item
1161
+ # end
1162
+ #
1163
+ def list_aspect_types request, options = nil
1164
+ raise ::ArgumentError, "request must be provided" if request.nil?
1165
+
1166
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest
1167
+
1168
+ # Converts hash and nil to an options object
1169
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1170
+
1171
+ # Customize the options with defaults
1172
+ metadata = @config.rpcs.list_aspect_types.metadata.to_h
1173
+
1174
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1175
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1176
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1177
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1178
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1179
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1180
+
1181
+ header_params = {}
1182
+ if request.parent
1183
+ header_params["parent"] = request.parent
1184
+ end
1185
+
1186
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1187
+ metadata[:"x-goog-request-params"] ||= request_params_header
1188
+
1189
+ options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout,
1190
+ metadata: metadata,
1191
+ retry_policy: @config.rpcs.list_aspect_types.retry_policy
1192
+
1193
+ options.apply_defaults timeout: @config.timeout,
1194
+ metadata: @config.metadata,
1195
+ retry_policy: @config.retry_policy
1196
+
1197
+ @catalog_service_stub.call_rpc :list_aspect_types, request, options: options do |response, operation|
1198
+ response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, request, response, operation, options
1199
+ yield response, operation if block_given?
1200
+ return response
1201
+ end
1202
+ rescue ::GRPC::BadStatus => e
1203
+ raise ::Google::Cloud::Error.from_error(e)
1204
+ end
1205
+
1206
+ ##
1207
+ # Retrieves a AspectType resource.
1208
+ #
1209
+ # @overload get_aspect_type(request, options = nil)
1210
+ # Pass arguments to `get_aspect_type` via a request object, either of type
1211
+ # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash.
1212
+ #
1213
+ # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash]
1214
+ # A request object representing the call parameters. Required. To specify no
1215
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1216
+ # @param options [::Gapic::CallOptions, ::Hash]
1217
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1218
+ #
1219
+ # @overload get_aspect_type(name: nil)
1220
+ # Pass arguments to `get_aspect_type` via keyword arguments. Note that at
1221
+ # least one keyword argument is required. To specify no parameters, or to keep all
1222
+ # the default parameter values, pass an empty Hash as a request object (see above).
1223
+ #
1224
+ # @param name [::String]
1225
+ # Required. The resource name of the AspectType:
1226
+ # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
1227
+ #
1228
+ # @yield [response, operation] Access the result along with the RPC operation
1229
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::AspectType]
1230
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1231
+ #
1232
+ # @return [::Google::Cloud::Dataplex::V1::AspectType]
1233
+ #
1234
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1235
+ #
1236
+ # @example Basic example
1237
+ # require "google/cloud/dataplex/v1"
1238
+ #
1239
+ # # Create a client object. The client can be reused for multiple calls.
1240
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1241
+ #
1242
+ # # Create a request. To set request fields, pass in keyword arguments.
1243
+ # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new
1244
+ #
1245
+ # # Call the get_aspect_type method.
1246
+ # result = client.get_aspect_type request
1247
+ #
1248
+ # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType.
1249
+ # p result
1250
+ #
1251
+ def get_aspect_type request, options = nil
1252
+ raise ::ArgumentError, "request must be provided" if request.nil?
1253
+
1254
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest
1255
+
1256
+ # Converts hash and nil to an options object
1257
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1258
+
1259
+ # Customize the options with defaults
1260
+ metadata = @config.rpcs.get_aspect_type.metadata.to_h
1261
+
1262
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1263
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1264
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1265
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1266
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1267
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1268
+
1269
+ header_params = {}
1270
+ if request.name
1271
+ header_params["name"] = request.name
1272
+ end
1273
+
1274
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1275
+ metadata[:"x-goog-request-params"] ||= request_params_header
1276
+
1277
+ options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout,
1278
+ metadata: metadata,
1279
+ retry_policy: @config.rpcs.get_aspect_type.retry_policy
1280
+
1281
+ options.apply_defaults timeout: @config.timeout,
1282
+ metadata: @config.metadata,
1283
+ retry_policy: @config.retry_policy
1284
+
1285
+ @catalog_service_stub.call_rpc :get_aspect_type, request, options: options do |response, operation|
1286
+ yield response, operation if block_given?
1287
+ return response
1288
+ end
1289
+ rescue ::GRPC::BadStatus => e
1290
+ raise ::Google::Cloud::Error.from_error(e)
1291
+ end
1292
+
1293
+ ##
1294
+ # Creates an EntryGroup
1295
+ #
1296
+ # @overload create_entry_group(request, options = nil)
1297
+ # Pass arguments to `create_entry_group` via a request object, either of type
1298
+ # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash.
1299
+ #
1300
+ # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash]
1301
+ # A request object representing the call parameters. Required. To specify no
1302
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1303
+ # @param options [::Gapic::CallOptions, ::Hash]
1304
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1305
+ #
1306
+ # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil)
1307
+ # Pass arguments to `create_entry_group` via keyword arguments. Note that at
1308
+ # least one keyword argument is required. To specify no parameters, or to keep all
1309
+ # the default parameter values, pass an empty Hash as a request object (see above).
1310
+ #
1311
+ # @param parent [::String]
1312
+ # Required. The resource name of the entryGroup, of the form:
1313
+ # projects/\\{project_number}/locations/\\{location_id}
1314
+ # where `location_id` refers to a GCP region.
1315
+ # @param entry_group_id [::String]
1316
+ # Required. EntryGroup identifier.
1317
+ # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash]
1318
+ # Required. EntryGroup Resource
1319
+ # @param validate_only [::Boolean]
1320
+ # Optional. Only validate the request, but do not perform mutations.
1321
+ # The default is false.
1322
+ #
1323
+ # @yield [response, operation] Access the result along with the RPC operation
1324
+ # @yieldparam response [::Gapic::Operation]
1325
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1326
+ #
1327
+ # @return [::Gapic::Operation]
1328
+ #
1329
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1330
+ #
1331
+ # @example Basic example
1332
+ # require "google/cloud/dataplex/v1"
1333
+ #
1334
+ # # Create a client object. The client can be reused for multiple calls.
1335
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1336
+ #
1337
+ # # Create a request. To set request fields, pass in keyword arguments.
1338
+ # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new
1339
+ #
1340
+ # # Call the create_entry_group method.
1341
+ # result = client.create_entry_group request
1342
+ #
1343
+ # # The returned object is of type Gapic::Operation. You can use it to
1344
+ # # check the status of an operation, cancel it, or wait for results.
1345
+ # # Here is how to wait for a response.
1346
+ # result.wait_until_done! timeout: 60
1347
+ # if result.response?
1348
+ # p result.response
1349
+ # else
1350
+ # puts "No response received."
1351
+ # end
1352
+ #
1353
+ def create_entry_group request, options = nil
1354
+ raise ::ArgumentError, "request must be provided" if request.nil?
1355
+
1356
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest
1357
+
1358
+ # Converts hash and nil to an options object
1359
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1360
+
1361
+ # Customize the options with defaults
1362
+ metadata = @config.rpcs.create_entry_group.metadata.to_h
1363
+
1364
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1365
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1366
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1367
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1368
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1369
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1370
+
1371
+ header_params = {}
1372
+ if request.parent
1373
+ header_params["parent"] = request.parent
1374
+ end
1375
+
1376
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1377
+ metadata[:"x-goog-request-params"] ||= request_params_header
1378
+
1379
+ options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout,
1380
+ metadata: metadata,
1381
+ retry_policy: @config.rpcs.create_entry_group.retry_policy
1382
+
1383
+ options.apply_defaults timeout: @config.timeout,
1384
+ metadata: @config.metadata,
1385
+ retry_policy: @config.retry_policy
1386
+
1387
+ @catalog_service_stub.call_rpc :create_entry_group, request, options: options do |response, operation|
1388
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1389
+ yield response, operation if block_given?
1390
+ return response
1391
+ end
1392
+ rescue ::GRPC::BadStatus => e
1393
+ raise ::Google::Cloud::Error.from_error(e)
1394
+ end
1395
+
1396
+ ##
1397
+ # Updates a EntryGroup resource.
1398
+ #
1399
+ # @overload update_entry_group(request, options = nil)
1400
+ # Pass arguments to `update_entry_group` via a request object, either of type
1401
+ # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash.
1402
+ #
1403
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash]
1404
+ # A request object representing the call parameters. Required. To specify no
1405
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1406
+ # @param options [::Gapic::CallOptions, ::Hash]
1407
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1408
+ #
1409
+ # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil)
1410
+ # Pass arguments to `update_entry_group` via keyword arguments. Note that at
1411
+ # least one keyword argument is required. To specify no parameters, or to keep all
1412
+ # the default parameter values, pass an empty Hash as a request object (see above).
1413
+ #
1414
+ # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash]
1415
+ # Required. EntryGroup Resource
1416
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1417
+ # Required. Mask of fields to update.
1418
+ # @param validate_only [::Boolean]
1419
+ # Optional. Only validate the request, but do not perform mutations.
1420
+ # The default is false.
1421
+ #
1422
+ # @yield [response, operation] Access the result along with the RPC operation
1423
+ # @yieldparam response [::Gapic::Operation]
1424
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1425
+ #
1426
+ # @return [::Gapic::Operation]
1427
+ #
1428
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1429
+ #
1430
+ # @example Basic example
1431
+ # require "google/cloud/dataplex/v1"
1432
+ #
1433
+ # # Create a client object. The client can be reused for multiple calls.
1434
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1435
+ #
1436
+ # # Create a request. To set request fields, pass in keyword arguments.
1437
+ # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new
1438
+ #
1439
+ # # Call the update_entry_group method.
1440
+ # result = client.update_entry_group request
1441
+ #
1442
+ # # The returned object is of type Gapic::Operation. You can use it to
1443
+ # # check the status of an operation, cancel it, or wait for results.
1444
+ # # Here is how to wait for a response.
1445
+ # result.wait_until_done! timeout: 60
1446
+ # if result.response?
1447
+ # p result.response
1448
+ # else
1449
+ # puts "No response received."
1450
+ # end
1451
+ #
1452
+ def update_entry_group request, options = nil
1453
+ raise ::ArgumentError, "request must be provided" if request.nil?
1454
+
1455
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest
1456
+
1457
+ # Converts hash and nil to an options object
1458
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1459
+
1460
+ # Customize the options with defaults
1461
+ metadata = @config.rpcs.update_entry_group.metadata.to_h
1462
+
1463
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1464
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1465
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1466
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1467
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1468
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1469
+
1470
+ header_params = {}
1471
+ if request.entry_group&.name
1472
+ header_params["entry_group.name"] = request.entry_group.name
1473
+ end
1474
+
1475
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1476
+ metadata[:"x-goog-request-params"] ||= request_params_header
1477
+
1478
+ options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout,
1479
+ metadata: metadata,
1480
+ retry_policy: @config.rpcs.update_entry_group.retry_policy
1481
+
1482
+ options.apply_defaults timeout: @config.timeout,
1483
+ metadata: @config.metadata,
1484
+ retry_policy: @config.retry_policy
1485
+
1486
+ @catalog_service_stub.call_rpc :update_entry_group, request, options: options do |response, operation|
1487
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1488
+ yield response, operation if block_given?
1489
+ return response
1490
+ end
1491
+ rescue ::GRPC::BadStatus => e
1492
+ raise ::Google::Cloud::Error.from_error(e)
1493
+ end
1494
+
1495
+ ##
1496
+ # Deletes a EntryGroup resource.
1497
+ #
1498
+ # @overload delete_entry_group(request, options = nil)
1499
+ # Pass arguments to `delete_entry_group` via a request object, either of type
1500
+ # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash.
1501
+ #
1502
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash]
1503
+ # A request object representing the call parameters. Required. To specify no
1504
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1505
+ # @param options [::Gapic::CallOptions, ::Hash]
1506
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1507
+ #
1508
+ # @overload delete_entry_group(name: nil, etag: nil)
1509
+ # Pass arguments to `delete_entry_group` via keyword arguments. Note that at
1510
+ # least one keyword argument is required. To specify no parameters, or to keep all
1511
+ # the default parameter values, pass an empty Hash as a request object (see above).
1512
+ #
1513
+ # @param name [::String]
1514
+ # Required. The resource name of the EntryGroup:
1515
+ # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
1516
+ # @param etag [::String]
1517
+ # Optional. If the client provided etag value does not match the current etag
1518
+ # value, the DeleteEntryGroupRequest method returns an ABORTED error response
1519
+ #
1520
+ # @yield [response, operation] Access the result along with the RPC operation
1521
+ # @yieldparam response [::Gapic::Operation]
1522
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1523
+ #
1524
+ # @return [::Gapic::Operation]
1525
+ #
1526
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1527
+ #
1528
+ # @example Basic example
1529
+ # require "google/cloud/dataplex/v1"
1530
+ #
1531
+ # # Create a client object. The client can be reused for multiple calls.
1532
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1533
+ #
1534
+ # # Create a request. To set request fields, pass in keyword arguments.
1535
+ # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new
1536
+ #
1537
+ # # Call the delete_entry_group method.
1538
+ # result = client.delete_entry_group request
1539
+ #
1540
+ # # The returned object is of type Gapic::Operation. You can use it to
1541
+ # # check the status of an operation, cancel it, or wait for results.
1542
+ # # Here is how to wait for a response.
1543
+ # result.wait_until_done! timeout: 60
1544
+ # if result.response?
1545
+ # p result.response
1546
+ # else
1547
+ # puts "No response received."
1548
+ # end
1549
+ #
1550
+ def delete_entry_group request, options = nil
1551
+ raise ::ArgumentError, "request must be provided" if request.nil?
1552
+
1553
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest
1554
+
1555
+ # Converts hash and nil to an options object
1556
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1557
+
1558
+ # Customize the options with defaults
1559
+ metadata = @config.rpcs.delete_entry_group.metadata.to_h
1560
+
1561
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1562
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1563
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1564
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1565
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1566
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1567
+
1568
+ header_params = {}
1569
+ if request.name
1570
+ header_params["name"] = request.name
1571
+ end
1572
+
1573
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1574
+ metadata[:"x-goog-request-params"] ||= request_params_header
1575
+
1576
+ options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout,
1577
+ metadata: metadata,
1578
+ retry_policy: @config.rpcs.delete_entry_group.retry_policy
1579
+
1580
+ options.apply_defaults timeout: @config.timeout,
1581
+ metadata: @config.metadata,
1582
+ retry_policy: @config.retry_policy
1583
+
1584
+ @catalog_service_stub.call_rpc :delete_entry_group, request, options: options do |response, operation|
1585
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1586
+ yield response, operation if block_given?
1587
+ return response
1588
+ end
1589
+ rescue ::GRPC::BadStatus => e
1590
+ raise ::Google::Cloud::Error.from_error(e)
1591
+ end
1592
+
1593
+ ##
1594
+ # Lists EntryGroup resources in a project and location.
1595
+ #
1596
+ # @overload list_entry_groups(request, options = nil)
1597
+ # Pass arguments to `list_entry_groups` via a request object, either of type
1598
+ # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash.
1599
+ #
1600
+ # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash]
1601
+ # A request object representing the call parameters. Required. To specify no
1602
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1603
+ # @param options [::Gapic::CallOptions, ::Hash]
1604
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1605
+ #
1606
+ # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1607
+ # Pass arguments to `list_entry_groups` via keyword arguments. Note that at
1608
+ # least one keyword argument is required. To specify no parameters, or to keep all
1609
+ # the default parameter values, pass an empty Hash as a request object (see above).
1610
+ #
1611
+ # @param parent [::String]
1612
+ # Required. The resource name of the entryGroup location, of the form:
1613
+ # `projects/{project_number}/locations/{location_id}`
1614
+ # where `location_id` refers to a GCP region.
1615
+ # @param page_size [::Integer]
1616
+ # Optional. Maximum number of EntryGroups to return. The service may return
1617
+ # fewer than this value. If unspecified, at most 10 EntryGroups will be
1618
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
1619
+ # 1000.
1620
+ # @param page_token [::String]
1621
+ # Optional. Page token received from a previous `ListEntryGroups` call.
1622
+ # Provide this to retrieve the subsequent page. When paginating, all other
1623
+ # parameters provided to `ListEntryGroups` must match the call that provided
1624
+ # the page token.
1625
+ # @param filter [::String]
1626
+ # Optional. Filter request.
1627
+ # @param order_by [::String]
1628
+ # Optional. Order by fields for the result.
1629
+ #
1630
+ # @yield [response, operation] Access the result along with the RPC operation
1631
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>]
1632
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1633
+ #
1634
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>]
1635
+ #
1636
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1637
+ #
1638
+ # @example Basic example
1639
+ # require "google/cloud/dataplex/v1"
1640
+ #
1641
+ # # Create a client object. The client can be reused for multiple calls.
1642
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1643
+ #
1644
+ # # Create a request. To set request fields, pass in keyword arguments.
1645
+ # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new
1646
+ #
1647
+ # # Call the list_entry_groups method.
1648
+ # result = client.list_entry_groups request
1649
+ #
1650
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1651
+ # # over elements, and API calls will be issued to fetch pages as needed.
1652
+ # result.each do |item|
1653
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup.
1654
+ # p item
1655
+ # end
1656
+ #
1657
+ def list_entry_groups request, options = nil
1658
+ raise ::ArgumentError, "request must be provided" if request.nil?
1659
+
1660
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest
1661
+
1662
+ # Converts hash and nil to an options object
1663
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1664
+
1665
+ # Customize the options with defaults
1666
+ metadata = @config.rpcs.list_entry_groups.metadata.to_h
1667
+
1668
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1669
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1670
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1671
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1672
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1673
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1674
+
1675
+ header_params = {}
1676
+ if request.parent
1677
+ header_params["parent"] = request.parent
1678
+ end
1679
+
1680
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1681
+ metadata[:"x-goog-request-params"] ||= request_params_header
1682
+
1683
+ options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout,
1684
+ metadata: metadata,
1685
+ retry_policy: @config.rpcs.list_entry_groups.retry_policy
1686
+
1687
+ options.apply_defaults timeout: @config.timeout,
1688
+ metadata: @config.metadata,
1689
+ retry_policy: @config.retry_policy
1690
+
1691
+ @catalog_service_stub.call_rpc :list_entry_groups, request, options: options do |response, operation|
1692
+ response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, request, response, operation, options
1693
+ yield response, operation if block_given?
1694
+ return response
1695
+ end
1696
+ rescue ::GRPC::BadStatus => e
1697
+ raise ::Google::Cloud::Error.from_error(e)
1698
+ end
1699
+
1700
+ ##
1701
+ # Retrieves a EntryGroup resource.
1702
+ #
1703
+ # @overload get_entry_group(request, options = nil)
1704
+ # Pass arguments to `get_entry_group` via a request object, either of type
1705
+ # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash.
1706
+ #
1707
+ # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash]
1708
+ # A request object representing the call parameters. Required. To specify no
1709
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1710
+ # @param options [::Gapic::CallOptions, ::Hash]
1711
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1712
+ #
1713
+ # @overload get_entry_group(name: nil)
1714
+ # Pass arguments to `get_entry_group` via keyword arguments. Note that at
1715
+ # least one keyword argument is required. To specify no parameters, or to keep all
1716
+ # the default parameter values, pass an empty Hash as a request object (see above).
1717
+ #
1718
+ # @param name [::String]
1719
+ # Required. The resource name of the EntryGroup:
1720
+ # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
1721
+ #
1722
+ # @yield [response, operation] Access the result along with the RPC operation
1723
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryGroup]
1724
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1725
+ #
1726
+ # @return [::Google::Cloud::Dataplex::V1::EntryGroup]
1727
+ #
1728
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1729
+ #
1730
+ # @example Basic example
1731
+ # require "google/cloud/dataplex/v1"
1732
+ #
1733
+ # # Create a client object. The client can be reused for multiple calls.
1734
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1735
+ #
1736
+ # # Create a request. To set request fields, pass in keyword arguments.
1737
+ # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new
1738
+ #
1739
+ # # Call the get_entry_group method.
1740
+ # result = client.get_entry_group request
1741
+ #
1742
+ # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup.
1743
+ # p result
1744
+ #
1745
+ def get_entry_group request, options = nil
1746
+ raise ::ArgumentError, "request must be provided" if request.nil?
1747
+
1748
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest
1749
+
1750
+ # Converts hash and nil to an options object
1751
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1752
+
1753
+ # Customize the options with defaults
1754
+ metadata = @config.rpcs.get_entry_group.metadata.to_h
1755
+
1756
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1757
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1758
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1759
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1760
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1761
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1762
+
1763
+ header_params = {}
1764
+ if request.name
1765
+ header_params["name"] = request.name
1766
+ end
1767
+
1768
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1769
+ metadata[:"x-goog-request-params"] ||= request_params_header
1770
+
1771
+ options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout,
1772
+ metadata: metadata,
1773
+ retry_policy: @config.rpcs.get_entry_group.retry_policy
1774
+
1775
+ options.apply_defaults timeout: @config.timeout,
1776
+ metadata: @config.metadata,
1777
+ retry_policy: @config.retry_policy
1778
+
1779
+ @catalog_service_stub.call_rpc :get_entry_group, request, options: options do |response, operation|
1780
+ yield response, operation if block_given?
1781
+ return response
1782
+ end
1783
+ rescue ::GRPC::BadStatus => e
1784
+ raise ::Google::Cloud::Error.from_error(e)
1785
+ end
1786
+
1787
+ ##
1788
+ # Creates an Entry.
1789
+ #
1790
+ # @overload create_entry(request, options = nil)
1791
+ # Pass arguments to `create_entry` via a request object, either of type
1792
+ # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash.
1793
+ #
1794
+ # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash]
1795
+ # A request object representing the call parameters. Required. To specify no
1796
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1797
+ # @param options [::Gapic::CallOptions, ::Hash]
1798
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1799
+ #
1800
+ # @overload create_entry(parent: nil, entry_id: nil, entry: nil)
1801
+ # Pass arguments to `create_entry` via keyword arguments. Note that at
1802
+ # least one keyword argument is required. To specify no parameters, or to keep all
1803
+ # the default parameter values, pass an empty Hash as a request object (see above).
1804
+ #
1805
+ # @param parent [::String]
1806
+ # Required. The resource name of the parent Entry Group:
1807
+ # `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
1808
+ # @param entry_id [::String]
1809
+ # Required. Entry identifier. It has to be unique within an Entry Group.
1810
+ #
1811
+ # Entries corresponding to Google Cloud resources use Entry ID format based
1812
+ # on Full Resource Names
1813
+ # (https://cloud.google.com/apis/design/resource_names#full_resource_name).
1814
+ # The format is a Full Resource Name of the resource without the
1815
+ # prefix double slashes in the API Service Name part of Full Resource Name.
1816
+ # This allows retrieval of entries using their associated resource name.
1817
+ #
1818
+ # For example if the Full Resource Name of a resource is
1819
+ # `//library.googleapis.com/shelves/shelf1/books/book2`,
1820
+ # then the suggested entry_id is
1821
+ # `library.googleapis.com/shelves/shelf1/books/book2`.
1822
+ #
1823
+ # It is also suggested to follow the same convention for entries
1824
+ # corresponding to resources from other providers or systems than Google
1825
+ # Cloud.
1826
+ #
1827
+ # The maximum size of the field is 4000 characters.
1828
+ # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash]
1829
+ # Required. Entry resource.
1830
+ #
1831
+ # @yield [response, operation] Access the result along with the RPC operation
1832
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry]
1833
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1834
+ #
1835
+ # @return [::Google::Cloud::Dataplex::V1::Entry]
1836
+ #
1837
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1838
+ #
1839
+ # @example Basic example
1840
+ # require "google/cloud/dataplex/v1"
1841
+ #
1842
+ # # Create a client object. The client can be reused for multiple calls.
1843
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1844
+ #
1845
+ # # Create a request. To set request fields, pass in keyword arguments.
1846
+ # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new
1847
+ #
1848
+ # # Call the create_entry method.
1849
+ # result = client.create_entry request
1850
+ #
1851
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Entry.
1852
+ # p result
1853
+ #
1854
+ def create_entry request, options = nil
1855
+ raise ::ArgumentError, "request must be provided" if request.nil?
1856
+
1857
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest
1858
+
1859
+ # Converts hash and nil to an options object
1860
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1861
+
1862
+ # Customize the options with defaults
1863
+ metadata = @config.rpcs.create_entry.metadata.to_h
1864
+
1865
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1866
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1867
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1868
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1869
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1870
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1871
+
1872
+ header_params = {}
1873
+ if request.parent
1874
+ header_params["parent"] = request.parent
1875
+ end
1876
+
1877
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1878
+ metadata[:"x-goog-request-params"] ||= request_params_header
1879
+
1880
+ options.apply_defaults timeout: @config.rpcs.create_entry.timeout,
1881
+ metadata: metadata,
1882
+ retry_policy: @config.rpcs.create_entry.retry_policy
1883
+
1884
+ options.apply_defaults timeout: @config.timeout,
1885
+ metadata: @config.metadata,
1886
+ retry_policy: @config.retry_policy
1887
+
1888
+ @catalog_service_stub.call_rpc :create_entry, request, options: options do |response, operation|
1889
+ yield response, operation if block_given?
1890
+ return response
1891
+ end
1892
+ rescue ::GRPC::BadStatus => e
1893
+ raise ::Google::Cloud::Error.from_error(e)
1894
+ end
1895
+
1896
+ ##
1897
+ # Updates an Entry.
1898
+ #
1899
+ # @overload update_entry(request, options = nil)
1900
+ # Pass arguments to `update_entry` via a request object, either of type
1901
+ # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash.
1902
+ #
1903
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash]
1904
+ # A request object representing the call parameters. Required. To specify no
1905
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1906
+ # @param options [::Gapic::CallOptions, ::Hash]
1907
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1908
+ #
1909
+ # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil)
1910
+ # Pass arguments to `update_entry` via keyword arguments. Note that at
1911
+ # least one keyword argument is required. To specify no parameters, or to keep all
1912
+ # the default parameter values, pass an empty Hash as a request object (see above).
1913
+ #
1914
+ # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash]
1915
+ # Required. Entry resource.
1916
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1917
+ # Optional. Mask of fields to update. To update Aspects, the update_mask must
1918
+ # contain the value "aspects".
1919
+ #
1920
+ # If the update_mask is empty, all modifiable fields present in the request
1921
+ # will be updated.
1922
+ # @param allow_missing [::Boolean]
1923
+ # Optional. If set to true and the entry does not exist, it will be created.
1924
+ # @param delete_missing_aspects [::Boolean]
1925
+ # Optional. If set to true and the aspect_keys specify aspect ranges, any
1926
+ # existing aspects from that range not provided in the request will be
1927
+ # deleted.
1928
+ # @param aspect_keys [::Array<::String>]
1929
+ # Optional. The map keys of the Aspects which should be modified. Supports
1930
+ # the following syntaxes:
1931
+ # * <aspect_type_reference> - matches aspect on given type and empty path
1932
+ # * <aspect_type_reference>@path - matches aspect on given type and specified
1933
+ # path
1934
+ # * <aspect_type_reference>* - matches aspects on given type for all paths
1935
+ # * *@path - matches aspects of all types on the given path
1936
+ #
1937
+ # Existing aspects matching the syntax will not be removed unless
1938
+ # `delete_missing_aspects` is set to true.
1939
+ #
1940
+ # If this field is left empty, it will be treated as specifying exactly those
1941
+ # Aspects present in the request.
1942
+ #
1943
+ # @yield [response, operation] Access the result along with the RPC operation
1944
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry]
1945
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1946
+ #
1947
+ # @return [::Google::Cloud::Dataplex::V1::Entry]
1948
+ #
1949
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1950
+ #
1951
+ # @example Basic example
1952
+ # require "google/cloud/dataplex/v1"
1953
+ #
1954
+ # # Create a client object. The client can be reused for multiple calls.
1955
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
1956
+ #
1957
+ # # Create a request. To set request fields, pass in keyword arguments.
1958
+ # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new
1959
+ #
1960
+ # # Call the update_entry method.
1961
+ # result = client.update_entry request
1962
+ #
1963
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Entry.
1964
+ # p result
1965
+ #
1966
+ def update_entry request, options = nil
1967
+ raise ::ArgumentError, "request must be provided" if request.nil?
1968
+
1969
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest
1970
+
1971
+ # Converts hash and nil to an options object
1972
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1973
+
1974
+ # Customize the options with defaults
1975
+ metadata = @config.rpcs.update_entry.metadata.to_h
1976
+
1977
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1978
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1979
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1980
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1981
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1982
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1983
+
1984
+ header_params = {}
1985
+ if request.entry&.name
1986
+ header_params["entry.name"] = request.entry.name
1987
+ end
1988
+
1989
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1990
+ metadata[:"x-goog-request-params"] ||= request_params_header
1991
+
1992
+ options.apply_defaults timeout: @config.rpcs.update_entry.timeout,
1993
+ metadata: metadata,
1994
+ retry_policy: @config.rpcs.update_entry.retry_policy
1995
+
1996
+ options.apply_defaults timeout: @config.timeout,
1997
+ metadata: @config.metadata,
1998
+ retry_policy: @config.retry_policy
1999
+
2000
+ @catalog_service_stub.call_rpc :update_entry, request, options: options do |response, operation|
2001
+ yield response, operation if block_given?
2002
+ return response
2003
+ end
2004
+ rescue ::GRPC::BadStatus => e
2005
+ raise ::Google::Cloud::Error.from_error(e)
2006
+ end
2007
+
2008
+ ##
2009
+ # Deletes an Entry.
2010
+ #
2011
+ # @overload delete_entry(request, options = nil)
2012
+ # Pass arguments to `delete_entry` via a request object, either of type
2013
+ # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash.
2014
+ #
2015
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash]
2016
+ # A request object representing the call parameters. Required. To specify no
2017
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2018
+ # @param options [::Gapic::CallOptions, ::Hash]
2019
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2020
+ #
2021
+ # @overload delete_entry(name: nil)
2022
+ # Pass arguments to `delete_entry` via keyword arguments. Note that at
2023
+ # least one keyword argument is required. To specify no parameters, or to keep all
2024
+ # the default parameter values, pass an empty Hash as a request object (see above).
2025
+ #
2026
+ # @param name [::String]
2027
+ # Required. The resource name of the Entry:
2028
+ # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
2029
+ #
2030
+ # @yield [response, operation] Access the result along with the RPC operation
2031
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry]
2032
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2033
+ #
2034
+ # @return [::Google::Cloud::Dataplex::V1::Entry]
2035
+ #
2036
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2037
+ #
2038
+ # @example Basic example
2039
+ # require "google/cloud/dataplex/v1"
2040
+ #
2041
+ # # Create a client object. The client can be reused for multiple calls.
2042
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
2043
+ #
2044
+ # # Create a request. To set request fields, pass in keyword arguments.
2045
+ # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new
2046
+ #
2047
+ # # Call the delete_entry method.
2048
+ # result = client.delete_entry request
2049
+ #
2050
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Entry.
2051
+ # p result
2052
+ #
2053
+ def delete_entry request, options = nil
2054
+ raise ::ArgumentError, "request must be provided" if request.nil?
2055
+
2056
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest
2057
+
2058
+ # Converts hash and nil to an options object
2059
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2060
+
2061
+ # Customize the options with defaults
2062
+ metadata = @config.rpcs.delete_entry.metadata.to_h
2063
+
2064
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2065
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2066
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2067
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2068
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2069
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2070
+
2071
+ header_params = {}
2072
+ if request.name
2073
+ header_params["name"] = request.name
2074
+ end
2075
+
2076
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2077
+ metadata[:"x-goog-request-params"] ||= request_params_header
2078
+
2079
+ options.apply_defaults timeout: @config.rpcs.delete_entry.timeout,
2080
+ metadata: metadata,
2081
+ retry_policy: @config.rpcs.delete_entry.retry_policy
2082
+
2083
+ options.apply_defaults timeout: @config.timeout,
2084
+ metadata: @config.metadata,
2085
+ retry_policy: @config.retry_policy
2086
+
2087
+ @catalog_service_stub.call_rpc :delete_entry, request, options: options do |response, operation|
2088
+ yield response, operation if block_given?
2089
+ return response
2090
+ end
2091
+ rescue ::GRPC::BadStatus => e
2092
+ raise ::Google::Cloud::Error.from_error(e)
2093
+ end
2094
+
2095
+ ##
2096
+ # Lists entries within an entry group.
2097
+ #
2098
+ # @overload list_entries(request, options = nil)
2099
+ # Pass arguments to `list_entries` via a request object, either of type
2100
+ # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash.
2101
+ #
2102
+ # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash]
2103
+ # A request object representing the call parameters. Required. To specify no
2104
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2105
+ # @param options [::Gapic::CallOptions, ::Hash]
2106
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2107
+ #
2108
+ # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil)
2109
+ # Pass arguments to `list_entries` via keyword arguments. Note that at
2110
+ # least one keyword argument is required. To specify no parameters, or to keep all
2111
+ # the default parameter values, pass an empty Hash as a request object (see above).
2112
+ #
2113
+ # @param parent [::String]
2114
+ # Required. The resource name of the parent Entry Group:
2115
+ # `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
2116
+ # @param page_size [::Integer]
2117
+ # @param page_token [::String]
2118
+ # Optional. The pagination token returned by a previous request.
2119
+ # @param filter [::String]
2120
+ # Optional. A filter on the entries to return.
2121
+ # Filters are case-sensitive.
2122
+ # The request can be filtered by the following fields:
2123
+ # entry_type, entry_source.display_name.
2124
+ # The comparison operators are =, !=, <, >, <=, >= (strings are compared
2125
+ # according to lexical order)
2126
+ # The logical operators AND, OR, NOT can be used
2127
+ # in the filter. Wildcard "*" can be used, but for entry_type the full
2128
+ # project id or number needs to be provided. Example filter expressions:
2129
+ # "entry_source.display_name=AnExampleDisplayName"
2130
+ # "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type"
2131
+ # "entry_type=projects/example-project/locations/us/entryTypes/a* OR
2132
+ # entry_type=projects/another-project/locations/*"
2133
+ # "NOT entry_source.display_name=AnotherExampleDisplayName"
2134
+ #
2135
+ # @yield [response, operation] Access the result along with the RPC operation
2136
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>]
2137
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2138
+ #
2139
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>]
2140
+ #
2141
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2142
+ #
2143
+ # @example Basic example
2144
+ # require "google/cloud/dataplex/v1"
2145
+ #
2146
+ # # Create a client object. The client can be reused for multiple calls.
2147
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
2148
+ #
2149
+ # # Create a request. To set request fields, pass in keyword arguments.
2150
+ # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new
2151
+ #
2152
+ # # Call the list_entries method.
2153
+ # result = client.list_entries request
2154
+ #
2155
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2156
+ # # over elements, and API calls will be issued to fetch pages as needed.
2157
+ # result.each do |item|
2158
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry.
2159
+ # p item
2160
+ # end
2161
+ #
2162
+ def list_entries request, options = nil
2163
+ raise ::ArgumentError, "request must be provided" if request.nil?
2164
+
2165
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest
2166
+
2167
+ # Converts hash and nil to an options object
2168
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2169
+
2170
+ # Customize the options with defaults
2171
+ metadata = @config.rpcs.list_entries.metadata.to_h
2172
+
2173
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2174
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2175
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2176
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2177
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2178
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2179
+
2180
+ header_params = {}
2181
+ if request.parent
2182
+ header_params["parent"] = request.parent
2183
+ end
2184
+
2185
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2186
+ metadata[:"x-goog-request-params"] ||= request_params_header
2187
+
2188
+ options.apply_defaults timeout: @config.rpcs.list_entries.timeout,
2189
+ metadata: metadata,
2190
+ retry_policy: @config.rpcs.list_entries.retry_policy
2191
+
2192
+ options.apply_defaults timeout: @config.timeout,
2193
+ metadata: @config.metadata,
2194
+ retry_policy: @config.retry_policy
2195
+
2196
+ @catalog_service_stub.call_rpc :list_entries, request, options: options do |response, operation|
2197
+ response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entries, request, response, operation, options
2198
+ yield response, operation if block_given?
2199
+ return response
2200
+ end
2201
+ rescue ::GRPC::BadStatus => e
2202
+ raise ::Google::Cloud::Error.from_error(e)
2203
+ end
2204
+
2205
+ ##
2206
+ # Gets a single entry.
2207
+ #
2208
+ # @overload get_entry(request, options = nil)
2209
+ # Pass arguments to `get_entry` via a request object, either of type
2210
+ # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash.
2211
+ #
2212
+ # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash]
2213
+ # A request object representing the call parameters. Required. To specify no
2214
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2215
+ # @param options [::Gapic::CallOptions, ::Hash]
2216
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2217
+ #
2218
+ # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil)
2219
+ # Pass arguments to `get_entry` via keyword arguments. Note that at
2220
+ # least one keyword argument is required. To specify no parameters, or to keep all
2221
+ # the default parameter values, pass an empty Hash as a request object (see above).
2222
+ #
2223
+ # @param name [::String]
2224
+ # Required. The resource name of the Entry:
2225
+ # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
2226
+ # @param view [::Google::Cloud::Dataplex::V1::EntryView]
2227
+ # Optional. View for controlling which parts of an entry are to be returned.
2228
+ # @param aspect_types [::Array<::String>]
2229
+ # Optional. Limits the aspects returned to the provided aspect types.
2230
+ # Only works if the CUSTOM view is selected.
2231
+ # @param paths [::Array<::String>]
2232
+ # Optional. Limits the aspects returned to those associated with the provided
2233
+ # paths within the Entry. Only works if the CUSTOM view is selected.
2234
+ #
2235
+ # @yield [response, operation] Access the result along with the RPC operation
2236
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry]
2237
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2238
+ #
2239
+ # @return [::Google::Cloud::Dataplex::V1::Entry]
2240
+ #
2241
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2242
+ #
2243
+ # @example Basic example
2244
+ # require "google/cloud/dataplex/v1"
2245
+ #
2246
+ # # Create a client object. The client can be reused for multiple calls.
2247
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
2248
+ #
2249
+ # # Create a request. To set request fields, pass in keyword arguments.
2250
+ # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new
2251
+ #
2252
+ # # Call the get_entry method.
2253
+ # result = client.get_entry request
2254
+ #
2255
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Entry.
2256
+ # p result
2257
+ #
2258
+ def get_entry request, options = nil
2259
+ raise ::ArgumentError, "request must be provided" if request.nil?
2260
+
2261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest
2262
+
2263
+ # Converts hash and nil to an options object
2264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2265
+
2266
+ # Customize the options with defaults
2267
+ metadata = @config.rpcs.get_entry.metadata.to_h
2268
+
2269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2270
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2272
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2273
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2274
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2275
+
2276
+ header_params = {}
2277
+ if request.name
2278
+ header_params["name"] = request.name
2279
+ end
2280
+
2281
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2282
+ metadata[:"x-goog-request-params"] ||= request_params_header
2283
+
2284
+ options.apply_defaults timeout: @config.rpcs.get_entry.timeout,
2285
+ metadata: metadata,
2286
+ retry_policy: @config.rpcs.get_entry.retry_policy
2287
+
2288
+ options.apply_defaults timeout: @config.timeout,
2289
+ metadata: @config.metadata,
2290
+ retry_policy: @config.retry_policy
2291
+
2292
+ @catalog_service_stub.call_rpc :get_entry, request, options: options do |response, operation|
2293
+ yield response, operation if block_given?
2294
+ return response
2295
+ end
2296
+ rescue ::GRPC::BadStatus => e
2297
+ raise ::Google::Cloud::Error.from_error(e)
2298
+ end
2299
+
2300
+ ##
2301
+ # Looks up a single entry.
2302
+ #
2303
+ # @overload lookup_entry(request, options = nil)
2304
+ # Pass arguments to `lookup_entry` via a request object, either of type
2305
+ # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash.
2306
+ #
2307
+ # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash]
2308
+ # A request object representing the call parameters. Required. To specify no
2309
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2310
+ # @param options [::Gapic::CallOptions, ::Hash]
2311
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2312
+ #
2313
+ # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil)
2314
+ # Pass arguments to `lookup_entry` via keyword arguments. Note that at
2315
+ # least one keyword argument is required. To specify no parameters, or to keep all
2316
+ # the default parameter values, pass an empty Hash as a request object (see above).
2317
+ #
2318
+ # @param name [::String]
2319
+ # Required. The project to which the request should be attributed in the
2320
+ # following form: `projects/{project}/locations/{location}`.
2321
+ # @param view [::Google::Cloud::Dataplex::V1::EntryView]
2322
+ # Optional. View for controlling which parts of an entry are to be returned.
2323
+ # @param aspect_types [::Array<::String>]
2324
+ # Optional. Limits the aspects returned to the provided aspect types.
2325
+ # Only works if the CUSTOM view is selected.
2326
+ # @param paths [::Array<::String>]
2327
+ # Optional. Limits the aspects returned to those associated with the provided
2328
+ # paths within the Entry. Only works if the CUSTOM view is selected.
2329
+ # @param entry [::String]
2330
+ # Required. The resource name of the Entry:
2331
+ # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
2332
+ #
2333
+ # @yield [response, operation] Access the result along with the RPC operation
2334
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry]
2335
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2336
+ #
2337
+ # @return [::Google::Cloud::Dataplex::V1::Entry]
2338
+ #
2339
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2340
+ #
2341
+ # @example Basic example
2342
+ # require "google/cloud/dataplex/v1"
2343
+ #
2344
+ # # Create a client object. The client can be reused for multiple calls.
2345
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
2346
+ #
2347
+ # # Create a request. To set request fields, pass in keyword arguments.
2348
+ # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new
2349
+ #
2350
+ # # Call the lookup_entry method.
2351
+ # result = client.lookup_entry request
2352
+ #
2353
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Entry.
2354
+ # p result
2355
+ #
2356
+ def lookup_entry request, options = nil
2357
+ raise ::ArgumentError, "request must be provided" if request.nil?
2358
+
2359
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest
2360
+
2361
+ # Converts hash and nil to an options object
2362
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2363
+
2364
+ # Customize the options with defaults
2365
+ metadata = @config.rpcs.lookup_entry.metadata.to_h
2366
+
2367
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2368
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2369
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2370
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2371
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2372
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2373
+
2374
+ header_params = {}
2375
+ if request.name
2376
+ header_params["name"] = request.name
2377
+ end
2378
+
2379
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2380
+ metadata[:"x-goog-request-params"] ||= request_params_header
2381
+
2382
+ options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout,
2383
+ metadata: metadata,
2384
+ retry_policy: @config.rpcs.lookup_entry.retry_policy
2385
+
2386
+ options.apply_defaults timeout: @config.timeout,
2387
+ metadata: @config.metadata,
2388
+ retry_policy: @config.retry_policy
2389
+
2390
+ @catalog_service_stub.call_rpc :lookup_entry, request, options: options do |response, operation|
2391
+ yield response, operation if block_given?
2392
+ return response
2393
+ end
2394
+ rescue ::GRPC::BadStatus => e
2395
+ raise ::Google::Cloud::Error.from_error(e)
2396
+ end
2397
+
2398
+ ##
2399
+ # Searches for entries matching given query and scope.
2400
+ #
2401
+ # @overload search_entries(request, options = nil)
2402
+ # Pass arguments to `search_entries` via a request object, either of type
2403
+ # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash.
2404
+ #
2405
+ # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash]
2406
+ # A request object representing the call parameters. Required. To specify no
2407
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2408
+ # @param options [::Gapic::CallOptions, ::Hash]
2409
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2410
+ #
2411
+ # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil)
2412
+ # Pass arguments to `search_entries` via keyword arguments. Note that at
2413
+ # least one keyword argument is required. To specify no parameters, or to keep all
2414
+ # the default parameter values, pass an empty Hash as a request object (see above).
2415
+ #
2416
+ # @param name [::String]
2417
+ # Required. The project to which the request should be attributed in the
2418
+ # following form: `projects/{project}/locations/{location}`.
2419
+ # @param query [::String]
2420
+ # Required. The query against which entries in scope should be matched.
2421
+ # @param page_size [::Integer]
2422
+ # Optional. Pagination.
2423
+ # @param page_token [::String]
2424
+ # @param order_by [::String]
2425
+ # Optional. Ordering of the results. Supported options to be added later.
2426
+ # @param scope [::String]
2427
+ # Optional. The scope under which the search should be operating. Should
2428
+ # either be organizations/<org_id> or projects/<project_ref>. If left
2429
+ # unspecified, it will default to the organization where the project provided
2430
+ # in `name` is located.
2431
+ #
2432
+ # @yield [response, operation] Access the result along with the RPC operation
2433
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>]
2434
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2435
+ #
2436
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>]
2437
+ #
2438
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2439
+ #
2440
+ # @example Basic example
2441
+ # require "google/cloud/dataplex/v1"
2442
+ #
2443
+ # # Create a client object. The client can be reused for multiple calls.
2444
+ # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new
2445
+ #
2446
+ # # Create a request. To set request fields, pass in keyword arguments.
2447
+ # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new
2448
+ #
2449
+ # # Call the search_entries method.
2450
+ # result = client.search_entries request
2451
+ #
2452
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2453
+ # # over elements, and API calls will be issued to fetch pages as needed.
2454
+ # result.each do |item|
2455
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult.
2456
+ # p item
2457
+ # end
2458
+ #
2459
+ def search_entries request, options = nil
2460
+ raise ::ArgumentError, "request must be provided" if request.nil?
2461
+
2462
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest
2463
+
2464
+ # Converts hash and nil to an options object
2465
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2466
+
2467
+ # Customize the options with defaults
2468
+ metadata = @config.rpcs.search_entries.metadata.to_h
2469
+
2470
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2471
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2472
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2473
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2474
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2475
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2476
+
2477
+ header_params = {}
2478
+ if request.name
2479
+ header_params["name"] = request.name
2480
+ end
2481
+
2482
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2483
+ metadata[:"x-goog-request-params"] ||= request_params_header
2484
+
2485
+ options.apply_defaults timeout: @config.rpcs.search_entries.timeout,
2486
+ metadata: metadata,
2487
+ retry_policy: @config.rpcs.search_entries.retry_policy
2488
+
2489
+ options.apply_defaults timeout: @config.timeout,
2490
+ metadata: @config.metadata,
2491
+ retry_policy: @config.retry_policy
2492
+
2493
+ @catalog_service_stub.call_rpc :search_entries, request, options: options do |response, operation|
2494
+ response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :search_entries, request, response, operation, options
2495
+ yield response, operation if block_given?
2496
+ return response
2497
+ end
2498
+ rescue ::GRPC::BadStatus => e
2499
+ raise ::Google::Cloud::Error.from_error(e)
2500
+ end
2501
+
2502
+ ##
2503
+ # Configuration class for the CatalogService API.
2504
+ #
2505
+ # This class represents the configuration for CatalogService,
2506
+ # providing control over timeouts, retry behavior, logging, transport
2507
+ # parameters, and other low-level controls. Certain parameters can also be
2508
+ # applied individually to specific RPCs. See
2509
+ # {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration::Rpcs}
2510
+ # for a list of RPCs that can be configured independently.
2511
+ #
2512
+ # Configuration can be applied globally to all clients, or to a single client
2513
+ # on construction.
2514
+ #
2515
+ # @example
2516
+ #
2517
+ # # Modify the global config, setting the timeout for
2518
+ # # create_entry_type to 20 seconds,
2519
+ # # and all remaining timeouts to 10 seconds.
2520
+ # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config|
2521
+ # config.timeout = 10.0
2522
+ # config.rpcs.create_entry_type.timeout = 20.0
2523
+ # end
2524
+ #
2525
+ # # Apply the above configuration only to a new client.
2526
+ # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config|
2527
+ # config.timeout = 10.0
2528
+ # config.rpcs.create_entry_type.timeout = 20.0
2529
+ # end
2530
+ #
2531
+ # @!attribute [rw] endpoint
2532
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2533
+ # nil, indicating to use the default endpoint in the current universe domain.
2534
+ # @return [::String,nil]
2535
+ # @!attribute [rw] credentials
2536
+ # Credentials to send with calls. You may provide any of the following types:
2537
+ # * (`String`) The path to a service account key file in JSON format
2538
+ # * (`Hash`) A service account key as a Hash
2539
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2540
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2541
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2542
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2543
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2544
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2545
+ # * (`nil`) indicating no credentials
2546
+ # @return [::Object]
2547
+ # @!attribute [rw] scope
2548
+ # The OAuth scopes
2549
+ # @return [::Array<::String>]
2550
+ # @!attribute [rw] lib_name
2551
+ # The library name as recorded in instrumentation and logging
2552
+ # @return [::String]
2553
+ # @!attribute [rw] lib_version
2554
+ # The library version as recorded in instrumentation and logging
2555
+ # @return [::String]
2556
+ # @!attribute [rw] channel_args
2557
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2558
+ # `GRPC::Core::Channel` object is provided as the credential.
2559
+ # @return [::Hash]
2560
+ # @!attribute [rw] interceptors
2561
+ # An array of interceptors that are run before calls are executed.
2562
+ # @return [::Array<::GRPC::ClientInterceptor>]
2563
+ # @!attribute [rw] timeout
2564
+ # The call timeout in seconds.
2565
+ # @return [::Numeric]
2566
+ # @!attribute [rw] metadata
2567
+ # Additional gRPC headers to be sent with the call.
2568
+ # @return [::Hash{::Symbol=>::String}]
2569
+ # @!attribute [rw] retry_policy
2570
+ # The retry policy. The value is a hash with the following keys:
2571
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2572
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2573
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2574
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2575
+ # trigger a retry.
2576
+ # @return [::Hash]
2577
+ # @!attribute [rw] quota_project
2578
+ # A separate project against which to charge quota.
2579
+ # @return [::String]
2580
+ # @!attribute [rw] universe_domain
2581
+ # The universe domain within which to make requests. This determines the
2582
+ # default endpoint URL. The default value of nil uses the environment
2583
+ # universe (usually the default "googleapis.com" universe).
2584
+ # @return [::String,nil]
2585
+ #
2586
+ class Configuration
2587
+ extend ::Gapic::Config
2588
+
2589
+ # @private
2590
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2591
+ DEFAULT_ENDPOINT = "dataplex.googleapis.com"
2592
+
2593
+ config_attr :endpoint, nil, ::String, nil
2594
+ config_attr :credentials, nil do |value|
2595
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2596
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2597
+ allowed.any? { |klass| klass === value }
2598
+ end
2599
+ config_attr :scope, nil, ::String, ::Array, nil
2600
+ config_attr :lib_name, nil, ::String, nil
2601
+ config_attr :lib_version, nil, ::String, nil
2602
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2603
+ config_attr :interceptors, nil, ::Array, nil
2604
+ config_attr :timeout, nil, ::Numeric, nil
2605
+ config_attr :metadata, nil, ::Hash, nil
2606
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2607
+ config_attr :quota_project, nil, ::String, nil
2608
+ config_attr :universe_domain, nil, ::String, nil
2609
+
2610
+ # @private
2611
+ def initialize parent_config = nil
2612
+ @parent_config = parent_config unless parent_config.nil?
2613
+
2614
+ yield self if block_given?
2615
+ end
2616
+
2617
+ ##
2618
+ # Configurations for individual RPCs
2619
+ # @return [Rpcs]
2620
+ #
2621
+ def rpcs
2622
+ @rpcs ||= begin
2623
+ parent_rpcs = nil
2624
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2625
+ Rpcs.new parent_rpcs
2626
+ end
2627
+ end
2628
+
2629
+ ##
2630
+ # Configuration for the channel pool
2631
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2632
+ #
2633
+ def channel_pool
2634
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2635
+ end
2636
+
2637
+ ##
2638
+ # Configuration RPC class for the CatalogService API.
2639
+ #
2640
+ # Includes fields providing the configuration for each RPC in this service.
2641
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2642
+ # the following configuration fields:
2643
+ #
2644
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2645
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2646
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2647
+ # include the following keys:
2648
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2649
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2650
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2651
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2652
+ # trigger a retry.
2653
+ #
2654
+ class Rpcs
2655
+ ##
2656
+ # RPC-specific configuration for `create_entry_type`
2657
+ # @return [::Gapic::Config::Method]
2658
+ #
2659
+ attr_reader :create_entry_type
2660
+ ##
2661
+ # RPC-specific configuration for `update_entry_type`
2662
+ # @return [::Gapic::Config::Method]
2663
+ #
2664
+ attr_reader :update_entry_type
2665
+ ##
2666
+ # RPC-specific configuration for `delete_entry_type`
2667
+ # @return [::Gapic::Config::Method]
2668
+ #
2669
+ attr_reader :delete_entry_type
2670
+ ##
2671
+ # RPC-specific configuration for `list_entry_types`
2672
+ # @return [::Gapic::Config::Method]
2673
+ #
2674
+ attr_reader :list_entry_types
2675
+ ##
2676
+ # RPC-specific configuration for `get_entry_type`
2677
+ # @return [::Gapic::Config::Method]
2678
+ #
2679
+ attr_reader :get_entry_type
2680
+ ##
2681
+ # RPC-specific configuration for `create_aspect_type`
2682
+ # @return [::Gapic::Config::Method]
2683
+ #
2684
+ attr_reader :create_aspect_type
2685
+ ##
2686
+ # RPC-specific configuration for `update_aspect_type`
2687
+ # @return [::Gapic::Config::Method]
2688
+ #
2689
+ attr_reader :update_aspect_type
2690
+ ##
2691
+ # RPC-specific configuration for `delete_aspect_type`
2692
+ # @return [::Gapic::Config::Method]
2693
+ #
2694
+ attr_reader :delete_aspect_type
2695
+ ##
2696
+ # RPC-specific configuration for `list_aspect_types`
2697
+ # @return [::Gapic::Config::Method]
2698
+ #
2699
+ attr_reader :list_aspect_types
2700
+ ##
2701
+ # RPC-specific configuration for `get_aspect_type`
2702
+ # @return [::Gapic::Config::Method]
2703
+ #
2704
+ attr_reader :get_aspect_type
2705
+ ##
2706
+ # RPC-specific configuration for `create_entry_group`
2707
+ # @return [::Gapic::Config::Method]
2708
+ #
2709
+ attr_reader :create_entry_group
2710
+ ##
2711
+ # RPC-specific configuration for `update_entry_group`
2712
+ # @return [::Gapic::Config::Method]
2713
+ #
2714
+ attr_reader :update_entry_group
2715
+ ##
2716
+ # RPC-specific configuration for `delete_entry_group`
2717
+ # @return [::Gapic::Config::Method]
2718
+ #
2719
+ attr_reader :delete_entry_group
2720
+ ##
2721
+ # RPC-specific configuration for `list_entry_groups`
2722
+ # @return [::Gapic::Config::Method]
2723
+ #
2724
+ attr_reader :list_entry_groups
2725
+ ##
2726
+ # RPC-specific configuration for `get_entry_group`
2727
+ # @return [::Gapic::Config::Method]
2728
+ #
2729
+ attr_reader :get_entry_group
2730
+ ##
2731
+ # RPC-specific configuration for `create_entry`
2732
+ # @return [::Gapic::Config::Method]
2733
+ #
2734
+ attr_reader :create_entry
2735
+ ##
2736
+ # RPC-specific configuration for `update_entry`
2737
+ # @return [::Gapic::Config::Method]
2738
+ #
2739
+ attr_reader :update_entry
2740
+ ##
2741
+ # RPC-specific configuration for `delete_entry`
2742
+ # @return [::Gapic::Config::Method]
2743
+ #
2744
+ attr_reader :delete_entry
2745
+ ##
2746
+ # RPC-specific configuration for `list_entries`
2747
+ # @return [::Gapic::Config::Method]
2748
+ #
2749
+ attr_reader :list_entries
2750
+ ##
2751
+ # RPC-specific configuration for `get_entry`
2752
+ # @return [::Gapic::Config::Method]
2753
+ #
2754
+ attr_reader :get_entry
2755
+ ##
2756
+ # RPC-specific configuration for `lookup_entry`
2757
+ # @return [::Gapic::Config::Method]
2758
+ #
2759
+ attr_reader :lookup_entry
2760
+ ##
2761
+ # RPC-specific configuration for `search_entries`
2762
+ # @return [::Gapic::Config::Method]
2763
+ #
2764
+ attr_reader :search_entries
2765
+
2766
+ # @private
2767
+ def initialize parent_rpcs = nil
2768
+ create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type
2769
+ @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config
2770
+ update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type
2771
+ @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config
2772
+ delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type
2773
+ @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config
2774
+ list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types
2775
+ @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config
2776
+ get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type
2777
+ @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config
2778
+ create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type
2779
+ @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config
2780
+ update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type
2781
+ @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config
2782
+ delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type
2783
+ @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config
2784
+ list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types
2785
+ @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config
2786
+ get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type
2787
+ @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config
2788
+ create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group
2789
+ @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config
2790
+ update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group
2791
+ @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config
2792
+ delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group
2793
+ @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config
2794
+ list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups
2795
+ @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config
2796
+ get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group
2797
+ @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config
2798
+ create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry
2799
+ @create_entry = ::Gapic::Config::Method.new create_entry_config
2800
+ update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry
2801
+ @update_entry = ::Gapic::Config::Method.new update_entry_config
2802
+ delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry
2803
+ @delete_entry = ::Gapic::Config::Method.new delete_entry_config
2804
+ list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries
2805
+ @list_entries = ::Gapic::Config::Method.new list_entries_config
2806
+ get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry
2807
+ @get_entry = ::Gapic::Config::Method.new get_entry_config
2808
+ lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry
2809
+ @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config
2810
+ search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries
2811
+ @search_entries = ::Gapic::Config::Method.new search_entries_config
2812
+
2813
+ yield self if block_given?
2814
+ end
2815
+ end
2816
+ end
2817
+ end
2818
+ end
2819
+ end
2820
+ end
2821
+ end
2822
+ end