google-cloud-dataplex-v1 0.19.0 → 0.20.0

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