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

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