google-cloud-dataplex-v1 2.4.1 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dataplex/v1/bindings_override.rb +34 -29
  4. data/lib/google/cloud/dataplex/v1/business_glossary_pb.rb +75 -0
  5. data/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb +1985 -0
  6. data/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb +47 -0
  7. data/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb +813 -0
  8. data/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb +111 -0
  9. data/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb +1863 -0
  10. data/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb +943 -0
  11. data/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb +1002 -0
  12. data/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb +59 -0
  13. data/lib/google/cloud/dataplex/v1/business_glossary_service.rb +61 -0
  14. data/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb +81 -0
  15. data/lib/google/cloud/dataplex/v1/catalog_pb.rb +7 -1
  16. data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +302 -11
  17. data/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +40 -0
  18. data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +281 -11
  19. data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +2 -2
  20. data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +184 -0
  21. data/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +4 -4
  22. data/lib/google/cloud/dataplex/v1/catalog_service.rb +4 -4
  23. data/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +14 -6
  24. data/lib/google/cloud/dataplex/v1/cmek_service/client.rb +1 -1
  25. data/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb +1 -1
  26. data/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb +2 -2
  27. data/lib/google/cloud/dataplex/v1/cmek_service/rest.rb +1 -1
  28. data/lib/google/cloud/dataplex/v1/cmek_service.rb +1 -1
  29. data/lib/google/cloud/dataplex/v1/cmek_services_pb.rb +1 -1
  30. data/lib/google/cloud/dataplex/v1/content_service/client.rb +2 -1
  31. data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +2 -1
  32. data/lib/google/cloud/dataplex/v1/content_service/rest.rb +2 -1
  33. data/lib/google/cloud/dataplex/v1/content_service.rb +2 -1
  34. data/lib/google/cloud/dataplex/v1/content_services_pb.rb +2 -1
  35. data/lib/google/cloud/dataplex/v1/data_discovery_pb.rb +1 -1
  36. data/lib/google/cloud/dataplex/v1/data_profile_pb.rb +1 -1
  37. data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +3 -1
  38. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +7 -7
  39. data/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +14 -0
  40. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +7 -7
  41. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +2 -2
  42. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +1 -1
  43. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +1 -1
  44. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +2 -2
  45. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +2 -2
  46. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +2 -2
  47. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +2 -2
  48. data/lib/google/cloud/dataplex/v1/datascans_common_pb.rb +45 -0
  49. data/lib/google/cloud/dataplex/v1/logs_pb.rb +3 -1
  50. data/lib/google/cloud/dataplex/v1/processing_pb.rb +1 -1
  51. data/lib/google/cloud/dataplex/v1/rest.rb +1 -0
  52. data/lib/google/cloud/dataplex/v1/version.rb +1 -1
  53. data/lib/google/cloud/dataplex/v1.rb +1 -0
  54. data/proto_docs/google/cloud/dataplex/v1/analyze.rb +1 -1
  55. data/proto_docs/google/cloud/dataplex/v1/business_glossary.rb +531 -0
  56. data/proto_docs/google/cloud/dataplex/v1/catalog.rb +196 -33
  57. data/proto_docs/google/cloud/dataplex/v1/data_discovery.rb +6 -0
  58. data/proto_docs/google/cloud/dataplex/v1/data_profile.rb +99 -98
  59. data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +18 -5
  60. data/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb +1 -1
  61. data/proto_docs/google/cloud/dataplex/v1/datascans.rb +11 -11
  62. data/proto_docs/google/cloud/dataplex/v1/datascans_common.rb +48 -0
  63. data/proto_docs/google/cloud/dataplex/v1/logs.rb +7 -3
  64. data/proto_docs/google/cloud/dataplex/v1/metadata.rb +10 -8
  65. data/proto_docs/google/cloud/dataplex/v1/processing.rb +15 -11
  66. data/proto_docs/google/cloud/dataplex/v1/service.rb +2 -2
  67. data/proto_docs/google/cloud/dataplex/v1/tasks.rb +3 -3
  68. metadata +19 -5
@@ -0,0 +1,1985 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/business_glossary_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 BusinessGlossaryService
29
+ ##
30
+ # Client for the BusinessGlossaryService service.
31
+ #
32
+ # BusinessGlossaryService provides APIs for managing business glossary
33
+ # resources for enterprise customers.
34
+ # The resources currently supported in Business Glossary are:
35
+ # 1. Glossary
36
+ # 2. GlossaryCategory
37
+ # 3. GlossaryTerm
38
+ #
39
+ class Client
40
+ # @private
41
+ API_VERSION = ""
42
+
43
+ # @private
44
+ DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$"
45
+
46
+ include Paths
47
+
48
+ # @private
49
+ attr_reader :business_glossary_service_stub
50
+
51
+ ##
52
+ # Configure the BusinessGlossaryService Client class.
53
+ #
54
+ # See {::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client::Configuration}
55
+ # for a description of the configuration fields.
56
+ #
57
+ # @example
58
+ #
59
+ # # Modify the configuration for all BusinessGlossaryService clients
60
+ # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.configure do |config|
61
+ # config.timeout = 10.0
62
+ # end
63
+ #
64
+ # @yield [config] Configure the Client client.
65
+ # @yieldparam config [Client::Configuration]
66
+ #
67
+ # @return [Client::Configuration]
68
+ #
69
+ def self.configure
70
+ @configure ||= begin
71
+ namespace = ["Google", "Cloud", "Dataplex", "V1"]
72
+ parent_config = while namespace.any?
73
+ parent_name = namespace.join "::"
74
+ parent_const = const_get parent_name
75
+ break parent_const.configure if parent_const.respond_to? :configure
76
+ namespace.pop
77
+ end
78
+ default_config = Client::Configuration.new parent_config
79
+
80
+ default_config
81
+ end
82
+ yield @configure if block_given?
83
+ @configure
84
+ end
85
+
86
+ ##
87
+ # Configure the BusinessGlossaryService Client instance.
88
+ #
89
+ # The configuration is set to the derived mode, meaning that values can be changed,
90
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
91
+ # should be made on {Client.configure}.
92
+ #
93
+ # See {::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client::Configuration}
94
+ # for a description of the configuration fields.
95
+ #
96
+ # @yield [config] Configure the Client client.
97
+ # @yieldparam config [Client::Configuration]
98
+ #
99
+ # @return [Client::Configuration]
100
+ #
101
+ def configure
102
+ yield @config if block_given?
103
+ @config
104
+ end
105
+
106
+ ##
107
+ # The effective universe domain
108
+ #
109
+ # @return [String]
110
+ #
111
+ def universe_domain
112
+ @business_glossary_service_stub.universe_domain
113
+ end
114
+
115
+ ##
116
+ # Create a new BusinessGlossaryService client object.
117
+ #
118
+ # @example
119
+ #
120
+ # # Create a client using the default configuration
121
+ # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
122
+ #
123
+ # # Create a client using a custom configuration
124
+ # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config|
125
+ # config.timeout = 10.0
126
+ # end
127
+ #
128
+ # @yield [config] Configure the BusinessGlossaryService client.
129
+ # @yieldparam config [Client::Configuration]
130
+ #
131
+ def initialize
132
+ # These require statements are intentionally placed here to initialize
133
+ # the gRPC module only when it's required.
134
+ # See https://github.com/googleapis/toolkit/issues/446
135
+ require "gapic/grpc"
136
+ require "google/cloud/dataplex/v1/business_glossary_services_pb"
137
+
138
+ # Create the configuration object
139
+ @config = Configuration.new Client.configure
140
+
141
+ # Yield the configuration if needed
142
+ yield @config if block_given?
143
+
144
+ # Create credentials
145
+ credentials = @config.credentials
146
+ # Use self-signed JWT if the endpoint is unchanged from default,
147
+ # but only if the default endpoint does not have a region prefix.
148
+ enable_self_signed_jwt = @config.endpoint.nil? ||
149
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
+ !@config.endpoint.split(".").first.include?("-"))
151
+ credentials ||= Credentials.default scope: @config.scope,
152
+ enable_self_signed_jwt: enable_self_signed_jwt
153
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
154
+ credentials = Credentials.new credentials, scope: @config.scope
155
+ end
156
+ @quota_project_id = @config.quota_project
157
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
158
+
159
+ @operations_client = Operations.new do |config|
160
+ config.credentials = credentials
161
+ config.quota_project = @quota_project_id
162
+ config.endpoint = @config.endpoint
163
+ config.universe_domain = @config.universe_domain
164
+ end
165
+
166
+ @business_glossary_service_stub = ::Gapic::ServiceStub.new(
167
+ ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Stub,
168
+ credentials: credentials,
169
+ endpoint: @config.endpoint,
170
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
171
+ universe_domain: @config.universe_domain,
172
+ channel_args: @config.channel_args,
173
+ interceptors: @config.interceptors,
174
+ channel_pool_config: @config.channel_pool,
175
+ logger: @config.logger
176
+ )
177
+
178
+ @business_glossary_service_stub.stub_logger&.info do |entry|
179
+ entry.set_system_name
180
+ entry.set_service
181
+ entry.message = "Created client for #{entry.service}"
182
+ entry.set_credentials_fields credentials
183
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
184
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
185
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
186
+ end
187
+
188
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
189
+ config.credentials = credentials
190
+ config.quota_project = @quota_project_id
191
+ config.endpoint = @business_glossary_service_stub.endpoint
192
+ config.universe_domain = @business_glossary_service_stub.universe_domain
193
+ config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger=
194
+ end
195
+
196
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
197
+ config.credentials = credentials
198
+ config.quota_project = @quota_project_id
199
+ config.endpoint = @business_glossary_service_stub.endpoint
200
+ config.universe_domain = @business_glossary_service_stub.universe_domain
201
+ config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger=
202
+ end
203
+ end
204
+
205
+ ##
206
+ # Get the associated client for long-running operations.
207
+ #
208
+ # @return [::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Operations]
209
+ #
210
+ attr_reader :operations_client
211
+
212
+ ##
213
+ # Get the associated client for mix-in of the Locations.
214
+ #
215
+ # @return [Google::Cloud::Location::Locations::Client]
216
+ #
217
+ attr_reader :location_client
218
+
219
+ ##
220
+ # Get the associated client for mix-in of the IAMPolicy.
221
+ #
222
+ # @return [Google::Iam::V1::IAMPolicy::Client]
223
+ #
224
+ attr_reader :iam_policy_client
225
+
226
+ ##
227
+ # The logger used for request/response debug logging.
228
+ #
229
+ # @return [Logger]
230
+ #
231
+ def logger
232
+ @business_glossary_service_stub.logger
233
+ end
234
+
235
+ # Service calls
236
+
237
+ ##
238
+ # Creates a new Glossary resource.
239
+ #
240
+ # @overload create_glossary(request, options = nil)
241
+ # Pass arguments to `create_glossary` via a request object, either of type
242
+ # {::Google::Cloud::Dataplex::V1::CreateGlossaryRequest} or an equivalent Hash.
243
+ #
244
+ # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Hash]
245
+ # A request object representing the call parameters. Required. To specify no
246
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
247
+ # @param options [::Gapic::CallOptions, ::Hash]
248
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
249
+ #
250
+ # @overload create_glossary(parent: nil, glossary_id: nil, glossary: nil, validate_only: nil)
251
+ # Pass arguments to `create_glossary` via keyword arguments. Note that at
252
+ # least one keyword argument is required. To specify no parameters, or to keep all
253
+ # the default parameter values, pass an empty Hash as a request object (see above).
254
+ #
255
+ # @param parent [::String]
256
+ # Required. The parent resource where this Glossary will be created.
257
+ # Format: projects/\\{project_id_or_number}/locations/\\{location_id}
258
+ # where `location_id` refers to a Google Cloud region.
259
+ # @param glossary_id [::String]
260
+ # Required. Glossary ID: Glossary identifier.
261
+ # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash]
262
+ # Required. The Glossary to create.
263
+ # @param validate_only [::Boolean]
264
+ # Optional. Validates the request without actually creating the Glossary.
265
+ # Default: false.
266
+ #
267
+ # @yield [response, operation] Access the result along with the RPC operation
268
+ # @yieldparam response [::Gapic::Operation]
269
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
270
+ #
271
+ # @return [::Gapic::Operation]
272
+ #
273
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
274
+ #
275
+ # @example Basic example
276
+ # require "google/cloud/dataplex/v1"
277
+ #
278
+ # # Create a client object. The client can be reused for multiple calls.
279
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
280
+ #
281
+ # # Create a request. To set request fields, pass in keyword arguments.
282
+ # request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new
283
+ #
284
+ # # Call the create_glossary method.
285
+ # result = client.create_glossary request
286
+ #
287
+ # # The returned object is of type Gapic::Operation. You can use it to
288
+ # # check the status of an operation, cancel it, or wait for results.
289
+ # # Here is how to wait for a response.
290
+ # result.wait_until_done! timeout: 60
291
+ # if result.response?
292
+ # p result.response
293
+ # else
294
+ # puts "No response received."
295
+ # end
296
+ #
297
+ def create_glossary request, options = nil
298
+ raise ::ArgumentError, "request must be provided" if request.nil?
299
+
300
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest
301
+
302
+ # Converts hash and nil to an options object
303
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
304
+
305
+ # Customize the options with defaults
306
+ metadata = @config.rpcs.create_glossary.metadata.to_h
307
+
308
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
309
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
310
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
311
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
312
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
313
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
314
+
315
+ header_params = {}
316
+ if request.parent
317
+ header_params["parent"] = request.parent
318
+ end
319
+
320
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
321
+ metadata[:"x-goog-request-params"] ||= request_params_header
322
+
323
+ options.apply_defaults timeout: @config.rpcs.create_glossary.timeout,
324
+ metadata: metadata,
325
+ retry_policy: @config.rpcs.create_glossary.retry_policy
326
+
327
+ options.apply_defaults timeout: @config.timeout,
328
+ metadata: @config.metadata,
329
+ retry_policy: @config.retry_policy
330
+
331
+ @business_glossary_service_stub.call_rpc :create_glossary, request, options: options do |response, operation|
332
+ response = ::Gapic::Operation.new response, @operations_client, options: options
333
+ yield response, operation if block_given?
334
+ throw :response, response
335
+ end
336
+ rescue ::GRPC::BadStatus => e
337
+ raise ::Google::Cloud::Error.from_error(e)
338
+ end
339
+
340
+ ##
341
+ # Updates a Glossary resource.
342
+ #
343
+ # @overload update_glossary(request, options = nil)
344
+ # Pass arguments to `update_glossary` via a request object, either of type
345
+ # {::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest} or an equivalent Hash.
346
+ #
347
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Hash]
348
+ # A request object representing the call parameters. Required. To specify no
349
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
350
+ # @param options [::Gapic::CallOptions, ::Hash]
351
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
352
+ #
353
+ # @overload update_glossary(glossary: nil, update_mask: nil, validate_only: nil)
354
+ # Pass arguments to `update_glossary` via keyword arguments. Note that at
355
+ # least one keyword argument is required. To specify no parameters, or to keep all
356
+ # the default parameter values, pass an empty Hash as a request object (see above).
357
+ #
358
+ # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash]
359
+ # Required. The Glossary to update.
360
+ # The Glossary's `name` field is used to identify the Glossary to update.
361
+ # Format:
362
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}
363
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
364
+ # Required. The list of fields to update.
365
+ # @param validate_only [::Boolean]
366
+ # Optional. Validates the request without actually updating the Glossary.
367
+ # Default: false.
368
+ #
369
+ # @yield [response, operation] Access the result along with the RPC operation
370
+ # @yieldparam response [::Gapic::Operation]
371
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
372
+ #
373
+ # @return [::Gapic::Operation]
374
+ #
375
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
376
+ #
377
+ # @example Basic example
378
+ # require "google/cloud/dataplex/v1"
379
+ #
380
+ # # Create a client object. The client can be reused for multiple calls.
381
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
382
+ #
383
+ # # Create a request. To set request fields, pass in keyword arguments.
384
+ # request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new
385
+ #
386
+ # # Call the update_glossary method.
387
+ # result = client.update_glossary request
388
+ #
389
+ # # The returned object is of type Gapic::Operation. You can use it to
390
+ # # check the status of an operation, cancel it, or wait for results.
391
+ # # Here is how to wait for a response.
392
+ # result.wait_until_done! timeout: 60
393
+ # if result.response?
394
+ # p result.response
395
+ # else
396
+ # puts "No response received."
397
+ # end
398
+ #
399
+ def update_glossary request, options = nil
400
+ raise ::ArgumentError, "request must be provided" if request.nil?
401
+
402
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest
403
+
404
+ # Converts hash and nil to an options object
405
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
406
+
407
+ # Customize the options with defaults
408
+ metadata = @config.rpcs.update_glossary.metadata.to_h
409
+
410
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
411
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
412
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
413
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
414
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
415
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
416
+
417
+ header_params = {}
418
+ if request.glossary&.name
419
+ header_params["glossary.name"] = request.glossary.name
420
+ end
421
+
422
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
423
+ metadata[:"x-goog-request-params"] ||= request_params_header
424
+
425
+ options.apply_defaults timeout: @config.rpcs.update_glossary.timeout,
426
+ metadata: metadata,
427
+ retry_policy: @config.rpcs.update_glossary.retry_policy
428
+
429
+ options.apply_defaults timeout: @config.timeout,
430
+ metadata: @config.metadata,
431
+ retry_policy: @config.retry_policy
432
+
433
+ @business_glossary_service_stub.call_rpc :update_glossary, request, options: options do |response, operation|
434
+ response = ::Gapic::Operation.new response, @operations_client, options: options
435
+ yield response, operation if block_given?
436
+ throw :response, response
437
+ end
438
+ rescue ::GRPC::BadStatus => e
439
+ raise ::Google::Cloud::Error.from_error(e)
440
+ end
441
+
442
+ ##
443
+ # Deletes a Glossary resource. All the categories and terms within the
444
+ # Glossary must be deleted before the Glossary can be deleted.
445
+ #
446
+ # @overload delete_glossary(request, options = nil)
447
+ # Pass arguments to `delete_glossary` via a request object, either of type
448
+ # {::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest} or an equivalent Hash.
449
+ #
450
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Hash]
451
+ # A request object representing the call parameters. Required. To specify no
452
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
453
+ # @param options [::Gapic::CallOptions, ::Hash]
454
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
455
+ #
456
+ # @overload delete_glossary(name: nil, etag: nil)
457
+ # Pass arguments to `delete_glossary` via keyword arguments. Note that at
458
+ # least one keyword argument is required. To specify no parameters, or to keep all
459
+ # the default parameter values, pass an empty Hash as a request object (see above).
460
+ #
461
+ # @param name [::String]
462
+ # Required. The name of the Glossary to delete.
463
+ # Format:
464
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}
465
+ # @param etag [::String]
466
+ # Optional. The etag of the Glossary.
467
+ # If this is provided, it must match the server's etag.
468
+ # If the etag is provided and does not match the server-computed etag,
469
+ # the request must fail with a ABORTED error code.
470
+ #
471
+ # @yield [response, operation] Access the result along with the RPC operation
472
+ # @yieldparam response [::Gapic::Operation]
473
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
474
+ #
475
+ # @return [::Gapic::Operation]
476
+ #
477
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
478
+ #
479
+ # @example Basic example
480
+ # require "google/cloud/dataplex/v1"
481
+ #
482
+ # # Create a client object. The client can be reused for multiple calls.
483
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
484
+ #
485
+ # # Create a request. To set request fields, pass in keyword arguments.
486
+ # request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new
487
+ #
488
+ # # Call the delete_glossary method.
489
+ # result = client.delete_glossary request
490
+ #
491
+ # # The returned object is of type Gapic::Operation. You can use it to
492
+ # # check the status of an operation, cancel it, or wait for results.
493
+ # # Here is how to wait for a response.
494
+ # result.wait_until_done! timeout: 60
495
+ # if result.response?
496
+ # p result.response
497
+ # else
498
+ # puts "No response received."
499
+ # end
500
+ #
501
+ def delete_glossary request, options = nil
502
+ raise ::ArgumentError, "request must be provided" if request.nil?
503
+
504
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest
505
+
506
+ # Converts hash and nil to an options object
507
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
508
+
509
+ # Customize the options with defaults
510
+ metadata = @config.rpcs.delete_glossary.metadata.to_h
511
+
512
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
513
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
514
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
515
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
516
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
517
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
518
+
519
+ header_params = {}
520
+ if request.name
521
+ header_params["name"] = request.name
522
+ end
523
+
524
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
525
+ metadata[:"x-goog-request-params"] ||= request_params_header
526
+
527
+ options.apply_defaults timeout: @config.rpcs.delete_glossary.timeout,
528
+ metadata: metadata,
529
+ retry_policy: @config.rpcs.delete_glossary.retry_policy
530
+
531
+ options.apply_defaults timeout: @config.timeout,
532
+ metadata: @config.metadata,
533
+ retry_policy: @config.retry_policy
534
+
535
+ @business_glossary_service_stub.call_rpc :delete_glossary, request, options: options do |response, operation|
536
+ response = ::Gapic::Operation.new response, @operations_client, options: options
537
+ yield response, operation if block_given?
538
+ throw :response, response
539
+ end
540
+ rescue ::GRPC::BadStatus => e
541
+ raise ::Google::Cloud::Error.from_error(e)
542
+ end
543
+
544
+ ##
545
+ # Gets a Glossary resource.
546
+ #
547
+ # @overload get_glossary(request, options = nil)
548
+ # Pass arguments to `get_glossary` via a request object, either of type
549
+ # {::Google::Cloud::Dataplex::V1::GetGlossaryRequest} or an equivalent Hash.
550
+ #
551
+ # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Hash]
552
+ # A request object representing the call parameters. Required. To specify no
553
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
554
+ # @param options [::Gapic::CallOptions, ::Hash]
555
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
556
+ #
557
+ # @overload get_glossary(name: nil)
558
+ # Pass arguments to `get_glossary` via keyword arguments. Note that at
559
+ # least one keyword argument is required. To specify no parameters, or to keep all
560
+ # the default parameter values, pass an empty Hash as a request object (see above).
561
+ #
562
+ # @param name [::String]
563
+ # Required. The name of the Glossary to retrieve.
564
+ # Format:
565
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}
566
+ #
567
+ # @yield [response, operation] Access the result along with the RPC operation
568
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Glossary]
569
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
570
+ #
571
+ # @return [::Google::Cloud::Dataplex::V1::Glossary]
572
+ #
573
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
574
+ #
575
+ # @example Basic example
576
+ # require "google/cloud/dataplex/v1"
577
+ #
578
+ # # Create a client object. The client can be reused for multiple calls.
579
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
580
+ #
581
+ # # Create a request. To set request fields, pass in keyword arguments.
582
+ # request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new
583
+ #
584
+ # # Call the get_glossary method.
585
+ # result = client.get_glossary request
586
+ #
587
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Glossary.
588
+ # p result
589
+ #
590
+ def get_glossary request, options = nil
591
+ raise ::ArgumentError, "request must be provided" if request.nil?
592
+
593
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryRequest
594
+
595
+ # Converts hash and nil to an options object
596
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
597
+
598
+ # Customize the options with defaults
599
+ metadata = @config.rpcs.get_glossary.metadata.to_h
600
+
601
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
602
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
603
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
604
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
605
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
606
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
+
608
+ header_params = {}
609
+ if request.name
610
+ header_params["name"] = request.name
611
+ end
612
+
613
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
614
+ metadata[:"x-goog-request-params"] ||= request_params_header
615
+
616
+ options.apply_defaults timeout: @config.rpcs.get_glossary.timeout,
617
+ metadata: metadata,
618
+ retry_policy: @config.rpcs.get_glossary.retry_policy
619
+
620
+ options.apply_defaults timeout: @config.timeout,
621
+ metadata: @config.metadata,
622
+ retry_policy: @config.retry_policy
623
+
624
+ @business_glossary_service_stub.call_rpc :get_glossary, request, options: options do |response, operation|
625
+ yield response, operation if block_given?
626
+ end
627
+ rescue ::GRPC::BadStatus => e
628
+ raise ::Google::Cloud::Error.from_error(e)
629
+ end
630
+
631
+ ##
632
+ # Lists Glossary resources in a project and location.
633
+ #
634
+ # @overload list_glossaries(request, options = nil)
635
+ # Pass arguments to `list_glossaries` via a request object, either of type
636
+ # {::Google::Cloud::Dataplex::V1::ListGlossariesRequest} or an equivalent Hash.
637
+ #
638
+ # @param request [::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Hash]
639
+ # A request object representing the call parameters. Required. To specify no
640
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
641
+ # @param options [::Gapic::CallOptions, ::Hash]
642
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
643
+ #
644
+ # @overload list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
645
+ # Pass arguments to `list_glossaries` via keyword arguments. Note that at
646
+ # least one keyword argument is required. To specify no parameters, or to keep all
647
+ # the default parameter values, pass an empty Hash as a request object (see above).
648
+ #
649
+ # @param parent [::String]
650
+ # Required. The parent, which has this collection of Glossaries.
651
+ # Format: projects/\\{project_id_or_number}/locations/\\{location_id}
652
+ # where `location_id` refers to a Google Cloud region.
653
+ # @param page_size [::Integer]
654
+ # Optional. The maximum number of Glossaries to return. The service may
655
+ # return fewer than this value. If unspecified, at most 50 Glossaries will be
656
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
657
+ # 1000.
658
+ # @param page_token [::String]
659
+ # Optional. A page token, received from a previous `ListGlossaries` call.
660
+ # Provide this to retrieve the subsequent page.
661
+ # When paginating, all other parameters provided to `ListGlossaries` must
662
+ # match the call that provided the page token.
663
+ # @param filter [::String]
664
+ # Optional. Filter expression that filters Glossaries listed in the response.
665
+ # Filters on proto fields of Glossary are supported.
666
+ # Examples of using a filter are:
667
+ # - `display_name="my-glossary"`
668
+ # - `categoryCount=1`
669
+ # - `termCount=0`
670
+ # @param order_by [::String]
671
+ # Optional. Order by expression that orders Glossaries listed in the
672
+ # response. Order by fields are: `name` or `create_time` for the result. If
673
+ # not specified, the ordering is undefined.
674
+ #
675
+ # @yield [response, operation] Access the result along with the RPC operation
676
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>]
677
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
678
+ #
679
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>]
680
+ #
681
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
682
+ #
683
+ # @example Basic example
684
+ # require "google/cloud/dataplex/v1"
685
+ #
686
+ # # Create a client object. The client can be reused for multiple calls.
687
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
688
+ #
689
+ # # Create a request. To set request fields, pass in keyword arguments.
690
+ # request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new
691
+ #
692
+ # # Call the list_glossaries method.
693
+ # result = client.list_glossaries request
694
+ #
695
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
696
+ # # over elements, and API calls will be issued to fetch pages as needed.
697
+ # result.each do |item|
698
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary.
699
+ # p item
700
+ # end
701
+ #
702
+ def list_glossaries request, options = nil
703
+ raise ::ArgumentError, "request must be provided" if request.nil?
704
+
705
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossariesRequest
706
+
707
+ # Converts hash and nil to an options object
708
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
709
+
710
+ # Customize the options with defaults
711
+ metadata = @config.rpcs.list_glossaries.metadata.to_h
712
+
713
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
714
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
715
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
716
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
717
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
718
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
719
+
720
+ header_params = {}
721
+ if request.parent
722
+ header_params["parent"] = request.parent
723
+ end
724
+
725
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
726
+ metadata[:"x-goog-request-params"] ||= request_params_header
727
+
728
+ options.apply_defaults timeout: @config.rpcs.list_glossaries.timeout,
729
+ metadata: metadata,
730
+ retry_policy: @config.rpcs.list_glossaries.retry_policy
731
+
732
+ options.apply_defaults timeout: @config.timeout,
733
+ metadata: @config.metadata,
734
+ retry_policy: @config.retry_policy
735
+
736
+ @business_glossary_service_stub.call_rpc :list_glossaries, request, options: options do |response, operation|
737
+ response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossaries, request, response, operation, options
738
+ yield response, operation if block_given?
739
+ throw :response, response
740
+ end
741
+ rescue ::GRPC::BadStatus => e
742
+ raise ::Google::Cloud::Error.from_error(e)
743
+ end
744
+
745
+ ##
746
+ # Creates a new GlossaryCategory resource.
747
+ #
748
+ # @overload create_glossary_category(request, options = nil)
749
+ # Pass arguments to `create_glossary_category` via a request object, either of type
750
+ # {::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest} or an equivalent Hash.
751
+ #
752
+ # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Hash]
753
+ # A request object representing the call parameters. Required. To specify no
754
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
755
+ # @param options [::Gapic::CallOptions, ::Hash]
756
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
757
+ #
758
+ # @overload create_glossary_category(parent: nil, category_id: nil, category: nil)
759
+ # Pass arguments to `create_glossary_category` via keyword arguments. Note that at
760
+ # least one keyword argument is required. To specify no parameters, or to keep all
761
+ # the default parameter values, pass an empty Hash as a request object (see above).
762
+ #
763
+ # @param parent [::String]
764
+ # Required. The parent resource where this GlossaryCategory will be created.
765
+ # Format:
766
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}
767
+ # where `locationId` refers to a Google Cloud region.
768
+ # @param category_id [::String]
769
+ # Required. GlossaryCategory identifier.
770
+ # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash]
771
+ # Required. The GlossaryCategory to create.
772
+ #
773
+ # @yield [response, operation] Access the result along with the RPC operation
774
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory]
775
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
776
+ #
777
+ # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory]
778
+ #
779
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
780
+ #
781
+ # @example Basic example
782
+ # require "google/cloud/dataplex/v1"
783
+ #
784
+ # # Create a client object. The client can be reused for multiple calls.
785
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
786
+ #
787
+ # # Create a request. To set request fields, pass in keyword arguments.
788
+ # request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new
789
+ #
790
+ # # Call the create_glossary_category method.
791
+ # result = client.create_glossary_category request
792
+ #
793
+ # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory.
794
+ # p result
795
+ #
796
+ def create_glossary_category request, options = nil
797
+ raise ::ArgumentError, "request must be provided" if request.nil?
798
+
799
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest
800
+
801
+ # Converts hash and nil to an options object
802
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
803
+
804
+ # Customize the options with defaults
805
+ metadata = @config.rpcs.create_glossary_category.metadata.to_h
806
+
807
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
808
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
809
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
810
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
811
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
812
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
813
+
814
+ header_params = {}
815
+ if request.parent
816
+ header_params["parent"] = request.parent
817
+ end
818
+
819
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
820
+ metadata[:"x-goog-request-params"] ||= request_params_header
821
+
822
+ options.apply_defaults timeout: @config.rpcs.create_glossary_category.timeout,
823
+ metadata: metadata,
824
+ retry_policy: @config.rpcs.create_glossary_category.retry_policy
825
+
826
+ options.apply_defaults timeout: @config.timeout,
827
+ metadata: @config.metadata,
828
+ retry_policy: @config.retry_policy
829
+
830
+ @business_glossary_service_stub.call_rpc :create_glossary_category, request, options: options do |response, operation|
831
+ yield response, operation if block_given?
832
+ end
833
+ rescue ::GRPC::BadStatus => e
834
+ raise ::Google::Cloud::Error.from_error(e)
835
+ end
836
+
837
+ ##
838
+ # Updates a GlossaryCategory resource.
839
+ #
840
+ # @overload update_glossary_category(request, options = nil)
841
+ # Pass arguments to `update_glossary_category` via a request object, either of type
842
+ # {::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest} or an equivalent Hash.
843
+ #
844
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Hash]
845
+ # A request object representing the call parameters. Required. To specify no
846
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
847
+ # @param options [::Gapic::CallOptions, ::Hash]
848
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
849
+ #
850
+ # @overload update_glossary_category(category: nil, update_mask: nil)
851
+ # Pass arguments to `update_glossary_category` via keyword arguments. Note that at
852
+ # least one keyword argument is required. To specify no parameters, or to keep all
853
+ # the default parameter values, pass an empty Hash as a request object (see above).
854
+ #
855
+ # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash]
856
+ # Required. The GlossaryCategory to update.
857
+ # The GlossaryCategory's `name` field is used to identify the
858
+ # GlossaryCategory to update. Format:
859
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id}
860
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
861
+ # Required. The list of fields to update.
862
+ #
863
+ # @yield [response, operation] Access the result along with the RPC operation
864
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory]
865
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
866
+ #
867
+ # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory]
868
+ #
869
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
870
+ #
871
+ # @example Basic example
872
+ # require "google/cloud/dataplex/v1"
873
+ #
874
+ # # Create a client object. The client can be reused for multiple calls.
875
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
876
+ #
877
+ # # Create a request. To set request fields, pass in keyword arguments.
878
+ # request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new
879
+ #
880
+ # # Call the update_glossary_category method.
881
+ # result = client.update_glossary_category request
882
+ #
883
+ # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory.
884
+ # p result
885
+ #
886
+ def update_glossary_category request, options = nil
887
+ raise ::ArgumentError, "request must be provided" if request.nil?
888
+
889
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest
890
+
891
+ # Converts hash and nil to an options object
892
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
893
+
894
+ # Customize the options with defaults
895
+ metadata = @config.rpcs.update_glossary_category.metadata.to_h
896
+
897
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
898
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
899
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
900
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
901
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
902
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
903
+
904
+ header_params = {}
905
+ if request.category&.name
906
+ header_params["category.name"] = request.category.name
907
+ end
908
+
909
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
910
+ metadata[:"x-goog-request-params"] ||= request_params_header
911
+
912
+ options.apply_defaults timeout: @config.rpcs.update_glossary_category.timeout,
913
+ metadata: metadata,
914
+ retry_policy: @config.rpcs.update_glossary_category.retry_policy
915
+
916
+ options.apply_defaults timeout: @config.timeout,
917
+ metadata: @config.metadata,
918
+ retry_policy: @config.retry_policy
919
+
920
+ @business_glossary_service_stub.call_rpc :update_glossary_category, request, options: options do |response, operation|
921
+ yield response, operation if block_given?
922
+ end
923
+ rescue ::GRPC::BadStatus => e
924
+ raise ::Google::Cloud::Error.from_error(e)
925
+ end
926
+
927
+ ##
928
+ # Deletes a GlossaryCategory resource. All the GlossaryCategories and
929
+ # GlossaryTerms nested directly under the specified GlossaryCategory will be
930
+ # moved one level up to the parent in the hierarchy.
931
+ #
932
+ # @overload delete_glossary_category(request, options = nil)
933
+ # Pass arguments to `delete_glossary_category` via a request object, either of type
934
+ # {::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest} or an equivalent Hash.
935
+ #
936
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Hash]
937
+ # A request object representing the call parameters. Required. To specify no
938
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
939
+ # @param options [::Gapic::CallOptions, ::Hash]
940
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
941
+ #
942
+ # @overload delete_glossary_category(name: nil)
943
+ # Pass arguments to `delete_glossary_category` via keyword arguments. Note that at
944
+ # least one keyword argument is required. To specify no parameters, or to keep all
945
+ # the default parameter values, pass an empty Hash as a request object (see above).
946
+ #
947
+ # @param name [::String]
948
+ # Required. The name of the GlossaryCategory to delete.
949
+ # Format:
950
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id}
951
+ #
952
+ # @yield [response, operation] Access the result along with the RPC operation
953
+ # @yieldparam response [::Google::Protobuf::Empty]
954
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
955
+ #
956
+ # @return [::Google::Protobuf::Empty]
957
+ #
958
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
959
+ #
960
+ # @example Basic example
961
+ # require "google/cloud/dataplex/v1"
962
+ #
963
+ # # Create a client object. The client can be reused for multiple calls.
964
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
965
+ #
966
+ # # Create a request. To set request fields, pass in keyword arguments.
967
+ # request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new
968
+ #
969
+ # # Call the delete_glossary_category method.
970
+ # result = client.delete_glossary_category request
971
+ #
972
+ # # The returned object is of type Google::Protobuf::Empty.
973
+ # p result
974
+ #
975
+ def delete_glossary_category request, options = nil
976
+ raise ::ArgumentError, "request must be provided" if request.nil?
977
+
978
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest
979
+
980
+ # Converts hash and nil to an options object
981
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
982
+
983
+ # Customize the options with defaults
984
+ metadata = @config.rpcs.delete_glossary_category.metadata.to_h
985
+
986
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
987
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
988
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
989
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
990
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
991
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
992
+
993
+ header_params = {}
994
+ if request.name
995
+ header_params["name"] = request.name
996
+ end
997
+
998
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
999
+ metadata[:"x-goog-request-params"] ||= request_params_header
1000
+
1001
+ options.apply_defaults timeout: @config.rpcs.delete_glossary_category.timeout,
1002
+ metadata: metadata,
1003
+ retry_policy: @config.rpcs.delete_glossary_category.retry_policy
1004
+
1005
+ options.apply_defaults timeout: @config.timeout,
1006
+ metadata: @config.metadata,
1007
+ retry_policy: @config.retry_policy
1008
+
1009
+ @business_glossary_service_stub.call_rpc :delete_glossary_category, request, options: options do |response, operation|
1010
+ yield response, operation if block_given?
1011
+ end
1012
+ rescue ::GRPC::BadStatus => e
1013
+ raise ::Google::Cloud::Error.from_error(e)
1014
+ end
1015
+
1016
+ ##
1017
+ # Gets a GlossaryCategory resource.
1018
+ #
1019
+ # @overload get_glossary_category(request, options = nil)
1020
+ # Pass arguments to `get_glossary_category` via a request object, either of type
1021
+ # {::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest} or an equivalent Hash.
1022
+ #
1023
+ # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Hash]
1024
+ # A request object representing the call parameters. Required. To specify no
1025
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1026
+ # @param options [::Gapic::CallOptions, ::Hash]
1027
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1028
+ #
1029
+ # @overload get_glossary_category(name: nil)
1030
+ # Pass arguments to `get_glossary_category` via keyword arguments. Note that at
1031
+ # least one keyword argument is required. To specify no parameters, or to keep all
1032
+ # the default parameter values, pass an empty Hash as a request object (see above).
1033
+ #
1034
+ # @param name [::String]
1035
+ # Required. The name of the GlossaryCategory to retrieve.
1036
+ # Format:
1037
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id}
1038
+ #
1039
+ # @yield [response, operation] Access the result along with the RPC operation
1040
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory]
1041
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1042
+ #
1043
+ # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory]
1044
+ #
1045
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1046
+ #
1047
+ # @example Basic example
1048
+ # require "google/cloud/dataplex/v1"
1049
+ #
1050
+ # # Create a client object. The client can be reused for multiple calls.
1051
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
1052
+ #
1053
+ # # Create a request. To set request fields, pass in keyword arguments.
1054
+ # request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new
1055
+ #
1056
+ # # Call the get_glossary_category method.
1057
+ # result = client.get_glossary_category request
1058
+ #
1059
+ # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory.
1060
+ # p result
1061
+ #
1062
+ def get_glossary_category request, options = nil
1063
+ raise ::ArgumentError, "request must be provided" if request.nil?
1064
+
1065
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest
1066
+
1067
+ # Converts hash and nil to an options object
1068
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1069
+
1070
+ # Customize the options with defaults
1071
+ metadata = @config.rpcs.get_glossary_category.metadata.to_h
1072
+
1073
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1074
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1075
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1076
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1077
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1078
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1079
+
1080
+ header_params = {}
1081
+ if request.name
1082
+ header_params["name"] = request.name
1083
+ end
1084
+
1085
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1086
+ metadata[:"x-goog-request-params"] ||= request_params_header
1087
+
1088
+ options.apply_defaults timeout: @config.rpcs.get_glossary_category.timeout,
1089
+ metadata: metadata,
1090
+ retry_policy: @config.rpcs.get_glossary_category.retry_policy
1091
+
1092
+ options.apply_defaults timeout: @config.timeout,
1093
+ metadata: @config.metadata,
1094
+ retry_policy: @config.retry_policy
1095
+
1096
+ @business_glossary_service_stub.call_rpc :get_glossary_category, request, options: options do |response, operation|
1097
+ yield response, operation if block_given?
1098
+ end
1099
+ rescue ::GRPC::BadStatus => e
1100
+ raise ::Google::Cloud::Error.from_error(e)
1101
+ end
1102
+
1103
+ ##
1104
+ # Lists GlossaryCategory resources in a Glossary.
1105
+ #
1106
+ # @overload list_glossary_categories(request, options = nil)
1107
+ # Pass arguments to `list_glossary_categories` via a request object, either of type
1108
+ # {::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest} or an equivalent Hash.
1109
+ #
1110
+ # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Hash]
1111
+ # A request object representing the call parameters. Required. To specify no
1112
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1113
+ # @param options [::Gapic::CallOptions, ::Hash]
1114
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1115
+ #
1116
+ # @overload list_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1117
+ # Pass arguments to `list_glossary_categories` via keyword arguments. Note that at
1118
+ # least one keyword argument is required. To specify no parameters, or to keep all
1119
+ # the default parameter values, pass an empty Hash as a request object (see above).
1120
+ #
1121
+ # @param parent [::String]
1122
+ # Required. The parent, which has this collection of GlossaryCategories.
1123
+ # Format:
1124
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}
1125
+ # Location is the Google Cloud region.
1126
+ # @param page_size [::Integer]
1127
+ # Optional. The maximum number of GlossaryCategories to return. The service
1128
+ # may return fewer than this value. If unspecified, at most 50
1129
+ # GlossaryCategories will be returned. The maximum value is 1000; values
1130
+ # above 1000 will be coerced to 1000.
1131
+ # @param page_token [::String]
1132
+ # Optional. A page token, received from a previous `ListGlossaryCategories`
1133
+ # call. Provide this to retrieve the subsequent page. When paginating, all
1134
+ # other parameters provided to `ListGlossaryCategories` must match the call
1135
+ # that provided the page token.
1136
+ # @param filter [::String]
1137
+ # Optional. Filter expression that filters GlossaryCategories listed in the
1138
+ # response. Filters are supported on the following fields:
1139
+ # - immediate_parent
1140
+ #
1141
+ # Examples of using a filter are:
1142
+ # -
1143
+ # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
1144
+ # -
1145
+ # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
1146
+ #
1147
+ # This will only return the GlossaryCategories that are directly nested
1148
+ # under the specified parent.
1149
+ # @param order_by [::String]
1150
+ # Optional. Order by expression that orders GlossaryCategories listed in the
1151
+ # response. Order by fields are: `name` or `create_time` for the result. If
1152
+ # not specified, the ordering is undefined.
1153
+ #
1154
+ # @yield [response, operation] Access the result along with the RPC operation
1155
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>]
1156
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1157
+ #
1158
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>]
1159
+ #
1160
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1161
+ #
1162
+ # @example Basic example
1163
+ # require "google/cloud/dataplex/v1"
1164
+ #
1165
+ # # Create a client object. The client can be reused for multiple calls.
1166
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
1167
+ #
1168
+ # # Create a request. To set request fields, pass in keyword arguments.
1169
+ # request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new
1170
+ #
1171
+ # # Call the list_glossary_categories method.
1172
+ # result = client.list_glossary_categories request
1173
+ #
1174
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1175
+ # # over elements, and API calls will be issued to fetch pages as needed.
1176
+ # result.each do |item|
1177
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory.
1178
+ # p item
1179
+ # end
1180
+ #
1181
+ def list_glossary_categories request, options = nil
1182
+ raise ::ArgumentError, "request must be provided" if request.nil?
1183
+
1184
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest
1185
+
1186
+ # Converts hash and nil to an options object
1187
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1188
+
1189
+ # Customize the options with defaults
1190
+ metadata = @config.rpcs.list_glossary_categories.metadata.to_h
1191
+
1192
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1193
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1194
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1195
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1196
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1197
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1198
+
1199
+ header_params = {}
1200
+ if request.parent
1201
+ header_params["parent"] = request.parent
1202
+ end
1203
+
1204
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1205
+ metadata[:"x-goog-request-params"] ||= request_params_header
1206
+
1207
+ options.apply_defaults timeout: @config.rpcs.list_glossary_categories.timeout,
1208
+ metadata: metadata,
1209
+ retry_policy: @config.rpcs.list_glossary_categories.retry_policy
1210
+
1211
+ options.apply_defaults timeout: @config.timeout,
1212
+ metadata: @config.metadata,
1213
+ retry_policy: @config.retry_policy
1214
+
1215
+ @business_glossary_service_stub.call_rpc :list_glossary_categories, request, options: options do |response, operation|
1216
+ response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_categories, request, response, operation, options
1217
+ yield response, operation if block_given?
1218
+ throw :response, response
1219
+ end
1220
+ rescue ::GRPC::BadStatus => e
1221
+ raise ::Google::Cloud::Error.from_error(e)
1222
+ end
1223
+
1224
+ ##
1225
+ # Creates a new GlossaryTerm resource.
1226
+ #
1227
+ # @overload create_glossary_term(request, options = nil)
1228
+ # Pass arguments to `create_glossary_term` via a request object, either of type
1229
+ # {::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest} or an equivalent Hash.
1230
+ #
1231
+ # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Hash]
1232
+ # A request object representing the call parameters. Required. To specify no
1233
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1234
+ # @param options [::Gapic::CallOptions, ::Hash]
1235
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1236
+ #
1237
+ # @overload create_glossary_term(parent: nil, term_id: nil, term: nil)
1238
+ # Pass arguments to `create_glossary_term` via keyword arguments. Note that at
1239
+ # least one keyword argument is required. To specify no parameters, or to keep all
1240
+ # the default parameter values, pass an empty Hash as a request object (see above).
1241
+ #
1242
+ # @param parent [::String]
1243
+ # Required. The parent resource where the GlossaryTerm will be created.
1244
+ # Format:
1245
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}
1246
+ # where `location_id` refers to a Google Cloud region.
1247
+ # @param term_id [::String]
1248
+ # Required. GlossaryTerm identifier.
1249
+ # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash]
1250
+ # Required. The GlossaryTerm to create.
1251
+ #
1252
+ # @yield [response, operation] Access the result along with the RPC operation
1253
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm]
1254
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1255
+ #
1256
+ # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm]
1257
+ #
1258
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1259
+ #
1260
+ # @example Basic example
1261
+ # require "google/cloud/dataplex/v1"
1262
+ #
1263
+ # # Create a client object. The client can be reused for multiple calls.
1264
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
1265
+ #
1266
+ # # Create a request. To set request fields, pass in keyword arguments.
1267
+ # request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new
1268
+ #
1269
+ # # Call the create_glossary_term method.
1270
+ # result = client.create_glossary_term request
1271
+ #
1272
+ # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm.
1273
+ # p result
1274
+ #
1275
+ def create_glossary_term request, options = nil
1276
+ raise ::ArgumentError, "request must be provided" if request.nil?
1277
+
1278
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest
1279
+
1280
+ # Converts hash and nil to an options object
1281
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1282
+
1283
+ # Customize the options with defaults
1284
+ metadata = @config.rpcs.create_glossary_term.metadata.to_h
1285
+
1286
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1287
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1288
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1289
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1290
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1291
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1292
+
1293
+ header_params = {}
1294
+ if request.parent
1295
+ header_params["parent"] = request.parent
1296
+ end
1297
+
1298
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1299
+ metadata[:"x-goog-request-params"] ||= request_params_header
1300
+
1301
+ options.apply_defaults timeout: @config.rpcs.create_glossary_term.timeout,
1302
+ metadata: metadata,
1303
+ retry_policy: @config.rpcs.create_glossary_term.retry_policy
1304
+
1305
+ options.apply_defaults timeout: @config.timeout,
1306
+ metadata: @config.metadata,
1307
+ retry_policy: @config.retry_policy
1308
+
1309
+ @business_glossary_service_stub.call_rpc :create_glossary_term, request, options: options do |response, operation|
1310
+ yield response, operation if block_given?
1311
+ end
1312
+ rescue ::GRPC::BadStatus => e
1313
+ raise ::Google::Cloud::Error.from_error(e)
1314
+ end
1315
+
1316
+ ##
1317
+ # Updates a GlossaryTerm resource.
1318
+ #
1319
+ # @overload update_glossary_term(request, options = nil)
1320
+ # Pass arguments to `update_glossary_term` via a request object, either of type
1321
+ # {::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest} or an equivalent Hash.
1322
+ #
1323
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Hash]
1324
+ # A request object representing the call parameters. Required. To specify no
1325
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1326
+ # @param options [::Gapic::CallOptions, ::Hash]
1327
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1328
+ #
1329
+ # @overload update_glossary_term(term: nil, update_mask: nil)
1330
+ # Pass arguments to `update_glossary_term` via keyword arguments. Note that at
1331
+ # least one keyword argument is required. To specify no parameters, or to keep all
1332
+ # the default parameter values, pass an empty Hash as a request object (see above).
1333
+ #
1334
+ # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash]
1335
+ # Required. The GlossaryTerm to update.
1336
+ # The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
1337
+ # update. Format:
1338
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id}
1339
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1340
+ # Required. The list of fields to update.
1341
+ #
1342
+ # @yield [response, operation] Access the result along with the RPC operation
1343
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm]
1344
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1345
+ #
1346
+ # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm]
1347
+ #
1348
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1349
+ #
1350
+ # @example Basic example
1351
+ # require "google/cloud/dataplex/v1"
1352
+ #
1353
+ # # Create a client object. The client can be reused for multiple calls.
1354
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
1355
+ #
1356
+ # # Create a request. To set request fields, pass in keyword arguments.
1357
+ # request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new
1358
+ #
1359
+ # # Call the update_glossary_term method.
1360
+ # result = client.update_glossary_term request
1361
+ #
1362
+ # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm.
1363
+ # p result
1364
+ #
1365
+ def update_glossary_term request, options = nil
1366
+ raise ::ArgumentError, "request must be provided" if request.nil?
1367
+
1368
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest
1369
+
1370
+ # Converts hash and nil to an options object
1371
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1372
+
1373
+ # Customize the options with defaults
1374
+ metadata = @config.rpcs.update_glossary_term.metadata.to_h
1375
+
1376
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1377
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1378
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1379
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1380
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1381
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1382
+
1383
+ header_params = {}
1384
+ if request.term&.name
1385
+ header_params["term.name"] = request.term.name
1386
+ end
1387
+
1388
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1389
+ metadata[:"x-goog-request-params"] ||= request_params_header
1390
+
1391
+ options.apply_defaults timeout: @config.rpcs.update_glossary_term.timeout,
1392
+ metadata: metadata,
1393
+ retry_policy: @config.rpcs.update_glossary_term.retry_policy
1394
+
1395
+ options.apply_defaults timeout: @config.timeout,
1396
+ metadata: @config.metadata,
1397
+ retry_policy: @config.retry_policy
1398
+
1399
+ @business_glossary_service_stub.call_rpc :update_glossary_term, request, options: options do |response, operation|
1400
+ yield response, operation if block_given?
1401
+ end
1402
+ rescue ::GRPC::BadStatus => e
1403
+ raise ::Google::Cloud::Error.from_error(e)
1404
+ end
1405
+
1406
+ ##
1407
+ # Deletes a GlossaryTerm resource.
1408
+ #
1409
+ # @overload delete_glossary_term(request, options = nil)
1410
+ # Pass arguments to `delete_glossary_term` via a request object, either of type
1411
+ # {::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest} or an equivalent Hash.
1412
+ #
1413
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Hash]
1414
+ # A request object representing the call parameters. Required. To specify no
1415
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1416
+ # @param options [::Gapic::CallOptions, ::Hash]
1417
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1418
+ #
1419
+ # @overload delete_glossary_term(name: nil)
1420
+ # Pass arguments to `delete_glossary_term` via keyword arguments. Note that at
1421
+ # least one keyword argument is required. To specify no parameters, or to keep all
1422
+ # the default parameter values, pass an empty Hash as a request object (see above).
1423
+ #
1424
+ # @param name [::String]
1425
+ # Required. The name of the GlossaryTerm to delete.
1426
+ # Format:
1427
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id}
1428
+ #
1429
+ # @yield [response, operation] Access the result along with the RPC operation
1430
+ # @yieldparam response [::Google::Protobuf::Empty]
1431
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1432
+ #
1433
+ # @return [::Google::Protobuf::Empty]
1434
+ #
1435
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1436
+ #
1437
+ # @example Basic example
1438
+ # require "google/cloud/dataplex/v1"
1439
+ #
1440
+ # # Create a client object. The client can be reused for multiple calls.
1441
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
1442
+ #
1443
+ # # Create a request. To set request fields, pass in keyword arguments.
1444
+ # request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new
1445
+ #
1446
+ # # Call the delete_glossary_term method.
1447
+ # result = client.delete_glossary_term request
1448
+ #
1449
+ # # The returned object is of type Google::Protobuf::Empty.
1450
+ # p result
1451
+ #
1452
+ def delete_glossary_term request, options = nil
1453
+ raise ::ArgumentError, "request must be provided" if request.nil?
1454
+
1455
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest
1456
+
1457
+ # Converts hash and nil to an options object
1458
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1459
+
1460
+ # Customize the options with defaults
1461
+ metadata = @config.rpcs.delete_glossary_term.metadata.to_h
1462
+
1463
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1464
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1465
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1466
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1467
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1468
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1469
+
1470
+ header_params = {}
1471
+ if request.name
1472
+ header_params["name"] = request.name
1473
+ end
1474
+
1475
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1476
+ metadata[:"x-goog-request-params"] ||= request_params_header
1477
+
1478
+ options.apply_defaults timeout: @config.rpcs.delete_glossary_term.timeout,
1479
+ metadata: metadata,
1480
+ retry_policy: @config.rpcs.delete_glossary_term.retry_policy
1481
+
1482
+ options.apply_defaults timeout: @config.timeout,
1483
+ metadata: @config.metadata,
1484
+ retry_policy: @config.retry_policy
1485
+
1486
+ @business_glossary_service_stub.call_rpc :delete_glossary_term, request, options: options do |response, operation|
1487
+ yield response, operation if block_given?
1488
+ end
1489
+ rescue ::GRPC::BadStatus => e
1490
+ raise ::Google::Cloud::Error.from_error(e)
1491
+ end
1492
+
1493
+ ##
1494
+ # Gets a GlossaryTerm resource.
1495
+ #
1496
+ # @overload get_glossary_term(request, options = nil)
1497
+ # Pass arguments to `get_glossary_term` via a request object, either of type
1498
+ # {::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest} or an equivalent Hash.
1499
+ #
1500
+ # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Hash]
1501
+ # A request object representing the call parameters. Required. To specify no
1502
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1503
+ # @param options [::Gapic::CallOptions, ::Hash]
1504
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1505
+ #
1506
+ # @overload get_glossary_term(name: nil)
1507
+ # Pass arguments to `get_glossary_term` via keyword arguments. Note that at
1508
+ # least one keyword argument is required. To specify no parameters, or to keep all
1509
+ # the default parameter values, pass an empty Hash as a request object (see above).
1510
+ #
1511
+ # @param name [::String]
1512
+ # Required. The name of the GlossaryTerm to retrieve.
1513
+ # Format:
1514
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id}
1515
+ #
1516
+ # @yield [response, operation] Access the result along with the RPC operation
1517
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm]
1518
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1519
+ #
1520
+ # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm]
1521
+ #
1522
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1523
+ #
1524
+ # @example Basic example
1525
+ # require "google/cloud/dataplex/v1"
1526
+ #
1527
+ # # Create a client object. The client can be reused for multiple calls.
1528
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
1529
+ #
1530
+ # # Create a request. To set request fields, pass in keyword arguments.
1531
+ # request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new
1532
+ #
1533
+ # # Call the get_glossary_term method.
1534
+ # result = client.get_glossary_term request
1535
+ #
1536
+ # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm.
1537
+ # p result
1538
+ #
1539
+ def get_glossary_term request, options = nil
1540
+ raise ::ArgumentError, "request must be provided" if request.nil?
1541
+
1542
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest
1543
+
1544
+ # Converts hash and nil to an options object
1545
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1546
+
1547
+ # Customize the options with defaults
1548
+ metadata = @config.rpcs.get_glossary_term.metadata.to_h
1549
+
1550
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1551
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1552
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1553
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1554
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1555
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1556
+
1557
+ header_params = {}
1558
+ if request.name
1559
+ header_params["name"] = request.name
1560
+ end
1561
+
1562
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1563
+ metadata[:"x-goog-request-params"] ||= request_params_header
1564
+
1565
+ options.apply_defaults timeout: @config.rpcs.get_glossary_term.timeout,
1566
+ metadata: metadata,
1567
+ retry_policy: @config.rpcs.get_glossary_term.retry_policy
1568
+
1569
+ options.apply_defaults timeout: @config.timeout,
1570
+ metadata: @config.metadata,
1571
+ retry_policy: @config.retry_policy
1572
+
1573
+ @business_glossary_service_stub.call_rpc :get_glossary_term, request, options: options do |response, operation|
1574
+ yield response, operation if block_given?
1575
+ end
1576
+ rescue ::GRPC::BadStatus => e
1577
+ raise ::Google::Cloud::Error.from_error(e)
1578
+ end
1579
+
1580
+ ##
1581
+ # Lists GlossaryTerm resources in a Glossary.
1582
+ #
1583
+ # @overload list_glossary_terms(request, options = nil)
1584
+ # Pass arguments to `list_glossary_terms` via a request object, either of type
1585
+ # {::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest} or an equivalent Hash.
1586
+ #
1587
+ # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Hash]
1588
+ # A request object representing the call parameters. Required. To specify no
1589
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1590
+ # @param options [::Gapic::CallOptions, ::Hash]
1591
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1592
+ #
1593
+ # @overload list_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1594
+ # Pass arguments to `list_glossary_terms` via keyword arguments. Note that at
1595
+ # least one keyword argument is required. To specify no parameters, or to keep all
1596
+ # the default parameter values, pass an empty Hash as a request object (see above).
1597
+ #
1598
+ # @param parent [::String]
1599
+ # Required. The parent, which has this collection of GlossaryTerms.
1600
+ # Format:
1601
+ # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}
1602
+ # where `location_id` refers to a Google Cloud region.
1603
+ # @param page_size [::Integer]
1604
+ # Optional. The maximum number of GlossaryTerms to return. The service may
1605
+ # return fewer than this value. If unspecified, at most 50 GlossaryTerms will
1606
+ # be returned. The maximum value is 1000; values above 1000 will be coerced
1607
+ # to 1000.
1608
+ # @param page_token [::String]
1609
+ # Optional. A page token, received from a previous `ListGlossaryTerms` call.
1610
+ # Provide this to retrieve the subsequent page.
1611
+ # When paginating, all other parameters provided to `ListGlossaryTerms` must
1612
+ # match the call that provided the page token.
1613
+ # @param filter [::String]
1614
+ # Optional. Filter expression that filters GlossaryTerms listed in the
1615
+ # response. Filters are supported on the following fields:
1616
+ # - immediate_parent
1617
+ #
1618
+ # Examples of using a filter are:
1619
+ # -
1620
+ # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
1621
+ # -
1622
+ # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
1623
+ #
1624
+ # This will only return the GlossaryTerms that are directly nested under the
1625
+ # specified parent.
1626
+ # @param order_by [::String]
1627
+ # Optional. Order by expression that orders GlossaryTerms listed in the
1628
+ # response. Order by fields are: `name` or `create_time` for the result. If
1629
+ # not specified, the ordering is undefined.
1630
+ #
1631
+ # @yield [response, operation] Access the result along with the RPC operation
1632
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>]
1633
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1634
+ #
1635
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>]
1636
+ #
1637
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1638
+ #
1639
+ # @example Basic example
1640
+ # require "google/cloud/dataplex/v1"
1641
+ #
1642
+ # # Create a client object. The client can be reused for multiple calls.
1643
+ # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new
1644
+ #
1645
+ # # Create a request. To set request fields, pass in keyword arguments.
1646
+ # request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new
1647
+ #
1648
+ # # Call the list_glossary_terms method.
1649
+ # result = client.list_glossary_terms request
1650
+ #
1651
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1652
+ # # over elements, and API calls will be issued to fetch pages as needed.
1653
+ # result.each do |item|
1654
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm.
1655
+ # p item
1656
+ # end
1657
+ #
1658
+ def list_glossary_terms request, options = nil
1659
+ raise ::ArgumentError, "request must be provided" if request.nil?
1660
+
1661
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest
1662
+
1663
+ # Converts hash and nil to an options object
1664
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1665
+
1666
+ # Customize the options with defaults
1667
+ metadata = @config.rpcs.list_glossary_terms.metadata.to_h
1668
+
1669
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1670
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1671
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1672
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1673
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1674
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1675
+
1676
+ header_params = {}
1677
+ if request.parent
1678
+ header_params["parent"] = request.parent
1679
+ end
1680
+
1681
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1682
+ metadata[:"x-goog-request-params"] ||= request_params_header
1683
+
1684
+ options.apply_defaults timeout: @config.rpcs.list_glossary_terms.timeout,
1685
+ metadata: metadata,
1686
+ retry_policy: @config.rpcs.list_glossary_terms.retry_policy
1687
+
1688
+ options.apply_defaults timeout: @config.timeout,
1689
+ metadata: @config.metadata,
1690
+ retry_policy: @config.retry_policy
1691
+
1692
+ @business_glossary_service_stub.call_rpc :list_glossary_terms, request, options: options do |response, operation|
1693
+ response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_terms, request, response, operation, options
1694
+ yield response, operation if block_given?
1695
+ throw :response, response
1696
+ end
1697
+ rescue ::GRPC::BadStatus => e
1698
+ raise ::Google::Cloud::Error.from_error(e)
1699
+ end
1700
+
1701
+ ##
1702
+ # Configuration class for the BusinessGlossaryService API.
1703
+ #
1704
+ # This class represents the configuration for BusinessGlossaryService,
1705
+ # providing control over timeouts, retry behavior, logging, transport
1706
+ # parameters, and other low-level controls. Certain parameters can also be
1707
+ # applied individually to specific RPCs. See
1708
+ # {::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client::Configuration::Rpcs}
1709
+ # for a list of RPCs that can be configured independently.
1710
+ #
1711
+ # Configuration can be applied globally to all clients, or to a single client
1712
+ # on construction.
1713
+ #
1714
+ # @example
1715
+ #
1716
+ # # Modify the global config, setting the timeout for
1717
+ # # create_glossary to 20 seconds,
1718
+ # # and all remaining timeouts to 10 seconds.
1719
+ # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.configure do |config|
1720
+ # config.timeout = 10.0
1721
+ # config.rpcs.create_glossary.timeout = 20.0
1722
+ # end
1723
+ #
1724
+ # # Apply the above configuration only to a new client.
1725
+ # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config|
1726
+ # config.timeout = 10.0
1727
+ # config.rpcs.create_glossary.timeout = 20.0
1728
+ # end
1729
+ #
1730
+ # @!attribute [rw] endpoint
1731
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1732
+ # nil, indicating to use the default endpoint in the current universe domain.
1733
+ # @return [::String,nil]
1734
+ # @!attribute [rw] credentials
1735
+ # Credentials to send with calls. You may provide any of the following types:
1736
+ # * (`String`) The path to a service account key file in JSON format
1737
+ # * (`Hash`) A service account key as a Hash
1738
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1739
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1740
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1741
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1742
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1743
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1744
+ # * (`nil`) indicating no credentials
1745
+ #
1746
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1747
+ # external source for authentication to Google Cloud, you must validate it before
1748
+ # providing it to a Google API client library. Providing an unvalidated credential
1749
+ # configuration to Google APIs can compromise the security of your systems and data.
1750
+ # For more information, refer to [Validate credential configurations from external
1751
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1752
+ # @return [::Object]
1753
+ # @!attribute [rw] scope
1754
+ # The OAuth scopes
1755
+ # @return [::Array<::String>]
1756
+ # @!attribute [rw] lib_name
1757
+ # The library name as recorded in instrumentation and logging
1758
+ # @return [::String]
1759
+ # @!attribute [rw] lib_version
1760
+ # The library version as recorded in instrumentation and logging
1761
+ # @return [::String]
1762
+ # @!attribute [rw] channel_args
1763
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1764
+ # `GRPC::Core::Channel` object is provided as the credential.
1765
+ # @return [::Hash]
1766
+ # @!attribute [rw] interceptors
1767
+ # An array of interceptors that are run before calls are executed.
1768
+ # @return [::Array<::GRPC::ClientInterceptor>]
1769
+ # @!attribute [rw] timeout
1770
+ # The call timeout in seconds.
1771
+ # @return [::Numeric]
1772
+ # @!attribute [rw] metadata
1773
+ # Additional gRPC headers to be sent with the call.
1774
+ # @return [::Hash{::Symbol=>::String}]
1775
+ # @!attribute [rw] retry_policy
1776
+ # The retry policy. The value is a hash with the following keys:
1777
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1778
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1779
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1780
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1781
+ # trigger a retry.
1782
+ # @return [::Hash]
1783
+ # @!attribute [rw] quota_project
1784
+ # A separate project against which to charge quota.
1785
+ # @return [::String]
1786
+ # @!attribute [rw] universe_domain
1787
+ # The universe domain within which to make requests. This determines the
1788
+ # default endpoint URL. The default value of nil uses the environment
1789
+ # universe (usually the default "googleapis.com" universe).
1790
+ # @return [::String,nil]
1791
+ # @!attribute [rw] logger
1792
+ # A custom logger to use for request/response debug logging, or the value
1793
+ # `:default` (the default) to construct a default logger, or `nil` to
1794
+ # explicitly disable logging.
1795
+ # @return [::Logger,:default,nil]
1796
+ #
1797
+ class Configuration
1798
+ extend ::Gapic::Config
1799
+
1800
+ # @private
1801
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1802
+ DEFAULT_ENDPOINT = "dataplex.googleapis.com"
1803
+
1804
+ config_attr :endpoint, nil, ::String, nil
1805
+ config_attr :credentials, nil do |value|
1806
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1807
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
1808
+ allowed.any? { |klass| klass === value }
1809
+ end
1810
+ config_attr :scope, nil, ::String, ::Array, nil
1811
+ config_attr :lib_name, nil, ::String, nil
1812
+ config_attr :lib_version, nil, ::String, nil
1813
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1814
+ config_attr :interceptors, nil, ::Array, nil
1815
+ config_attr :timeout, nil, ::Numeric, nil
1816
+ config_attr :metadata, nil, ::Hash, nil
1817
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1818
+ config_attr :quota_project, nil, ::String, nil
1819
+ config_attr :universe_domain, nil, ::String, nil
1820
+ config_attr :logger, :default, ::Logger, nil, :default
1821
+
1822
+ # @private
1823
+ def initialize parent_config = nil
1824
+ @parent_config = parent_config unless parent_config.nil?
1825
+
1826
+ yield self if block_given?
1827
+ end
1828
+
1829
+ ##
1830
+ # Configurations for individual RPCs
1831
+ # @return [Rpcs]
1832
+ #
1833
+ def rpcs
1834
+ @rpcs ||= begin
1835
+ parent_rpcs = nil
1836
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1837
+ Rpcs.new parent_rpcs
1838
+ end
1839
+ end
1840
+
1841
+ ##
1842
+ # Configuration for the channel pool
1843
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1844
+ #
1845
+ def channel_pool
1846
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1847
+ end
1848
+
1849
+ ##
1850
+ # Configuration RPC class for the BusinessGlossaryService API.
1851
+ #
1852
+ # Includes fields providing the configuration for each RPC in this service.
1853
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1854
+ # the following configuration fields:
1855
+ #
1856
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1857
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1858
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1859
+ # include the following keys:
1860
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1861
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1862
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1863
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1864
+ # trigger a retry.
1865
+ #
1866
+ class Rpcs
1867
+ ##
1868
+ # RPC-specific configuration for `create_glossary`
1869
+ # @return [::Gapic::Config::Method]
1870
+ #
1871
+ attr_reader :create_glossary
1872
+ ##
1873
+ # RPC-specific configuration for `update_glossary`
1874
+ # @return [::Gapic::Config::Method]
1875
+ #
1876
+ attr_reader :update_glossary
1877
+ ##
1878
+ # RPC-specific configuration for `delete_glossary`
1879
+ # @return [::Gapic::Config::Method]
1880
+ #
1881
+ attr_reader :delete_glossary
1882
+ ##
1883
+ # RPC-specific configuration for `get_glossary`
1884
+ # @return [::Gapic::Config::Method]
1885
+ #
1886
+ attr_reader :get_glossary
1887
+ ##
1888
+ # RPC-specific configuration for `list_glossaries`
1889
+ # @return [::Gapic::Config::Method]
1890
+ #
1891
+ attr_reader :list_glossaries
1892
+ ##
1893
+ # RPC-specific configuration for `create_glossary_category`
1894
+ # @return [::Gapic::Config::Method]
1895
+ #
1896
+ attr_reader :create_glossary_category
1897
+ ##
1898
+ # RPC-specific configuration for `update_glossary_category`
1899
+ # @return [::Gapic::Config::Method]
1900
+ #
1901
+ attr_reader :update_glossary_category
1902
+ ##
1903
+ # RPC-specific configuration for `delete_glossary_category`
1904
+ # @return [::Gapic::Config::Method]
1905
+ #
1906
+ attr_reader :delete_glossary_category
1907
+ ##
1908
+ # RPC-specific configuration for `get_glossary_category`
1909
+ # @return [::Gapic::Config::Method]
1910
+ #
1911
+ attr_reader :get_glossary_category
1912
+ ##
1913
+ # RPC-specific configuration for `list_glossary_categories`
1914
+ # @return [::Gapic::Config::Method]
1915
+ #
1916
+ attr_reader :list_glossary_categories
1917
+ ##
1918
+ # RPC-specific configuration for `create_glossary_term`
1919
+ # @return [::Gapic::Config::Method]
1920
+ #
1921
+ attr_reader :create_glossary_term
1922
+ ##
1923
+ # RPC-specific configuration for `update_glossary_term`
1924
+ # @return [::Gapic::Config::Method]
1925
+ #
1926
+ attr_reader :update_glossary_term
1927
+ ##
1928
+ # RPC-specific configuration for `delete_glossary_term`
1929
+ # @return [::Gapic::Config::Method]
1930
+ #
1931
+ attr_reader :delete_glossary_term
1932
+ ##
1933
+ # RPC-specific configuration for `get_glossary_term`
1934
+ # @return [::Gapic::Config::Method]
1935
+ #
1936
+ attr_reader :get_glossary_term
1937
+ ##
1938
+ # RPC-specific configuration for `list_glossary_terms`
1939
+ # @return [::Gapic::Config::Method]
1940
+ #
1941
+ attr_reader :list_glossary_terms
1942
+
1943
+ # @private
1944
+ def initialize parent_rpcs = nil
1945
+ create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary
1946
+ @create_glossary = ::Gapic::Config::Method.new create_glossary_config
1947
+ update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary
1948
+ @update_glossary = ::Gapic::Config::Method.new update_glossary_config
1949
+ delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary
1950
+ @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config
1951
+ get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary
1952
+ @get_glossary = ::Gapic::Config::Method.new get_glossary_config
1953
+ list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries
1954
+ @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config
1955
+ create_glossary_category_config = parent_rpcs.create_glossary_category if parent_rpcs.respond_to? :create_glossary_category
1956
+ @create_glossary_category = ::Gapic::Config::Method.new create_glossary_category_config
1957
+ update_glossary_category_config = parent_rpcs.update_glossary_category if parent_rpcs.respond_to? :update_glossary_category
1958
+ @update_glossary_category = ::Gapic::Config::Method.new update_glossary_category_config
1959
+ delete_glossary_category_config = parent_rpcs.delete_glossary_category if parent_rpcs.respond_to? :delete_glossary_category
1960
+ @delete_glossary_category = ::Gapic::Config::Method.new delete_glossary_category_config
1961
+ get_glossary_category_config = parent_rpcs.get_glossary_category if parent_rpcs.respond_to? :get_glossary_category
1962
+ @get_glossary_category = ::Gapic::Config::Method.new get_glossary_category_config
1963
+ list_glossary_categories_config = parent_rpcs.list_glossary_categories if parent_rpcs.respond_to? :list_glossary_categories
1964
+ @list_glossary_categories = ::Gapic::Config::Method.new list_glossary_categories_config
1965
+ create_glossary_term_config = parent_rpcs.create_glossary_term if parent_rpcs.respond_to? :create_glossary_term
1966
+ @create_glossary_term = ::Gapic::Config::Method.new create_glossary_term_config
1967
+ update_glossary_term_config = parent_rpcs.update_glossary_term if parent_rpcs.respond_to? :update_glossary_term
1968
+ @update_glossary_term = ::Gapic::Config::Method.new update_glossary_term_config
1969
+ delete_glossary_term_config = parent_rpcs.delete_glossary_term if parent_rpcs.respond_to? :delete_glossary_term
1970
+ @delete_glossary_term = ::Gapic::Config::Method.new delete_glossary_term_config
1971
+ get_glossary_term_config = parent_rpcs.get_glossary_term if parent_rpcs.respond_to? :get_glossary_term
1972
+ @get_glossary_term = ::Gapic::Config::Method.new get_glossary_term_config
1973
+ list_glossary_terms_config = parent_rpcs.list_glossary_terms if parent_rpcs.respond_to? :list_glossary_terms
1974
+ @list_glossary_terms = ::Gapic::Config::Method.new list_glossary_terms_config
1975
+
1976
+ yield self if block_given?
1977
+ end
1978
+ end
1979
+ end
1980
+ end
1981
+ end
1982
+ end
1983
+ end
1984
+ end
1985
+ end