google-cloud-connectors-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +141 -8
  5. data/lib/google/cloud/connectors/v1/authconfig_pb.rb +52 -0
  6. data/lib/google/cloud/connectors/v1/bindings_override.rb +159 -0
  7. data/lib/google/cloud/connectors/v1/common_pb.rb +58 -0
  8. data/lib/google/cloud/connectors/v1/connection_pb.rb +84 -0
  9. data/lib/google/cloud/connectors/v1/connector_pb.rb +51 -0
  10. data/lib/google/cloud/connectors/v1/connector_version_pb.rb +63 -0
  11. data/lib/google/cloud/connectors/v1/connectors/client.rb +2189 -0
  12. data/lib/google/cloud/connectors/v1/connectors/credentials.rb +47 -0
  13. data/lib/google/cloud/connectors/v1/connectors/operations.rb +809 -0
  14. data/lib/google/cloud/connectors/v1/connectors/paths.rb +182 -0
  15. data/lib/google/cloud/connectors/v1/connectors/rest/client.rb +2049 -0
  16. data/lib/google/cloud/connectors/v1/connectors/rest/operations.rb +902 -0
  17. data/lib/google/cloud/connectors/v1/connectors/rest/service_stub.rb +1075 -0
  18. data/lib/google/cloud/connectors/v1/connectors/rest.rb +54 -0
  19. data/lib/google/cloud/connectors/v1/connectors.rb +56 -0
  20. data/lib/google/cloud/connectors/v1/connectors_service_pb.rb +53 -0
  21. data/lib/google/cloud/connectors/v1/connectors_service_services_pb.rb +80 -0
  22. data/lib/google/cloud/connectors/v1/destination_config_pb.rb +43 -0
  23. data/lib/google/cloud/connectors/v1/provider_pb.rb +51 -0
  24. data/lib/google/cloud/connectors/v1/rest.rb +38 -0
  25. data/lib/google/cloud/connectors/v1/runtime_pb.rb +47 -0
  26. data/lib/google/cloud/connectors/v1/settings_pb.rb +46 -0
  27. data/lib/google/cloud/connectors/v1/ssl_config_pb.rb +49 -0
  28. data/lib/google/cloud/connectors/v1/version.rb +7 -2
  29. data/lib/google/cloud/connectors/v1.rb +45 -0
  30. data/lib/google-cloud-connectors-v1.rb +21 -0
  31. data/proto_docs/README.md +4 -0
  32. data/proto_docs/google/api/client.rb +399 -0
  33. data/proto_docs/google/api/field_behavior.rb +85 -0
  34. data/proto_docs/google/api/launch_stage.rb +71 -0
  35. data/proto_docs/google/api/resource.rb +222 -0
  36. data/proto_docs/google/cloud/connectors/v1/authconfig.rb +165 -0
  37. data/proto_docs/google/cloud/connectors/v1/common.rb +287 -0
  38. data/proto_docs/google/cloud/connectors/v1/connection.rb +678 -0
  39. data/proto_docs/google/cloud/connectors/v1/connector.rb +119 -0
  40. data/proto_docs/google/cloud/connectors/v1/connector_version.rb +234 -0
  41. data/proto_docs/google/cloud/connectors/v1/destination_config.rb +53 -0
  42. data/proto_docs/google/cloud/connectors/v1/provider.rb +118 -0
  43. data/proto_docs/google/cloud/connectors/v1/runtime.rb +106 -0
  44. data/proto_docs/google/cloud/connectors/v1/settings.rb +51 -0
  45. data/proto_docs/google/cloud/connectors/v1/ssl_config.rb +117 -0
  46. data/proto_docs/google/longrunning/operations.rb +164 -0
  47. data/proto_docs/google/protobuf/any.rb +145 -0
  48. data/proto_docs/google/protobuf/duration.rb +98 -0
  49. data/proto_docs/google/protobuf/empty.rb +34 -0
  50. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  51. data/proto_docs/google/protobuf/struct.rb +96 -0
  52. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  53. data/proto_docs/google/rpc/status.rb +48 -0
  54. data/proto_docs/google/type/expr.rb +75 -0
  55. metadata +136 -10
@@ -0,0 +1,2189 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/connectors/v1/connectors_service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Connectors
27
+ module V1
28
+ module Connectors
29
+ ##
30
+ # Client for the Connectors service.
31
+ #
32
+ # Connectors is the interface for managing Connectors.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "connectors.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :connectors_stub
45
+
46
+ ##
47
+ # Configure the Connectors Client class.
48
+ #
49
+ # See {::Google::Cloud::Connectors::V1::Connectors::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all Connectors clients
55
+ # ::Google::Cloud::Connectors::V1::Connectors::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "Connectors", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.list_connections.timeout = 60.0
76
+ default_config.rpcs.list_connections.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config.rpcs.get_connection.timeout = 60.0
81
+ default_config.rpcs.get_connection.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.create_connection.timeout = 60.0
86
+
87
+ default_config.rpcs.update_connection.timeout = 60.0
88
+
89
+ default_config.rpcs.delete_connection.timeout = 60.0
90
+
91
+ default_config.rpcs.list_providers.timeout = 60.0
92
+ default_config.rpcs.list_providers.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.get_provider.timeout = 60.0
97
+ default_config.rpcs.get_provider.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.list_connectors.timeout = 60.0
102
+ default_config.rpcs.list_connectors.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.get_connector.timeout = 60.0
107
+ default_config.rpcs.get_connector.retry_policy = {
108
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
109
+ }
110
+
111
+ default_config.rpcs.list_connector_versions.timeout = 60.0
112
+ default_config.rpcs.list_connector_versions.retry_policy = {
113
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
114
+ }
115
+
116
+ default_config.rpcs.get_connector_version.timeout = 60.0
117
+ default_config.rpcs.get_connector_version.retry_policy = {
118
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
119
+ }
120
+
121
+ default_config.rpcs.get_connection_schema_metadata.timeout = 60.0
122
+ default_config.rpcs.get_connection_schema_metadata.retry_policy = {
123
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
124
+ }
125
+
126
+ default_config.rpcs.list_runtime_entity_schemas.timeout = 60.0
127
+ default_config.rpcs.list_runtime_entity_schemas.retry_policy = {
128
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
129
+ }
130
+
131
+ default_config.rpcs.list_runtime_action_schemas.timeout = 60.0
132
+ default_config.rpcs.list_runtime_action_schemas.retry_policy = {
133
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
134
+ }
135
+
136
+ default_config.rpcs.get_runtime_config.timeout = 60.0
137
+ default_config.rpcs.get_runtime_config.retry_policy = {
138
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
139
+ }
140
+
141
+ default_config
142
+ end
143
+ yield @configure if block_given?
144
+ @configure
145
+ end
146
+
147
+ ##
148
+ # Configure the Connectors Client instance.
149
+ #
150
+ # The configuration is set to the derived mode, meaning that values can be changed,
151
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
152
+ # should be made on {Client.configure}.
153
+ #
154
+ # See {::Google::Cloud::Connectors::V1::Connectors::Client::Configuration}
155
+ # for a description of the configuration fields.
156
+ #
157
+ # @yield [config] Configure the Client client.
158
+ # @yieldparam config [Client::Configuration]
159
+ #
160
+ # @return [Client::Configuration]
161
+ #
162
+ def configure
163
+ yield @config if block_given?
164
+ @config
165
+ end
166
+
167
+ ##
168
+ # The effective universe domain
169
+ #
170
+ # @return [String]
171
+ #
172
+ def universe_domain
173
+ @connectors_stub.universe_domain
174
+ end
175
+
176
+ ##
177
+ # Create a new Connectors client object.
178
+ #
179
+ # @example
180
+ #
181
+ # # Create a client using the default configuration
182
+ # client = ::Google::Cloud::Connectors::V1::Connectors::Client.new
183
+ #
184
+ # # Create a client using a custom configuration
185
+ # client = ::Google::Cloud::Connectors::V1::Connectors::Client.new do |config|
186
+ # config.timeout = 10.0
187
+ # end
188
+ #
189
+ # @yield [config] Configure the Connectors client.
190
+ # @yieldparam config [Client::Configuration]
191
+ #
192
+ def initialize
193
+ # These require statements are intentionally placed here to initialize
194
+ # the gRPC module only when it's required.
195
+ # See https://github.com/googleapis/toolkit/issues/446
196
+ require "gapic/grpc"
197
+ require "google/cloud/connectors/v1/connectors_service_services_pb"
198
+
199
+ # Create the configuration object
200
+ @config = Configuration.new Client.configure
201
+
202
+ # Yield the configuration if needed
203
+ yield @config if block_given?
204
+
205
+ # Create credentials
206
+ credentials = @config.credentials
207
+ # Use self-signed JWT if the endpoint is unchanged from default,
208
+ # but only if the default endpoint does not have a region prefix.
209
+ enable_self_signed_jwt = @config.endpoint.nil? ||
210
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
211
+ !@config.endpoint.split(".").first.include?("-"))
212
+ credentials ||= Credentials.default scope: @config.scope,
213
+ enable_self_signed_jwt: enable_self_signed_jwt
214
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
215
+ credentials = Credentials.new credentials, scope: @config.scope
216
+ end
217
+ @quota_project_id = @config.quota_project
218
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
219
+
220
+ @operations_client = Operations.new do |config|
221
+ config.credentials = credentials
222
+ config.quota_project = @quota_project_id
223
+ config.endpoint = @config.endpoint
224
+ config.universe_domain = @config.universe_domain
225
+ end
226
+
227
+ @connectors_stub = ::Gapic::ServiceStub.new(
228
+ ::Google::Cloud::Connectors::V1::Connectors::Stub,
229
+ credentials: credentials,
230
+ endpoint: @config.endpoint,
231
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
232
+ universe_domain: @config.universe_domain,
233
+ channel_args: @config.channel_args,
234
+ interceptors: @config.interceptors,
235
+ channel_pool_config: @config.channel_pool
236
+ )
237
+
238
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
239
+ config.credentials = credentials
240
+ config.quota_project = @quota_project_id
241
+ config.endpoint = @connectors_stub.endpoint
242
+ config.universe_domain = @connectors_stub.universe_domain
243
+ end
244
+
245
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
246
+ config.credentials = credentials
247
+ config.quota_project = @quota_project_id
248
+ config.endpoint = @connectors_stub.endpoint
249
+ config.universe_domain = @connectors_stub.universe_domain
250
+ end
251
+ end
252
+
253
+ ##
254
+ # Get the associated client for long-running operations.
255
+ #
256
+ # @return [::Google::Cloud::Connectors::V1::Connectors::Operations]
257
+ #
258
+ attr_reader :operations_client
259
+
260
+ ##
261
+ # Get the associated client for mix-in of the Locations.
262
+ #
263
+ # @return [Google::Cloud::Location::Locations::Client]
264
+ #
265
+ attr_reader :location_client
266
+
267
+ ##
268
+ # Get the associated client for mix-in of the IAMPolicy.
269
+ #
270
+ # @return [Google::Iam::V1::IAMPolicy::Client]
271
+ #
272
+ attr_reader :iam_policy_client
273
+
274
+ # Service calls
275
+
276
+ ##
277
+ # Lists Connections in a given project and location.
278
+ #
279
+ # @overload list_connections(request, options = nil)
280
+ # Pass arguments to `list_connections` via a request object, either of type
281
+ # {::Google::Cloud::Connectors::V1::ListConnectionsRequest} or an equivalent Hash.
282
+ #
283
+ # @param request [::Google::Cloud::Connectors::V1::ListConnectionsRequest, ::Hash]
284
+ # A request object representing the call parameters. Required. To specify no
285
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
286
+ # @param options [::Gapic::CallOptions, ::Hash]
287
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
288
+ #
289
+ # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
290
+ # Pass arguments to `list_connections` via keyword arguments. Note that at
291
+ # least one keyword argument is required. To specify no parameters, or to keep all
292
+ # the default parameter values, pass an empty Hash as a request object (see above).
293
+ #
294
+ # @param parent [::String]
295
+ # Required. Parent resource of the Connection, of the form:
296
+ # `projects/*/locations/*`
297
+ # @param page_size [::Integer]
298
+ # Page size.
299
+ # @param page_token [::String]
300
+ # Page token.
301
+ # @param filter [::String]
302
+ # Filter.
303
+ # @param order_by [::String]
304
+ # Order by parameters.
305
+ # @param view [::Google::Cloud::Connectors::V1::ConnectionView]
306
+ # Specifies which fields of the Connection are returned in the response.
307
+ # Defaults to `BASIC` view.
308
+ #
309
+ # @yield [response, operation] Access the result along with the RPC operation
310
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connection>]
311
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
312
+ #
313
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connection>]
314
+ #
315
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
316
+ #
317
+ # @example Basic example
318
+ # require "google/cloud/connectors/v1"
319
+ #
320
+ # # Create a client object. The client can be reused for multiple calls.
321
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
322
+ #
323
+ # # Create a request. To set request fields, pass in keyword arguments.
324
+ # request = Google::Cloud::Connectors::V1::ListConnectionsRequest.new
325
+ #
326
+ # # Call the list_connections method.
327
+ # result = client.list_connections request
328
+ #
329
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
330
+ # # over elements, and API calls will be issued to fetch pages as needed.
331
+ # result.each do |item|
332
+ # # Each element is of type ::Google::Cloud::Connectors::V1::Connection.
333
+ # p item
334
+ # end
335
+ #
336
+ def list_connections request, options = nil
337
+ raise ::ArgumentError, "request must be provided" if request.nil?
338
+
339
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListConnectionsRequest
340
+
341
+ # Converts hash and nil to an options object
342
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
343
+
344
+ # Customize the options with defaults
345
+ metadata = @config.rpcs.list_connections.metadata.to_h
346
+
347
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
348
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
349
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
350
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
351
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
352
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
353
+
354
+ header_params = {}
355
+ if request.parent
356
+ header_params["parent"] = request.parent
357
+ end
358
+
359
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
360
+ metadata[:"x-goog-request-params"] ||= request_params_header
361
+
362
+ options.apply_defaults timeout: @config.rpcs.list_connections.timeout,
363
+ metadata: metadata,
364
+ retry_policy: @config.rpcs.list_connections.retry_policy
365
+
366
+ options.apply_defaults timeout: @config.timeout,
367
+ metadata: @config.metadata,
368
+ retry_policy: @config.retry_policy
369
+
370
+ @connectors_stub.call_rpc :list_connections, request, options: options do |response, operation|
371
+ response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connections, request, response, operation, options
372
+ yield response, operation if block_given?
373
+ return response
374
+ end
375
+ rescue ::GRPC::BadStatus => e
376
+ raise ::Google::Cloud::Error.from_error(e)
377
+ end
378
+
379
+ ##
380
+ # Gets details of a single Connection.
381
+ #
382
+ # @overload get_connection(request, options = nil)
383
+ # Pass arguments to `get_connection` via a request object, either of type
384
+ # {::Google::Cloud::Connectors::V1::GetConnectionRequest} or an equivalent Hash.
385
+ #
386
+ # @param request [::Google::Cloud::Connectors::V1::GetConnectionRequest, ::Hash]
387
+ # A request object representing the call parameters. Required. To specify no
388
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
389
+ # @param options [::Gapic::CallOptions, ::Hash]
390
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
391
+ #
392
+ # @overload get_connection(name: nil, view: nil)
393
+ # Pass arguments to `get_connection` via keyword arguments. Note that at
394
+ # least one keyword argument is required. To specify no parameters, or to keep all
395
+ # the default parameter values, pass an empty Hash as a request object (see above).
396
+ #
397
+ # @param name [::String]
398
+ # Required. Resource name of the form:
399
+ # `projects/*/locations/*/connections/*`
400
+ # @param view [::Google::Cloud::Connectors::V1::ConnectionView]
401
+ # Specifies which fields of the Connection are returned in the response.
402
+ # Defaults to `BASIC` view.
403
+ #
404
+ # @yield [response, operation] Access the result along with the RPC operation
405
+ # @yieldparam response [::Google::Cloud::Connectors::V1::Connection]
406
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
407
+ #
408
+ # @return [::Google::Cloud::Connectors::V1::Connection]
409
+ #
410
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
411
+ #
412
+ # @example Basic example
413
+ # require "google/cloud/connectors/v1"
414
+ #
415
+ # # Create a client object. The client can be reused for multiple calls.
416
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
417
+ #
418
+ # # Create a request. To set request fields, pass in keyword arguments.
419
+ # request = Google::Cloud::Connectors::V1::GetConnectionRequest.new
420
+ #
421
+ # # Call the get_connection method.
422
+ # result = client.get_connection request
423
+ #
424
+ # # The returned object is of type Google::Cloud::Connectors::V1::Connection.
425
+ # p result
426
+ #
427
+ def get_connection request, options = nil
428
+ raise ::ArgumentError, "request must be provided" if request.nil?
429
+
430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectionRequest
431
+
432
+ # Converts hash and nil to an options object
433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
434
+
435
+ # Customize the options with defaults
436
+ metadata = @config.rpcs.get_connection.metadata.to_h
437
+
438
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
439
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
441
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
442
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
443
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
444
+
445
+ header_params = {}
446
+ if request.name
447
+ header_params["name"] = request.name
448
+ end
449
+
450
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
451
+ metadata[:"x-goog-request-params"] ||= request_params_header
452
+
453
+ options.apply_defaults timeout: @config.rpcs.get_connection.timeout,
454
+ metadata: metadata,
455
+ retry_policy: @config.rpcs.get_connection.retry_policy
456
+
457
+ options.apply_defaults timeout: @config.timeout,
458
+ metadata: @config.metadata,
459
+ retry_policy: @config.retry_policy
460
+
461
+ @connectors_stub.call_rpc :get_connection, request, options: options do |response, operation|
462
+ yield response, operation if block_given?
463
+ return response
464
+ end
465
+ rescue ::GRPC::BadStatus => e
466
+ raise ::Google::Cloud::Error.from_error(e)
467
+ end
468
+
469
+ ##
470
+ # Creates a new Connection in a given project and location.
471
+ #
472
+ # @overload create_connection(request, options = nil)
473
+ # Pass arguments to `create_connection` via a request object, either of type
474
+ # {::Google::Cloud::Connectors::V1::CreateConnectionRequest} or an equivalent Hash.
475
+ #
476
+ # @param request [::Google::Cloud::Connectors::V1::CreateConnectionRequest, ::Hash]
477
+ # A request object representing the call parameters. Required. To specify no
478
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
479
+ # @param options [::Gapic::CallOptions, ::Hash]
480
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
481
+ #
482
+ # @overload create_connection(parent: nil, connection_id: nil, connection: nil)
483
+ # Pass arguments to `create_connection` via keyword arguments. Note that at
484
+ # least one keyword argument is required. To specify no parameters, or to keep all
485
+ # the default parameter values, pass an empty Hash as a request object (see above).
486
+ #
487
+ # @param parent [::String]
488
+ # Required. Parent resource of the Connection, of the form:
489
+ # `projects/*/locations/*`
490
+ # @param connection_id [::String]
491
+ # Required. Identifier to assign to the Connection. Must be unique within
492
+ # scope of the parent resource.
493
+ # @param connection [::Google::Cloud::Connectors::V1::Connection, ::Hash]
494
+ # Required. Connection resource.
495
+ #
496
+ # @yield [response, operation] Access the result along with the RPC operation
497
+ # @yieldparam response [::Gapic::Operation]
498
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
499
+ #
500
+ # @return [::Gapic::Operation]
501
+ #
502
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
503
+ #
504
+ # @example Basic example
505
+ # require "google/cloud/connectors/v1"
506
+ #
507
+ # # Create a client object. The client can be reused for multiple calls.
508
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
509
+ #
510
+ # # Create a request. To set request fields, pass in keyword arguments.
511
+ # request = Google::Cloud::Connectors::V1::CreateConnectionRequest.new
512
+ #
513
+ # # Call the create_connection method.
514
+ # result = client.create_connection request
515
+ #
516
+ # # The returned object is of type Gapic::Operation. You can use it to
517
+ # # check the status of an operation, cancel it, or wait for results.
518
+ # # Here is how to wait for a response.
519
+ # result.wait_until_done! timeout: 60
520
+ # if result.response?
521
+ # p result.response
522
+ # else
523
+ # puts "No response received."
524
+ # end
525
+ #
526
+ def create_connection request, options = nil
527
+ raise ::ArgumentError, "request must be provided" if request.nil?
528
+
529
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::CreateConnectionRequest
530
+
531
+ # Converts hash and nil to an options object
532
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
533
+
534
+ # Customize the options with defaults
535
+ metadata = @config.rpcs.create_connection.metadata.to_h
536
+
537
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
538
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
539
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
540
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
541
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
542
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
543
+
544
+ header_params = {}
545
+ if request.parent
546
+ header_params["parent"] = request.parent
547
+ end
548
+
549
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
550
+ metadata[:"x-goog-request-params"] ||= request_params_header
551
+
552
+ options.apply_defaults timeout: @config.rpcs.create_connection.timeout,
553
+ metadata: metadata,
554
+ retry_policy: @config.rpcs.create_connection.retry_policy
555
+
556
+ options.apply_defaults timeout: @config.timeout,
557
+ metadata: @config.metadata,
558
+ retry_policy: @config.retry_policy
559
+
560
+ @connectors_stub.call_rpc :create_connection, request, options: options do |response, operation|
561
+ response = ::Gapic::Operation.new response, @operations_client, options: options
562
+ yield response, operation if block_given?
563
+ return response
564
+ end
565
+ rescue ::GRPC::BadStatus => e
566
+ raise ::Google::Cloud::Error.from_error(e)
567
+ end
568
+
569
+ ##
570
+ # Updates the parameters of a single Connection.
571
+ #
572
+ # @overload update_connection(request, options = nil)
573
+ # Pass arguments to `update_connection` via a request object, either of type
574
+ # {::Google::Cloud::Connectors::V1::UpdateConnectionRequest} or an equivalent Hash.
575
+ #
576
+ # @param request [::Google::Cloud::Connectors::V1::UpdateConnectionRequest, ::Hash]
577
+ # A request object representing the call parameters. Required. To specify no
578
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
579
+ # @param options [::Gapic::CallOptions, ::Hash]
580
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
581
+ #
582
+ # @overload update_connection(connection: nil, update_mask: nil)
583
+ # Pass arguments to `update_connection` via keyword arguments. Note that at
584
+ # least one keyword argument is required. To specify no parameters, or to keep all
585
+ # the default parameter values, pass an empty Hash as a request object (see above).
586
+ #
587
+ # @param connection [::Google::Cloud::Connectors::V1::Connection, ::Hash]
588
+ # Required. Connection resource.
589
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
590
+ # Required. You can modify only the fields listed below.
591
+ #
592
+ # To lock/unlock a connection:
593
+ # * `lock_config`
594
+ #
595
+ # To suspend/resume a connection:
596
+ # * `suspended`
597
+ #
598
+ # To update the connection details:
599
+ # * `description`
600
+ # * `labels`
601
+ # * `connector_version`
602
+ # * `config_variables`
603
+ # * `auth_config`
604
+ # * `destination_configs`
605
+ # * `node_config`
606
+ #
607
+ # @yield [response, operation] Access the result along with the RPC operation
608
+ # @yieldparam response [::Gapic::Operation]
609
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
610
+ #
611
+ # @return [::Gapic::Operation]
612
+ #
613
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
614
+ #
615
+ # @example Basic example
616
+ # require "google/cloud/connectors/v1"
617
+ #
618
+ # # Create a client object. The client can be reused for multiple calls.
619
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
620
+ #
621
+ # # Create a request. To set request fields, pass in keyword arguments.
622
+ # request = Google::Cloud::Connectors::V1::UpdateConnectionRequest.new
623
+ #
624
+ # # Call the update_connection method.
625
+ # result = client.update_connection request
626
+ #
627
+ # # The returned object is of type Gapic::Operation. You can use it to
628
+ # # check the status of an operation, cancel it, or wait for results.
629
+ # # Here is how to wait for a response.
630
+ # result.wait_until_done! timeout: 60
631
+ # if result.response?
632
+ # p result.response
633
+ # else
634
+ # puts "No response received."
635
+ # end
636
+ #
637
+ def update_connection request, options = nil
638
+ raise ::ArgumentError, "request must be provided" if request.nil?
639
+
640
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::UpdateConnectionRequest
641
+
642
+ # Converts hash and nil to an options object
643
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
644
+
645
+ # Customize the options with defaults
646
+ metadata = @config.rpcs.update_connection.metadata.to_h
647
+
648
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
649
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
650
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
651
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
652
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
653
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
654
+
655
+ header_params = {}
656
+ if request.connection&.name
657
+ header_params["connection.name"] = request.connection.name
658
+ end
659
+
660
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
661
+ metadata[:"x-goog-request-params"] ||= request_params_header
662
+
663
+ options.apply_defaults timeout: @config.rpcs.update_connection.timeout,
664
+ metadata: metadata,
665
+ retry_policy: @config.rpcs.update_connection.retry_policy
666
+
667
+ options.apply_defaults timeout: @config.timeout,
668
+ metadata: @config.metadata,
669
+ retry_policy: @config.retry_policy
670
+
671
+ @connectors_stub.call_rpc :update_connection, request, options: options do |response, operation|
672
+ response = ::Gapic::Operation.new response, @operations_client, options: options
673
+ yield response, operation if block_given?
674
+ return response
675
+ end
676
+ rescue ::GRPC::BadStatus => e
677
+ raise ::Google::Cloud::Error.from_error(e)
678
+ end
679
+
680
+ ##
681
+ # Deletes a single Connection.
682
+ #
683
+ # @overload delete_connection(request, options = nil)
684
+ # Pass arguments to `delete_connection` via a request object, either of type
685
+ # {::Google::Cloud::Connectors::V1::DeleteConnectionRequest} or an equivalent Hash.
686
+ #
687
+ # @param request [::Google::Cloud::Connectors::V1::DeleteConnectionRequest, ::Hash]
688
+ # A request object representing the call parameters. Required. To specify no
689
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
690
+ # @param options [::Gapic::CallOptions, ::Hash]
691
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
692
+ #
693
+ # @overload delete_connection(name: nil)
694
+ # Pass arguments to `delete_connection` via keyword arguments. Note that at
695
+ # least one keyword argument is required. To specify no parameters, or to keep all
696
+ # the default parameter values, pass an empty Hash as a request object (see above).
697
+ #
698
+ # @param name [::String]
699
+ # Required. Resource name of the form:
700
+ # `projects/*/locations/*/connections/*`
701
+ #
702
+ # @yield [response, operation] Access the result along with the RPC operation
703
+ # @yieldparam response [::Gapic::Operation]
704
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
705
+ #
706
+ # @return [::Gapic::Operation]
707
+ #
708
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
709
+ #
710
+ # @example Basic example
711
+ # require "google/cloud/connectors/v1"
712
+ #
713
+ # # Create a client object. The client can be reused for multiple calls.
714
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
715
+ #
716
+ # # Create a request. To set request fields, pass in keyword arguments.
717
+ # request = Google::Cloud::Connectors::V1::DeleteConnectionRequest.new
718
+ #
719
+ # # Call the delete_connection method.
720
+ # result = client.delete_connection request
721
+ #
722
+ # # The returned object is of type Gapic::Operation. You can use it to
723
+ # # check the status of an operation, cancel it, or wait for results.
724
+ # # Here is how to wait for a response.
725
+ # result.wait_until_done! timeout: 60
726
+ # if result.response?
727
+ # p result.response
728
+ # else
729
+ # puts "No response received."
730
+ # end
731
+ #
732
+ def delete_connection request, options = nil
733
+ raise ::ArgumentError, "request must be provided" if request.nil?
734
+
735
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::DeleteConnectionRequest
736
+
737
+ # Converts hash and nil to an options object
738
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
739
+
740
+ # Customize the options with defaults
741
+ metadata = @config.rpcs.delete_connection.metadata.to_h
742
+
743
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
744
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
745
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
746
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
747
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
748
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
749
+
750
+ header_params = {}
751
+ if request.name
752
+ header_params["name"] = request.name
753
+ end
754
+
755
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
756
+ metadata[:"x-goog-request-params"] ||= request_params_header
757
+
758
+ options.apply_defaults timeout: @config.rpcs.delete_connection.timeout,
759
+ metadata: metadata,
760
+ retry_policy: @config.rpcs.delete_connection.retry_policy
761
+
762
+ options.apply_defaults timeout: @config.timeout,
763
+ metadata: @config.metadata,
764
+ retry_policy: @config.retry_policy
765
+
766
+ @connectors_stub.call_rpc :delete_connection, request, options: options do |response, operation|
767
+ response = ::Gapic::Operation.new response, @operations_client, options: options
768
+ yield response, operation if block_given?
769
+ return response
770
+ end
771
+ rescue ::GRPC::BadStatus => e
772
+ raise ::Google::Cloud::Error.from_error(e)
773
+ end
774
+
775
+ ##
776
+ # Lists Providers in a given project and location.
777
+ #
778
+ # @overload list_providers(request, options = nil)
779
+ # Pass arguments to `list_providers` via a request object, either of type
780
+ # {::Google::Cloud::Connectors::V1::ListProvidersRequest} or an equivalent Hash.
781
+ #
782
+ # @param request [::Google::Cloud::Connectors::V1::ListProvidersRequest, ::Hash]
783
+ # A request object representing the call parameters. Required. To specify no
784
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
785
+ # @param options [::Gapic::CallOptions, ::Hash]
786
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
787
+ #
788
+ # @overload list_providers(parent: nil, page_size: nil, page_token: nil)
789
+ # Pass arguments to `list_providers` via keyword arguments. Note that at
790
+ # least one keyword argument is required. To specify no parameters, or to keep all
791
+ # the default parameter values, pass an empty Hash as a request object (see above).
792
+ #
793
+ # @param parent [::String]
794
+ # Required. Parent resource of the API, of the form:
795
+ # `projects/*/locations/*`
796
+ # Only global location is supported for Provider resource.
797
+ # @param page_size [::Integer]
798
+ # Page size.
799
+ # @param page_token [::String]
800
+ # Page token.
801
+ #
802
+ # @yield [response, operation] Access the result along with the RPC operation
803
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Provider>]
804
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
805
+ #
806
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Provider>]
807
+ #
808
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
809
+ #
810
+ # @example Basic example
811
+ # require "google/cloud/connectors/v1"
812
+ #
813
+ # # Create a client object. The client can be reused for multiple calls.
814
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
815
+ #
816
+ # # Create a request. To set request fields, pass in keyword arguments.
817
+ # request = Google::Cloud::Connectors::V1::ListProvidersRequest.new
818
+ #
819
+ # # Call the list_providers method.
820
+ # result = client.list_providers request
821
+ #
822
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
823
+ # # over elements, and API calls will be issued to fetch pages as needed.
824
+ # result.each do |item|
825
+ # # Each element is of type ::Google::Cloud::Connectors::V1::Provider.
826
+ # p item
827
+ # end
828
+ #
829
+ def list_providers request, options = nil
830
+ raise ::ArgumentError, "request must be provided" if request.nil?
831
+
832
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListProvidersRequest
833
+
834
+ # Converts hash and nil to an options object
835
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
836
+
837
+ # Customize the options with defaults
838
+ metadata = @config.rpcs.list_providers.metadata.to_h
839
+
840
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
841
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
842
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
843
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
844
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
845
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
846
+
847
+ header_params = {}
848
+ if request.parent
849
+ header_params["parent"] = request.parent
850
+ end
851
+
852
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
853
+ metadata[:"x-goog-request-params"] ||= request_params_header
854
+
855
+ options.apply_defaults timeout: @config.rpcs.list_providers.timeout,
856
+ metadata: metadata,
857
+ retry_policy: @config.rpcs.list_providers.retry_policy
858
+
859
+ options.apply_defaults timeout: @config.timeout,
860
+ metadata: @config.metadata,
861
+ retry_policy: @config.retry_policy
862
+
863
+ @connectors_stub.call_rpc :list_providers, request, options: options do |response, operation|
864
+ response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_providers, request, response, operation, options
865
+ yield response, operation if block_given?
866
+ return response
867
+ end
868
+ rescue ::GRPC::BadStatus => e
869
+ raise ::Google::Cloud::Error.from_error(e)
870
+ end
871
+
872
+ ##
873
+ # Gets details of a provider.
874
+ #
875
+ # @overload get_provider(request, options = nil)
876
+ # Pass arguments to `get_provider` via a request object, either of type
877
+ # {::Google::Cloud::Connectors::V1::GetProviderRequest} or an equivalent Hash.
878
+ #
879
+ # @param request [::Google::Cloud::Connectors::V1::GetProviderRequest, ::Hash]
880
+ # A request object representing the call parameters. Required. To specify no
881
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
882
+ # @param options [::Gapic::CallOptions, ::Hash]
883
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
884
+ #
885
+ # @overload get_provider(name: nil)
886
+ # Pass arguments to `get_provider` via keyword arguments. Note that at
887
+ # least one keyword argument is required. To specify no parameters, or to keep all
888
+ # the default parameter values, pass an empty Hash as a request object (see above).
889
+ #
890
+ # @param name [::String]
891
+ # Required. Resource name of the form:
892
+ # `projects/*/locations/*/providers/*`
893
+ # Only global location is supported for Provider resource.
894
+ #
895
+ # @yield [response, operation] Access the result along with the RPC operation
896
+ # @yieldparam response [::Google::Cloud::Connectors::V1::Provider]
897
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
898
+ #
899
+ # @return [::Google::Cloud::Connectors::V1::Provider]
900
+ #
901
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
902
+ #
903
+ # @example Basic example
904
+ # require "google/cloud/connectors/v1"
905
+ #
906
+ # # Create a client object. The client can be reused for multiple calls.
907
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
908
+ #
909
+ # # Create a request. To set request fields, pass in keyword arguments.
910
+ # request = Google::Cloud::Connectors::V1::GetProviderRequest.new
911
+ #
912
+ # # Call the get_provider method.
913
+ # result = client.get_provider request
914
+ #
915
+ # # The returned object is of type Google::Cloud::Connectors::V1::Provider.
916
+ # p result
917
+ #
918
+ def get_provider request, options = nil
919
+ raise ::ArgumentError, "request must be provided" if request.nil?
920
+
921
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetProviderRequest
922
+
923
+ # Converts hash and nil to an options object
924
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
925
+
926
+ # Customize the options with defaults
927
+ metadata = @config.rpcs.get_provider.metadata.to_h
928
+
929
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
930
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
931
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
932
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
933
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
934
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
935
+
936
+ header_params = {}
937
+ if request.name
938
+ header_params["name"] = request.name
939
+ end
940
+
941
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
942
+ metadata[:"x-goog-request-params"] ||= request_params_header
943
+
944
+ options.apply_defaults timeout: @config.rpcs.get_provider.timeout,
945
+ metadata: metadata,
946
+ retry_policy: @config.rpcs.get_provider.retry_policy
947
+
948
+ options.apply_defaults timeout: @config.timeout,
949
+ metadata: @config.metadata,
950
+ retry_policy: @config.retry_policy
951
+
952
+ @connectors_stub.call_rpc :get_provider, request, options: options do |response, operation|
953
+ yield response, operation if block_given?
954
+ return response
955
+ end
956
+ rescue ::GRPC::BadStatus => e
957
+ raise ::Google::Cloud::Error.from_error(e)
958
+ end
959
+
960
+ ##
961
+ # Lists Connectors in a given project and location.
962
+ #
963
+ # @overload list_connectors(request, options = nil)
964
+ # Pass arguments to `list_connectors` via a request object, either of type
965
+ # {::Google::Cloud::Connectors::V1::ListConnectorsRequest} or an equivalent Hash.
966
+ #
967
+ # @param request [::Google::Cloud::Connectors::V1::ListConnectorsRequest, ::Hash]
968
+ # A request object representing the call parameters. Required. To specify no
969
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
970
+ # @param options [::Gapic::CallOptions, ::Hash]
971
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
972
+ #
973
+ # @overload list_connectors(parent: nil, page_size: nil, page_token: nil)
974
+ # Pass arguments to `list_connectors` via keyword arguments. Note that at
975
+ # least one keyword argument is required. To specify no parameters, or to keep all
976
+ # the default parameter values, pass an empty Hash as a request object (see above).
977
+ #
978
+ # @param parent [::String]
979
+ # Required. Parent resource of the connectors, of the form:
980
+ # `projects/*/locations/*/providers/*`
981
+ # Only global location is supported for Connector resource.
982
+ # @param page_size [::Integer]
983
+ # Page size.
984
+ # @param page_token [::String]
985
+ # Page token.
986
+ #
987
+ # @yield [response, operation] Access the result along with the RPC operation
988
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connector>]
989
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
990
+ #
991
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connector>]
992
+ #
993
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
994
+ #
995
+ # @example Basic example
996
+ # require "google/cloud/connectors/v1"
997
+ #
998
+ # # Create a client object. The client can be reused for multiple calls.
999
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1000
+ #
1001
+ # # Create a request. To set request fields, pass in keyword arguments.
1002
+ # request = Google::Cloud::Connectors::V1::ListConnectorsRequest.new
1003
+ #
1004
+ # # Call the list_connectors method.
1005
+ # result = client.list_connectors request
1006
+ #
1007
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1008
+ # # over elements, and API calls will be issued to fetch pages as needed.
1009
+ # result.each do |item|
1010
+ # # Each element is of type ::Google::Cloud::Connectors::V1::Connector.
1011
+ # p item
1012
+ # end
1013
+ #
1014
+ def list_connectors request, options = nil
1015
+ raise ::ArgumentError, "request must be provided" if request.nil?
1016
+
1017
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListConnectorsRequest
1018
+
1019
+ # Converts hash and nil to an options object
1020
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1021
+
1022
+ # Customize the options with defaults
1023
+ metadata = @config.rpcs.list_connectors.metadata.to_h
1024
+
1025
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1026
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1027
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1028
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1029
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1030
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1031
+
1032
+ header_params = {}
1033
+ if request.parent
1034
+ header_params["parent"] = request.parent
1035
+ end
1036
+
1037
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1038
+ metadata[:"x-goog-request-params"] ||= request_params_header
1039
+
1040
+ options.apply_defaults timeout: @config.rpcs.list_connectors.timeout,
1041
+ metadata: metadata,
1042
+ retry_policy: @config.rpcs.list_connectors.retry_policy
1043
+
1044
+ options.apply_defaults timeout: @config.timeout,
1045
+ metadata: @config.metadata,
1046
+ retry_policy: @config.retry_policy
1047
+
1048
+ @connectors_stub.call_rpc :list_connectors, request, options: options do |response, operation|
1049
+ response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connectors, request, response, operation, options
1050
+ yield response, operation if block_given?
1051
+ return response
1052
+ end
1053
+ rescue ::GRPC::BadStatus => e
1054
+ raise ::Google::Cloud::Error.from_error(e)
1055
+ end
1056
+
1057
+ ##
1058
+ # Gets details of a single Connector.
1059
+ #
1060
+ # @overload get_connector(request, options = nil)
1061
+ # Pass arguments to `get_connector` via a request object, either of type
1062
+ # {::Google::Cloud::Connectors::V1::GetConnectorRequest} or an equivalent Hash.
1063
+ #
1064
+ # @param request [::Google::Cloud::Connectors::V1::GetConnectorRequest, ::Hash]
1065
+ # A request object representing the call parameters. Required. To specify no
1066
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1067
+ # @param options [::Gapic::CallOptions, ::Hash]
1068
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1069
+ #
1070
+ # @overload get_connector(name: nil)
1071
+ # Pass arguments to `get_connector` via keyword arguments. Note that at
1072
+ # least one keyword argument is required. To specify no parameters, or to keep all
1073
+ # the default parameter values, pass an empty Hash as a request object (see above).
1074
+ #
1075
+ # @param name [::String]
1076
+ # Required. Resource name of the form:
1077
+ # `projects/*/locations/*/providers/*/connectors/*`
1078
+ # Only global location is supported for Connector resource.
1079
+ #
1080
+ # @yield [response, operation] Access the result along with the RPC operation
1081
+ # @yieldparam response [::Google::Cloud::Connectors::V1::Connector]
1082
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1083
+ #
1084
+ # @return [::Google::Cloud::Connectors::V1::Connector]
1085
+ #
1086
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1087
+ #
1088
+ # @example Basic example
1089
+ # require "google/cloud/connectors/v1"
1090
+ #
1091
+ # # Create a client object. The client can be reused for multiple calls.
1092
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1093
+ #
1094
+ # # Create a request. To set request fields, pass in keyword arguments.
1095
+ # request = Google::Cloud::Connectors::V1::GetConnectorRequest.new
1096
+ #
1097
+ # # Call the get_connector method.
1098
+ # result = client.get_connector request
1099
+ #
1100
+ # # The returned object is of type Google::Cloud::Connectors::V1::Connector.
1101
+ # p result
1102
+ #
1103
+ def get_connector request, options = nil
1104
+ raise ::ArgumentError, "request must be provided" if request.nil?
1105
+
1106
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectorRequest
1107
+
1108
+ # Converts hash and nil to an options object
1109
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1110
+
1111
+ # Customize the options with defaults
1112
+ metadata = @config.rpcs.get_connector.metadata.to_h
1113
+
1114
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1115
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1116
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1117
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1118
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1119
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1120
+
1121
+ header_params = {}
1122
+ if request.name
1123
+ header_params["name"] = request.name
1124
+ end
1125
+
1126
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1127
+ metadata[:"x-goog-request-params"] ||= request_params_header
1128
+
1129
+ options.apply_defaults timeout: @config.rpcs.get_connector.timeout,
1130
+ metadata: metadata,
1131
+ retry_policy: @config.rpcs.get_connector.retry_policy
1132
+
1133
+ options.apply_defaults timeout: @config.timeout,
1134
+ metadata: @config.metadata,
1135
+ retry_policy: @config.retry_policy
1136
+
1137
+ @connectors_stub.call_rpc :get_connector, request, options: options do |response, operation|
1138
+ yield response, operation if block_given?
1139
+ return response
1140
+ end
1141
+ rescue ::GRPC::BadStatus => e
1142
+ raise ::Google::Cloud::Error.from_error(e)
1143
+ end
1144
+
1145
+ ##
1146
+ # Lists Connector Versions in a given project and location.
1147
+ #
1148
+ # @overload list_connector_versions(request, options = nil)
1149
+ # Pass arguments to `list_connector_versions` via a request object, either of type
1150
+ # {::Google::Cloud::Connectors::V1::ListConnectorVersionsRequest} or an equivalent Hash.
1151
+ #
1152
+ # @param request [::Google::Cloud::Connectors::V1::ListConnectorVersionsRequest, ::Hash]
1153
+ # A request object representing the call parameters. Required. To specify no
1154
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1155
+ # @param options [::Gapic::CallOptions, ::Hash]
1156
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1157
+ #
1158
+ # @overload list_connector_versions(parent: nil, page_size: nil, page_token: nil, view: nil)
1159
+ # Pass arguments to `list_connector_versions` via keyword arguments. Note that at
1160
+ # least one keyword argument is required. To specify no parameters, or to keep all
1161
+ # the default parameter values, pass an empty Hash as a request object (see above).
1162
+ #
1163
+ # @param parent [::String]
1164
+ # Required. Parent resource of the connectors, of the form:
1165
+ # `projects/*/locations/*/providers/*/connectors/*`
1166
+ # Only global location is supported for ConnectorVersion resource.
1167
+ # @param page_size [::Integer]
1168
+ # Page size.
1169
+ # @param page_token [::String]
1170
+ # Page token.
1171
+ # @param view [::Google::Cloud::Connectors::V1::ConnectorVersionView]
1172
+ # Specifies which fields of the ConnectorVersion are returned in the
1173
+ # response. Defaults to `BASIC` view.
1174
+ #
1175
+ # @yield [response, operation] Access the result along with the RPC operation
1176
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::ConnectorVersion>]
1177
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1178
+ #
1179
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::ConnectorVersion>]
1180
+ #
1181
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1182
+ #
1183
+ # @example Basic example
1184
+ # require "google/cloud/connectors/v1"
1185
+ #
1186
+ # # Create a client object. The client can be reused for multiple calls.
1187
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1188
+ #
1189
+ # # Create a request. To set request fields, pass in keyword arguments.
1190
+ # request = Google::Cloud::Connectors::V1::ListConnectorVersionsRequest.new
1191
+ #
1192
+ # # Call the list_connector_versions method.
1193
+ # result = client.list_connector_versions request
1194
+ #
1195
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1196
+ # # over elements, and API calls will be issued to fetch pages as needed.
1197
+ # result.each do |item|
1198
+ # # Each element is of type ::Google::Cloud::Connectors::V1::ConnectorVersion.
1199
+ # p item
1200
+ # end
1201
+ #
1202
+ def list_connector_versions request, options = nil
1203
+ raise ::ArgumentError, "request must be provided" if request.nil?
1204
+
1205
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListConnectorVersionsRequest
1206
+
1207
+ # Converts hash and nil to an options object
1208
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1209
+
1210
+ # Customize the options with defaults
1211
+ metadata = @config.rpcs.list_connector_versions.metadata.to_h
1212
+
1213
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1214
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1215
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1216
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1217
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1218
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1219
+
1220
+ header_params = {}
1221
+ if request.parent
1222
+ header_params["parent"] = request.parent
1223
+ end
1224
+
1225
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1226
+ metadata[:"x-goog-request-params"] ||= request_params_header
1227
+
1228
+ options.apply_defaults timeout: @config.rpcs.list_connector_versions.timeout,
1229
+ metadata: metadata,
1230
+ retry_policy: @config.rpcs.list_connector_versions.retry_policy
1231
+
1232
+ options.apply_defaults timeout: @config.timeout,
1233
+ metadata: @config.metadata,
1234
+ retry_policy: @config.retry_policy
1235
+
1236
+ @connectors_stub.call_rpc :list_connector_versions, request, options: options do |response, operation|
1237
+ response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connector_versions, request, response, operation, options
1238
+ yield response, operation if block_given?
1239
+ return response
1240
+ end
1241
+ rescue ::GRPC::BadStatus => e
1242
+ raise ::Google::Cloud::Error.from_error(e)
1243
+ end
1244
+
1245
+ ##
1246
+ # Gets details of a single connector version.
1247
+ #
1248
+ # @overload get_connector_version(request, options = nil)
1249
+ # Pass arguments to `get_connector_version` via a request object, either of type
1250
+ # {::Google::Cloud::Connectors::V1::GetConnectorVersionRequest} or an equivalent Hash.
1251
+ #
1252
+ # @param request [::Google::Cloud::Connectors::V1::GetConnectorVersionRequest, ::Hash]
1253
+ # A request object representing the call parameters. Required. To specify no
1254
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1255
+ # @param options [::Gapic::CallOptions, ::Hash]
1256
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1257
+ #
1258
+ # @overload get_connector_version(name: nil, view: nil)
1259
+ # Pass arguments to `get_connector_version` via keyword arguments. Note that at
1260
+ # least one keyword argument is required. To specify no parameters, or to keep all
1261
+ # the default parameter values, pass an empty Hash as a request object (see above).
1262
+ #
1263
+ # @param name [::String]
1264
+ # Required. Resource name of the form:
1265
+ # `projects/*/locations/*/providers/*/connectors/*/versions/*`
1266
+ # Only global location is supported for ConnectorVersion resource.
1267
+ # @param view [::Google::Cloud::Connectors::V1::ConnectorVersionView]
1268
+ # Specifies which fields of the ConnectorVersion are returned in the
1269
+ # response. Defaults to `CUSTOMER` view.
1270
+ #
1271
+ # @yield [response, operation] Access the result along with the RPC operation
1272
+ # @yieldparam response [::Google::Cloud::Connectors::V1::ConnectorVersion]
1273
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1274
+ #
1275
+ # @return [::Google::Cloud::Connectors::V1::ConnectorVersion]
1276
+ #
1277
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1278
+ #
1279
+ # @example Basic example
1280
+ # require "google/cloud/connectors/v1"
1281
+ #
1282
+ # # Create a client object. The client can be reused for multiple calls.
1283
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1284
+ #
1285
+ # # Create a request. To set request fields, pass in keyword arguments.
1286
+ # request = Google::Cloud::Connectors::V1::GetConnectorVersionRequest.new
1287
+ #
1288
+ # # Call the get_connector_version method.
1289
+ # result = client.get_connector_version request
1290
+ #
1291
+ # # The returned object is of type Google::Cloud::Connectors::V1::ConnectorVersion.
1292
+ # p result
1293
+ #
1294
+ def get_connector_version request, options = nil
1295
+ raise ::ArgumentError, "request must be provided" if request.nil?
1296
+
1297
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectorVersionRequest
1298
+
1299
+ # Converts hash and nil to an options object
1300
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1301
+
1302
+ # Customize the options with defaults
1303
+ metadata = @config.rpcs.get_connector_version.metadata.to_h
1304
+
1305
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1306
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1307
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1308
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1309
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1310
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1311
+
1312
+ header_params = {}
1313
+ if request.name
1314
+ header_params["name"] = request.name
1315
+ end
1316
+
1317
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1318
+ metadata[:"x-goog-request-params"] ||= request_params_header
1319
+
1320
+ options.apply_defaults timeout: @config.rpcs.get_connector_version.timeout,
1321
+ metadata: metadata,
1322
+ retry_policy: @config.rpcs.get_connector_version.retry_policy
1323
+
1324
+ options.apply_defaults timeout: @config.timeout,
1325
+ metadata: @config.metadata,
1326
+ retry_policy: @config.retry_policy
1327
+
1328
+ @connectors_stub.call_rpc :get_connector_version, request, options: options do |response, operation|
1329
+ yield response, operation if block_given?
1330
+ return response
1331
+ end
1332
+ rescue ::GRPC::BadStatus => e
1333
+ raise ::Google::Cloud::Error.from_error(e)
1334
+ end
1335
+
1336
+ ##
1337
+ # Gets schema metadata of a connection.
1338
+ # SchemaMetadata is a singleton resource for each connection.
1339
+ #
1340
+ # @overload get_connection_schema_metadata(request, options = nil)
1341
+ # Pass arguments to `get_connection_schema_metadata` via a request object, either of type
1342
+ # {::Google::Cloud::Connectors::V1::GetConnectionSchemaMetadataRequest} or an equivalent Hash.
1343
+ #
1344
+ # @param request [::Google::Cloud::Connectors::V1::GetConnectionSchemaMetadataRequest, ::Hash]
1345
+ # A request object representing the call parameters. Required. To specify no
1346
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1347
+ # @param options [::Gapic::CallOptions, ::Hash]
1348
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1349
+ #
1350
+ # @overload get_connection_schema_metadata(name: nil)
1351
+ # Pass arguments to `get_connection_schema_metadata` via keyword arguments. Note that at
1352
+ # least one keyword argument is required. To specify no parameters, or to keep all
1353
+ # the default parameter values, pass an empty Hash as a request object (see above).
1354
+ #
1355
+ # @param name [::String]
1356
+ # Required. Connection name
1357
+ # Format:
1358
+ # projects/\\{project}/locations/\\{location}/connections/\\{connection}/connectionSchemaMetadata
1359
+ #
1360
+ # @yield [response, operation] Access the result along with the RPC operation
1361
+ # @yieldparam response [::Google::Cloud::Connectors::V1::ConnectionSchemaMetadata]
1362
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1363
+ #
1364
+ # @return [::Google::Cloud::Connectors::V1::ConnectionSchemaMetadata]
1365
+ #
1366
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1367
+ #
1368
+ # @example Basic example
1369
+ # require "google/cloud/connectors/v1"
1370
+ #
1371
+ # # Create a client object. The client can be reused for multiple calls.
1372
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1373
+ #
1374
+ # # Create a request. To set request fields, pass in keyword arguments.
1375
+ # request = Google::Cloud::Connectors::V1::GetConnectionSchemaMetadataRequest.new
1376
+ #
1377
+ # # Call the get_connection_schema_metadata method.
1378
+ # result = client.get_connection_schema_metadata request
1379
+ #
1380
+ # # The returned object is of type Google::Cloud::Connectors::V1::ConnectionSchemaMetadata.
1381
+ # p result
1382
+ #
1383
+ def get_connection_schema_metadata request, options = nil
1384
+ raise ::ArgumentError, "request must be provided" if request.nil?
1385
+
1386
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectionSchemaMetadataRequest
1387
+
1388
+ # Converts hash and nil to an options object
1389
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1390
+
1391
+ # Customize the options with defaults
1392
+ metadata = @config.rpcs.get_connection_schema_metadata.metadata.to_h
1393
+
1394
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1395
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1396
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1397
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1398
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1399
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1400
+
1401
+ header_params = {}
1402
+ if request.name
1403
+ header_params["name"] = request.name
1404
+ end
1405
+
1406
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1407
+ metadata[:"x-goog-request-params"] ||= request_params_header
1408
+
1409
+ options.apply_defaults timeout: @config.rpcs.get_connection_schema_metadata.timeout,
1410
+ metadata: metadata,
1411
+ retry_policy: @config.rpcs.get_connection_schema_metadata.retry_policy
1412
+
1413
+ options.apply_defaults timeout: @config.timeout,
1414
+ metadata: @config.metadata,
1415
+ retry_policy: @config.retry_policy
1416
+
1417
+ @connectors_stub.call_rpc :get_connection_schema_metadata, request, options: options do |response, operation|
1418
+ yield response, operation if block_given?
1419
+ return response
1420
+ end
1421
+ rescue ::GRPC::BadStatus => e
1422
+ raise ::Google::Cloud::Error.from_error(e)
1423
+ end
1424
+
1425
+ ##
1426
+ # Refresh runtime schema of a connection.
1427
+ #
1428
+ # @overload refresh_connection_schema_metadata(request, options = nil)
1429
+ # Pass arguments to `refresh_connection_schema_metadata` via a request object, either of type
1430
+ # {::Google::Cloud::Connectors::V1::RefreshConnectionSchemaMetadataRequest} or an equivalent Hash.
1431
+ #
1432
+ # @param request [::Google::Cloud::Connectors::V1::RefreshConnectionSchemaMetadataRequest, ::Hash]
1433
+ # A request object representing the call parameters. Required. To specify no
1434
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1435
+ # @param options [::Gapic::CallOptions, ::Hash]
1436
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1437
+ #
1438
+ # @overload refresh_connection_schema_metadata(name: nil)
1439
+ # Pass arguments to `refresh_connection_schema_metadata` via keyword arguments. Note that at
1440
+ # least one keyword argument is required. To specify no parameters, or to keep all
1441
+ # the default parameter values, pass an empty Hash as a request object (see above).
1442
+ #
1443
+ # @param name [::String]
1444
+ # Required. Resource name.
1445
+ # Format:
1446
+ # projects/\\{project}/locations/\\{location}/connections/\\{connection}/connectionSchemaMetadata
1447
+ #
1448
+ # @yield [response, operation] Access the result along with the RPC operation
1449
+ # @yieldparam response [::Gapic::Operation]
1450
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1451
+ #
1452
+ # @return [::Gapic::Operation]
1453
+ #
1454
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1455
+ #
1456
+ # @example Basic example
1457
+ # require "google/cloud/connectors/v1"
1458
+ #
1459
+ # # Create a client object. The client can be reused for multiple calls.
1460
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1461
+ #
1462
+ # # Create a request. To set request fields, pass in keyword arguments.
1463
+ # request = Google::Cloud::Connectors::V1::RefreshConnectionSchemaMetadataRequest.new
1464
+ #
1465
+ # # Call the refresh_connection_schema_metadata method.
1466
+ # result = client.refresh_connection_schema_metadata request
1467
+ #
1468
+ # # The returned object is of type Gapic::Operation. You can use it to
1469
+ # # check the status of an operation, cancel it, or wait for results.
1470
+ # # Here is how to wait for a response.
1471
+ # result.wait_until_done! timeout: 60
1472
+ # if result.response?
1473
+ # p result.response
1474
+ # else
1475
+ # puts "No response received."
1476
+ # end
1477
+ #
1478
+ def refresh_connection_schema_metadata request, options = nil
1479
+ raise ::ArgumentError, "request must be provided" if request.nil?
1480
+
1481
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::RefreshConnectionSchemaMetadataRequest
1482
+
1483
+ # Converts hash and nil to an options object
1484
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1485
+
1486
+ # Customize the options with defaults
1487
+ metadata = @config.rpcs.refresh_connection_schema_metadata.metadata.to_h
1488
+
1489
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1490
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1491
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1492
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1493
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1494
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1495
+
1496
+ header_params = {}
1497
+ if request.name
1498
+ header_params["name"] = request.name
1499
+ end
1500
+
1501
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1502
+ metadata[:"x-goog-request-params"] ||= request_params_header
1503
+
1504
+ options.apply_defaults timeout: @config.rpcs.refresh_connection_schema_metadata.timeout,
1505
+ metadata: metadata,
1506
+ retry_policy: @config.rpcs.refresh_connection_schema_metadata.retry_policy
1507
+
1508
+ options.apply_defaults timeout: @config.timeout,
1509
+ metadata: @config.metadata,
1510
+ retry_policy: @config.retry_policy
1511
+
1512
+ @connectors_stub.call_rpc :refresh_connection_schema_metadata, request, options: options do |response, operation|
1513
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1514
+ yield response, operation if block_given?
1515
+ return response
1516
+ end
1517
+ rescue ::GRPC::BadStatus => e
1518
+ raise ::Google::Cloud::Error.from_error(e)
1519
+ end
1520
+
1521
+ ##
1522
+ # List schema of a runtime entities filtered by entity name.
1523
+ #
1524
+ # @overload list_runtime_entity_schemas(request, options = nil)
1525
+ # Pass arguments to `list_runtime_entity_schemas` via a request object, either of type
1526
+ # {::Google::Cloud::Connectors::V1::ListRuntimeEntitySchemasRequest} or an equivalent Hash.
1527
+ #
1528
+ # @param request [::Google::Cloud::Connectors::V1::ListRuntimeEntitySchemasRequest, ::Hash]
1529
+ # A request object representing the call parameters. Required. To specify no
1530
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1531
+ # @param options [::Gapic::CallOptions, ::Hash]
1532
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1533
+ #
1534
+ # @overload list_runtime_entity_schemas(parent: nil, page_size: nil, page_token: nil, filter: nil)
1535
+ # Pass arguments to `list_runtime_entity_schemas` via keyword arguments. Note that at
1536
+ # least one keyword argument is required. To specify no parameters, or to keep all
1537
+ # the default parameter values, pass an empty Hash as a request object (see above).
1538
+ #
1539
+ # @param parent [::String]
1540
+ # Required. Parent resource of RuntimeEntitySchema
1541
+ # Format:
1542
+ # projects/\\{project}/locations/\\{location}/connections/\\{connection}
1543
+ # @param page_size [::Integer]
1544
+ # Page size.
1545
+ # @param page_token [::String]
1546
+ # Page token.
1547
+ # @param filter [::String]
1548
+ # Required. Filter
1549
+ # Format:
1550
+ # entity="\\{entityId}"
1551
+ # Only entity field is supported with literal equality operator.
1552
+ # Accepted filter example: entity="Order"
1553
+ # Wildcards are not supported in the filter currently.
1554
+ #
1555
+ # @yield [response, operation] Access the result along with the RPC operation
1556
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeEntitySchema>]
1557
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1558
+ #
1559
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeEntitySchema>]
1560
+ #
1561
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1562
+ #
1563
+ # @example Basic example
1564
+ # require "google/cloud/connectors/v1"
1565
+ #
1566
+ # # Create a client object. The client can be reused for multiple calls.
1567
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1568
+ #
1569
+ # # Create a request. To set request fields, pass in keyword arguments.
1570
+ # request = Google::Cloud::Connectors::V1::ListRuntimeEntitySchemasRequest.new
1571
+ #
1572
+ # # Call the list_runtime_entity_schemas method.
1573
+ # result = client.list_runtime_entity_schemas request
1574
+ #
1575
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1576
+ # # over elements, and API calls will be issued to fetch pages as needed.
1577
+ # result.each do |item|
1578
+ # # Each element is of type ::Google::Cloud::Connectors::V1::RuntimeEntitySchema.
1579
+ # p item
1580
+ # end
1581
+ #
1582
+ def list_runtime_entity_schemas request, options = nil
1583
+ raise ::ArgumentError, "request must be provided" if request.nil?
1584
+
1585
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListRuntimeEntitySchemasRequest
1586
+
1587
+ # Converts hash and nil to an options object
1588
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1589
+
1590
+ # Customize the options with defaults
1591
+ metadata = @config.rpcs.list_runtime_entity_schemas.metadata.to_h
1592
+
1593
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1594
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1595
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1596
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1597
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1598
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1599
+
1600
+ header_params = {}
1601
+ if request.parent
1602
+ header_params["parent"] = request.parent
1603
+ end
1604
+
1605
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1606
+ metadata[:"x-goog-request-params"] ||= request_params_header
1607
+
1608
+ options.apply_defaults timeout: @config.rpcs.list_runtime_entity_schemas.timeout,
1609
+ metadata: metadata,
1610
+ retry_policy: @config.rpcs.list_runtime_entity_schemas.retry_policy
1611
+
1612
+ options.apply_defaults timeout: @config.timeout,
1613
+ metadata: @config.metadata,
1614
+ retry_policy: @config.retry_policy
1615
+
1616
+ @connectors_stub.call_rpc :list_runtime_entity_schemas, request, options: options do |response, operation|
1617
+ response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_runtime_entity_schemas, request, response, operation, options
1618
+ yield response, operation if block_given?
1619
+ return response
1620
+ end
1621
+ rescue ::GRPC::BadStatus => e
1622
+ raise ::Google::Cloud::Error.from_error(e)
1623
+ end
1624
+
1625
+ ##
1626
+ # List schema of a runtime actions filtered by action name.
1627
+ #
1628
+ # @overload list_runtime_action_schemas(request, options = nil)
1629
+ # Pass arguments to `list_runtime_action_schemas` via a request object, either of type
1630
+ # {::Google::Cloud::Connectors::V1::ListRuntimeActionSchemasRequest} or an equivalent Hash.
1631
+ #
1632
+ # @param request [::Google::Cloud::Connectors::V1::ListRuntimeActionSchemasRequest, ::Hash]
1633
+ # A request object representing the call parameters. Required. To specify no
1634
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1635
+ # @param options [::Gapic::CallOptions, ::Hash]
1636
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1637
+ #
1638
+ # @overload list_runtime_action_schemas(parent: nil, page_size: nil, page_token: nil, filter: nil)
1639
+ # Pass arguments to `list_runtime_action_schemas` via keyword arguments. Note that at
1640
+ # least one keyword argument is required. To specify no parameters, or to keep all
1641
+ # the default parameter values, pass an empty Hash as a request object (see above).
1642
+ #
1643
+ # @param parent [::String]
1644
+ # Required. Parent resource of RuntimeActionSchema
1645
+ # Format:
1646
+ # projects/\\{project}/locations/\\{location}/connections/\\{connection}
1647
+ # @param page_size [::Integer]
1648
+ # Page size.
1649
+ # @param page_token [::String]
1650
+ # Page token.
1651
+ # @param filter [::String]
1652
+ # Required. Filter
1653
+ # Format:
1654
+ # action="\\{actionId}"
1655
+ # Only action field is supported with literal equality operator.
1656
+ # Accepted filter example: action="CancelOrder"
1657
+ # Wildcards are not supported in the filter currently.
1658
+ #
1659
+ # @yield [response, operation] Access the result along with the RPC operation
1660
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeActionSchema>]
1661
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1662
+ #
1663
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeActionSchema>]
1664
+ #
1665
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1666
+ #
1667
+ # @example Basic example
1668
+ # require "google/cloud/connectors/v1"
1669
+ #
1670
+ # # Create a client object. The client can be reused for multiple calls.
1671
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1672
+ #
1673
+ # # Create a request. To set request fields, pass in keyword arguments.
1674
+ # request = Google::Cloud::Connectors::V1::ListRuntimeActionSchemasRequest.new
1675
+ #
1676
+ # # Call the list_runtime_action_schemas method.
1677
+ # result = client.list_runtime_action_schemas request
1678
+ #
1679
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1680
+ # # over elements, and API calls will be issued to fetch pages as needed.
1681
+ # result.each do |item|
1682
+ # # Each element is of type ::Google::Cloud::Connectors::V1::RuntimeActionSchema.
1683
+ # p item
1684
+ # end
1685
+ #
1686
+ def list_runtime_action_schemas request, options = nil
1687
+ raise ::ArgumentError, "request must be provided" if request.nil?
1688
+
1689
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListRuntimeActionSchemasRequest
1690
+
1691
+ # Converts hash and nil to an options object
1692
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1693
+
1694
+ # Customize the options with defaults
1695
+ metadata = @config.rpcs.list_runtime_action_schemas.metadata.to_h
1696
+
1697
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1698
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1699
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1700
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1701
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1702
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1703
+
1704
+ header_params = {}
1705
+ if request.parent
1706
+ header_params["parent"] = request.parent
1707
+ end
1708
+
1709
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1710
+ metadata[:"x-goog-request-params"] ||= request_params_header
1711
+
1712
+ options.apply_defaults timeout: @config.rpcs.list_runtime_action_schemas.timeout,
1713
+ metadata: metadata,
1714
+ retry_policy: @config.rpcs.list_runtime_action_schemas.retry_policy
1715
+
1716
+ options.apply_defaults timeout: @config.timeout,
1717
+ metadata: @config.metadata,
1718
+ retry_policy: @config.retry_policy
1719
+
1720
+ @connectors_stub.call_rpc :list_runtime_action_schemas, request, options: options do |response, operation|
1721
+ response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_runtime_action_schemas, request, response, operation, options
1722
+ yield response, operation if block_given?
1723
+ return response
1724
+ end
1725
+ rescue ::GRPC::BadStatus => e
1726
+ raise ::Google::Cloud::Error.from_error(e)
1727
+ end
1728
+
1729
+ ##
1730
+ # Gets the runtimeConfig of a location.
1731
+ # RuntimeConfig is a singleton resource for each location.
1732
+ #
1733
+ # @overload get_runtime_config(request, options = nil)
1734
+ # Pass arguments to `get_runtime_config` via a request object, either of type
1735
+ # {::Google::Cloud::Connectors::V1::GetRuntimeConfigRequest} or an equivalent Hash.
1736
+ #
1737
+ # @param request [::Google::Cloud::Connectors::V1::GetRuntimeConfigRequest, ::Hash]
1738
+ # A request object representing the call parameters. Required. To specify no
1739
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1740
+ # @param options [::Gapic::CallOptions, ::Hash]
1741
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1742
+ #
1743
+ # @overload get_runtime_config(name: nil)
1744
+ # Pass arguments to `get_runtime_config` via keyword arguments. Note that at
1745
+ # least one keyword argument is required. To specify no parameters, or to keep all
1746
+ # the default parameter values, pass an empty Hash as a request object (see above).
1747
+ #
1748
+ # @param name [::String]
1749
+ # Required. Resource name of the form:
1750
+ # `projects/*/locations/*/runtimeConfig`
1751
+ #
1752
+ # @yield [response, operation] Access the result along with the RPC operation
1753
+ # @yieldparam response [::Google::Cloud::Connectors::V1::RuntimeConfig]
1754
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1755
+ #
1756
+ # @return [::Google::Cloud::Connectors::V1::RuntimeConfig]
1757
+ #
1758
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1759
+ #
1760
+ # @example Basic example
1761
+ # require "google/cloud/connectors/v1"
1762
+ #
1763
+ # # Create a client object. The client can be reused for multiple calls.
1764
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1765
+ #
1766
+ # # Create a request. To set request fields, pass in keyword arguments.
1767
+ # request = Google::Cloud::Connectors::V1::GetRuntimeConfigRequest.new
1768
+ #
1769
+ # # Call the get_runtime_config method.
1770
+ # result = client.get_runtime_config request
1771
+ #
1772
+ # # The returned object is of type Google::Cloud::Connectors::V1::RuntimeConfig.
1773
+ # p result
1774
+ #
1775
+ def get_runtime_config request, options = nil
1776
+ raise ::ArgumentError, "request must be provided" if request.nil?
1777
+
1778
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetRuntimeConfigRequest
1779
+
1780
+ # Converts hash and nil to an options object
1781
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1782
+
1783
+ # Customize the options with defaults
1784
+ metadata = @config.rpcs.get_runtime_config.metadata.to_h
1785
+
1786
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1787
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1788
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1789
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1790
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1791
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1792
+
1793
+ header_params = {}
1794
+ if request.name
1795
+ header_params["name"] = request.name
1796
+ end
1797
+
1798
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1799
+ metadata[:"x-goog-request-params"] ||= request_params_header
1800
+
1801
+ options.apply_defaults timeout: @config.rpcs.get_runtime_config.timeout,
1802
+ metadata: metadata,
1803
+ retry_policy: @config.rpcs.get_runtime_config.retry_policy
1804
+
1805
+ options.apply_defaults timeout: @config.timeout,
1806
+ metadata: @config.metadata,
1807
+ retry_policy: @config.retry_policy
1808
+
1809
+ @connectors_stub.call_rpc :get_runtime_config, request, options: options do |response, operation|
1810
+ yield response, operation if block_given?
1811
+ return response
1812
+ end
1813
+ rescue ::GRPC::BadStatus => e
1814
+ raise ::Google::Cloud::Error.from_error(e)
1815
+ end
1816
+
1817
+ ##
1818
+ # GetGlobalSettings gets settings of a project.
1819
+ # GlobalSettings is a singleton resource.
1820
+ #
1821
+ # @overload get_global_settings(request, options = nil)
1822
+ # Pass arguments to `get_global_settings` via a request object, either of type
1823
+ # {::Google::Cloud::Connectors::V1::GetGlobalSettingsRequest} or an equivalent Hash.
1824
+ #
1825
+ # @param request [::Google::Cloud::Connectors::V1::GetGlobalSettingsRequest, ::Hash]
1826
+ # A request object representing the call parameters. Required. To specify no
1827
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1828
+ # @param options [::Gapic::CallOptions, ::Hash]
1829
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1830
+ #
1831
+ # @overload get_global_settings(name: nil)
1832
+ # Pass arguments to `get_global_settings` via keyword arguments. Note that at
1833
+ # least one keyword argument is required. To specify no parameters, or to keep all
1834
+ # the default parameter values, pass an empty Hash as a request object (see above).
1835
+ #
1836
+ # @param name [::String]
1837
+ # Required. The resource name of the Settings.
1838
+ #
1839
+ # @yield [response, operation] Access the result along with the RPC operation
1840
+ # @yieldparam response [::Google::Cloud::Connectors::V1::Settings]
1841
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1842
+ #
1843
+ # @return [::Google::Cloud::Connectors::V1::Settings]
1844
+ #
1845
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1846
+ #
1847
+ # @example Basic example
1848
+ # require "google/cloud/connectors/v1"
1849
+ #
1850
+ # # Create a client object. The client can be reused for multiple calls.
1851
+ # client = Google::Cloud::Connectors::V1::Connectors::Client.new
1852
+ #
1853
+ # # Create a request. To set request fields, pass in keyword arguments.
1854
+ # request = Google::Cloud::Connectors::V1::GetGlobalSettingsRequest.new
1855
+ #
1856
+ # # Call the get_global_settings method.
1857
+ # result = client.get_global_settings request
1858
+ #
1859
+ # # The returned object is of type Google::Cloud::Connectors::V1::Settings.
1860
+ # p result
1861
+ #
1862
+ def get_global_settings request, options = nil
1863
+ raise ::ArgumentError, "request must be provided" if request.nil?
1864
+
1865
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetGlobalSettingsRequest
1866
+
1867
+ # Converts hash and nil to an options object
1868
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1869
+
1870
+ # Customize the options with defaults
1871
+ metadata = @config.rpcs.get_global_settings.metadata.to_h
1872
+
1873
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1874
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1875
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1876
+ gapic_version: ::Google::Cloud::Connectors::V1::VERSION
1877
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1878
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1879
+
1880
+ header_params = {}
1881
+ if request.name
1882
+ header_params["name"] = request.name
1883
+ end
1884
+
1885
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1886
+ metadata[:"x-goog-request-params"] ||= request_params_header
1887
+
1888
+ options.apply_defaults timeout: @config.rpcs.get_global_settings.timeout,
1889
+ metadata: metadata,
1890
+ retry_policy: @config.rpcs.get_global_settings.retry_policy
1891
+
1892
+ options.apply_defaults timeout: @config.timeout,
1893
+ metadata: @config.metadata,
1894
+ retry_policy: @config.retry_policy
1895
+
1896
+ @connectors_stub.call_rpc :get_global_settings, request, options: options do |response, operation|
1897
+ yield response, operation if block_given?
1898
+ return response
1899
+ end
1900
+ rescue ::GRPC::BadStatus => e
1901
+ raise ::Google::Cloud::Error.from_error(e)
1902
+ end
1903
+
1904
+ ##
1905
+ # Configuration class for the Connectors API.
1906
+ #
1907
+ # This class represents the configuration for Connectors,
1908
+ # providing control over timeouts, retry behavior, logging, transport
1909
+ # parameters, and other low-level controls. Certain parameters can also be
1910
+ # applied individually to specific RPCs. See
1911
+ # {::Google::Cloud::Connectors::V1::Connectors::Client::Configuration::Rpcs}
1912
+ # for a list of RPCs that can be configured independently.
1913
+ #
1914
+ # Configuration can be applied globally to all clients, or to a single client
1915
+ # on construction.
1916
+ #
1917
+ # @example
1918
+ #
1919
+ # # Modify the global config, setting the timeout for
1920
+ # # list_connections to 20 seconds,
1921
+ # # and all remaining timeouts to 10 seconds.
1922
+ # ::Google::Cloud::Connectors::V1::Connectors::Client.configure do |config|
1923
+ # config.timeout = 10.0
1924
+ # config.rpcs.list_connections.timeout = 20.0
1925
+ # end
1926
+ #
1927
+ # # Apply the above configuration only to a new client.
1928
+ # client = ::Google::Cloud::Connectors::V1::Connectors::Client.new do |config|
1929
+ # config.timeout = 10.0
1930
+ # config.rpcs.list_connections.timeout = 20.0
1931
+ # end
1932
+ #
1933
+ # @!attribute [rw] endpoint
1934
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1935
+ # nil, indicating to use the default endpoint in the current universe domain.
1936
+ # @return [::String,nil]
1937
+ # @!attribute [rw] credentials
1938
+ # Credentials to send with calls. You may provide any of the following types:
1939
+ # * (`String`) The path to a service account key file in JSON format
1940
+ # * (`Hash`) A service account key as a Hash
1941
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1942
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1943
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1944
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1945
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1946
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1947
+ # * (`nil`) indicating no credentials
1948
+ # @return [::Object]
1949
+ # @!attribute [rw] scope
1950
+ # The OAuth scopes
1951
+ # @return [::Array<::String>]
1952
+ # @!attribute [rw] lib_name
1953
+ # The library name as recorded in instrumentation and logging
1954
+ # @return [::String]
1955
+ # @!attribute [rw] lib_version
1956
+ # The library version as recorded in instrumentation and logging
1957
+ # @return [::String]
1958
+ # @!attribute [rw] channel_args
1959
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1960
+ # `GRPC::Core::Channel` object is provided as the credential.
1961
+ # @return [::Hash]
1962
+ # @!attribute [rw] interceptors
1963
+ # An array of interceptors that are run before calls are executed.
1964
+ # @return [::Array<::GRPC::ClientInterceptor>]
1965
+ # @!attribute [rw] timeout
1966
+ # The call timeout in seconds.
1967
+ # @return [::Numeric]
1968
+ # @!attribute [rw] metadata
1969
+ # Additional gRPC headers to be sent with the call.
1970
+ # @return [::Hash{::Symbol=>::String}]
1971
+ # @!attribute [rw] retry_policy
1972
+ # The retry policy. The value is a hash with the following keys:
1973
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1974
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1975
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1976
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1977
+ # trigger a retry.
1978
+ # @return [::Hash]
1979
+ # @!attribute [rw] quota_project
1980
+ # A separate project against which to charge quota.
1981
+ # @return [::String]
1982
+ # @!attribute [rw] universe_domain
1983
+ # The universe domain within which to make requests. This determines the
1984
+ # default endpoint URL. The default value of nil uses the environment
1985
+ # universe (usually the default "googleapis.com" universe).
1986
+ # @return [::String,nil]
1987
+ #
1988
+ class Configuration
1989
+ extend ::Gapic::Config
1990
+
1991
+ # @private
1992
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1993
+ DEFAULT_ENDPOINT = "connectors.googleapis.com"
1994
+
1995
+ config_attr :endpoint, nil, ::String, nil
1996
+ config_attr :credentials, nil do |value|
1997
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1998
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1999
+ allowed.any? { |klass| klass === value }
2000
+ end
2001
+ config_attr :scope, nil, ::String, ::Array, nil
2002
+ config_attr :lib_name, nil, ::String, nil
2003
+ config_attr :lib_version, nil, ::String, nil
2004
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2005
+ config_attr :interceptors, nil, ::Array, nil
2006
+ config_attr :timeout, nil, ::Numeric, nil
2007
+ config_attr :metadata, nil, ::Hash, nil
2008
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2009
+ config_attr :quota_project, nil, ::String, nil
2010
+ config_attr :universe_domain, nil, ::String, nil
2011
+
2012
+ # @private
2013
+ def initialize parent_config = nil
2014
+ @parent_config = parent_config unless parent_config.nil?
2015
+
2016
+ yield self if block_given?
2017
+ end
2018
+
2019
+ ##
2020
+ # Configurations for individual RPCs
2021
+ # @return [Rpcs]
2022
+ #
2023
+ def rpcs
2024
+ @rpcs ||= begin
2025
+ parent_rpcs = nil
2026
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2027
+ Rpcs.new parent_rpcs
2028
+ end
2029
+ end
2030
+
2031
+ ##
2032
+ # Configuration for the channel pool
2033
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2034
+ #
2035
+ def channel_pool
2036
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2037
+ end
2038
+
2039
+ ##
2040
+ # Configuration RPC class for the Connectors API.
2041
+ #
2042
+ # Includes fields providing the configuration for each RPC in this service.
2043
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2044
+ # the following configuration fields:
2045
+ #
2046
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2047
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2048
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2049
+ # include the following keys:
2050
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2051
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2052
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2053
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2054
+ # trigger a retry.
2055
+ #
2056
+ class Rpcs
2057
+ ##
2058
+ # RPC-specific configuration for `list_connections`
2059
+ # @return [::Gapic::Config::Method]
2060
+ #
2061
+ attr_reader :list_connections
2062
+ ##
2063
+ # RPC-specific configuration for `get_connection`
2064
+ # @return [::Gapic::Config::Method]
2065
+ #
2066
+ attr_reader :get_connection
2067
+ ##
2068
+ # RPC-specific configuration for `create_connection`
2069
+ # @return [::Gapic::Config::Method]
2070
+ #
2071
+ attr_reader :create_connection
2072
+ ##
2073
+ # RPC-specific configuration for `update_connection`
2074
+ # @return [::Gapic::Config::Method]
2075
+ #
2076
+ attr_reader :update_connection
2077
+ ##
2078
+ # RPC-specific configuration for `delete_connection`
2079
+ # @return [::Gapic::Config::Method]
2080
+ #
2081
+ attr_reader :delete_connection
2082
+ ##
2083
+ # RPC-specific configuration for `list_providers`
2084
+ # @return [::Gapic::Config::Method]
2085
+ #
2086
+ attr_reader :list_providers
2087
+ ##
2088
+ # RPC-specific configuration for `get_provider`
2089
+ # @return [::Gapic::Config::Method]
2090
+ #
2091
+ attr_reader :get_provider
2092
+ ##
2093
+ # RPC-specific configuration for `list_connectors`
2094
+ # @return [::Gapic::Config::Method]
2095
+ #
2096
+ attr_reader :list_connectors
2097
+ ##
2098
+ # RPC-specific configuration for `get_connector`
2099
+ # @return [::Gapic::Config::Method]
2100
+ #
2101
+ attr_reader :get_connector
2102
+ ##
2103
+ # RPC-specific configuration for `list_connector_versions`
2104
+ # @return [::Gapic::Config::Method]
2105
+ #
2106
+ attr_reader :list_connector_versions
2107
+ ##
2108
+ # RPC-specific configuration for `get_connector_version`
2109
+ # @return [::Gapic::Config::Method]
2110
+ #
2111
+ attr_reader :get_connector_version
2112
+ ##
2113
+ # RPC-specific configuration for `get_connection_schema_metadata`
2114
+ # @return [::Gapic::Config::Method]
2115
+ #
2116
+ attr_reader :get_connection_schema_metadata
2117
+ ##
2118
+ # RPC-specific configuration for `refresh_connection_schema_metadata`
2119
+ # @return [::Gapic::Config::Method]
2120
+ #
2121
+ attr_reader :refresh_connection_schema_metadata
2122
+ ##
2123
+ # RPC-specific configuration for `list_runtime_entity_schemas`
2124
+ # @return [::Gapic::Config::Method]
2125
+ #
2126
+ attr_reader :list_runtime_entity_schemas
2127
+ ##
2128
+ # RPC-specific configuration for `list_runtime_action_schemas`
2129
+ # @return [::Gapic::Config::Method]
2130
+ #
2131
+ attr_reader :list_runtime_action_schemas
2132
+ ##
2133
+ # RPC-specific configuration for `get_runtime_config`
2134
+ # @return [::Gapic::Config::Method]
2135
+ #
2136
+ attr_reader :get_runtime_config
2137
+ ##
2138
+ # RPC-specific configuration for `get_global_settings`
2139
+ # @return [::Gapic::Config::Method]
2140
+ #
2141
+ attr_reader :get_global_settings
2142
+
2143
+ # @private
2144
+ def initialize parent_rpcs = nil
2145
+ list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections
2146
+ @list_connections = ::Gapic::Config::Method.new list_connections_config
2147
+ get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection
2148
+ @get_connection = ::Gapic::Config::Method.new get_connection_config
2149
+ create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection
2150
+ @create_connection = ::Gapic::Config::Method.new create_connection_config
2151
+ update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection
2152
+ @update_connection = ::Gapic::Config::Method.new update_connection_config
2153
+ delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection
2154
+ @delete_connection = ::Gapic::Config::Method.new delete_connection_config
2155
+ list_providers_config = parent_rpcs.list_providers if parent_rpcs.respond_to? :list_providers
2156
+ @list_providers = ::Gapic::Config::Method.new list_providers_config
2157
+ get_provider_config = parent_rpcs.get_provider if parent_rpcs.respond_to? :get_provider
2158
+ @get_provider = ::Gapic::Config::Method.new get_provider_config
2159
+ list_connectors_config = parent_rpcs.list_connectors if parent_rpcs.respond_to? :list_connectors
2160
+ @list_connectors = ::Gapic::Config::Method.new list_connectors_config
2161
+ get_connector_config = parent_rpcs.get_connector if parent_rpcs.respond_to? :get_connector
2162
+ @get_connector = ::Gapic::Config::Method.new get_connector_config
2163
+ list_connector_versions_config = parent_rpcs.list_connector_versions if parent_rpcs.respond_to? :list_connector_versions
2164
+ @list_connector_versions = ::Gapic::Config::Method.new list_connector_versions_config
2165
+ get_connector_version_config = parent_rpcs.get_connector_version if parent_rpcs.respond_to? :get_connector_version
2166
+ @get_connector_version = ::Gapic::Config::Method.new get_connector_version_config
2167
+ get_connection_schema_metadata_config = parent_rpcs.get_connection_schema_metadata if parent_rpcs.respond_to? :get_connection_schema_metadata
2168
+ @get_connection_schema_metadata = ::Gapic::Config::Method.new get_connection_schema_metadata_config
2169
+ refresh_connection_schema_metadata_config = parent_rpcs.refresh_connection_schema_metadata if parent_rpcs.respond_to? :refresh_connection_schema_metadata
2170
+ @refresh_connection_schema_metadata = ::Gapic::Config::Method.new refresh_connection_schema_metadata_config
2171
+ list_runtime_entity_schemas_config = parent_rpcs.list_runtime_entity_schemas if parent_rpcs.respond_to? :list_runtime_entity_schemas
2172
+ @list_runtime_entity_schemas = ::Gapic::Config::Method.new list_runtime_entity_schemas_config
2173
+ list_runtime_action_schemas_config = parent_rpcs.list_runtime_action_schemas if parent_rpcs.respond_to? :list_runtime_action_schemas
2174
+ @list_runtime_action_schemas = ::Gapic::Config::Method.new list_runtime_action_schemas_config
2175
+ get_runtime_config_config = parent_rpcs.get_runtime_config if parent_rpcs.respond_to? :get_runtime_config
2176
+ @get_runtime_config = ::Gapic::Config::Method.new get_runtime_config_config
2177
+ get_global_settings_config = parent_rpcs.get_global_settings if parent_rpcs.respond_to? :get_global_settings
2178
+ @get_global_settings = ::Gapic::Config::Method.new get_global_settings_config
2179
+
2180
+ yield self if block_given?
2181
+ end
2182
+ end
2183
+ end
2184
+ end
2185
+ end
2186
+ end
2187
+ end
2188
+ end
2189
+ end