google-cloud-dataplex-v1 0.19.0 → 0.21.0

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