google-cloud-eventarc-v1 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::Eventarc::V1::Eventarc::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all Eventarc clients:
48
- #
49
- # ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all Eventarc clients
48
+ # ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -95,19 +94,15 @@ module Google
95
94
  ##
96
95
  # Create a new Eventarc client object.
97
96
  #
98
- # ## Examples
99
- #
100
- # To create a new Eventarc client with the default
101
- # configuration:
97
+ # @example
102
98
  #
103
- # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new
99
+ # # Create a client using the default configuration
100
+ # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new
104
101
  #
105
- # To create a new Eventarc client with a custom
106
- # configuration:
107
- #
108
- # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config|
109
- # config.timeout = 10.0
110
- # end
102
+ # # Create a client using a custom configuration
103
+ # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config|
104
+ # config.timeout = 10.0
105
+ # end
111
106
  #
112
107
  # @yield [config] Configure the Eventarc client.
113
108
  # @yieldparam config [Client::Configuration]
@@ -127,10 +122,9 @@ module Google
127
122
 
128
123
  # Create credentials
129
124
  credentials = @config.credentials
130
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
125
+ # Use self-signed JWT if the endpoint is unchanged from default,
131
126
  # but only if the default endpoint does not have a region prefix.
132
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
133
- @config.endpoint == Client.configure.endpoint &&
127
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
134
128
  !@config.endpoint.split(".").first.include?("-")
135
129
  credentials ||= Credentials.default scope: @config.scope,
136
130
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -142,6 +136,7 @@ module Google
142
136
 
143
137
  @operations_client = Operations.new do |config|
144
138
  config.credentials = credentials
139
+ config.quota_project = @quota_project_id
145
140
  config.endpoint = @config.endpoint
146
141
  end
147
142
 
@@ -192,6 +187,21 @@ module Google
192
187
  #
193
188
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
194
189
  #
190
+ # @example Basic example
191
+ # require "google/cloud/eventarc/v1"
192
+ #
193
+ # # Create a client object. The client can be reused for multiple calls.
194
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
195
+ #
196
+ # # Create a request. To set request fields, pass in keyword arguments.
197
+ # request = Google::Cloud::Eventarc::V1::GetTriggerRequest.new
198
+ #
199
+ # # Call the get_trigger method.
200
+ # result = client.get_trigger request
201
+ #
202
+ # # The returned object is of type Google::Cloud::Eventarc::V1::Trigger.
203
+ # p result
204
+ #
195
205
  def get_trigger request, options = nil
196
206
  raise ::ArgumentError, "request must be provided" if request.nil?
197
207
 
@@ -209,16 +219,20 @@ module Google
209
219
  gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
210
220
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
211
221
 
212
- header_params = {
213
- "name" => request.name
214
- }
222
+ header_params = {}
223
+ if request.name
224
+ header_params["name"] = request.name
225
+ end
226
+
215
227
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
216
228
  metadata[:"x-goog-request-params"] ||= request_params_header
217
229
 
218
230
  options.apply_defaults timeout: @config.rpcs.get_trigger.timeout,
219
231
  metadata: metadata,
220
232
  retry_policy: @config.rpcs.get_trigger.retry_policy
221
- options.apply_defaults metadata: @config.metadata,
233
+
234
+ options.apply_defaults timeout: @config.timeout,
235
+ metadata: @config.metadata,
222
236
  retry_policy: @config.retry_policy
223
237
 
224
238
  @eventarc_stub.call_rpc :get_trigger, request, options: options do |response, operation|
@@ -259,9 +273,9 @@ module Google
259
273
  # When paginating, all other parameters provided to `ListTriggers` must match
260
274
  # the call that provided the page token.
261
275
  # @param order_by [::String]
262
- # The sorting order of the resources returned. Value should be a comma
263
- # separated list of fields. The default sorting oder is ascending. To specify
264
- # descending order for a field, append a ` desc` suffix; for example:
276
+ # The sorting order of the resources returned. Value should be a
277
+ # comma-separated list of fields. The default sorting order is ascending. To
278
+ # specify descending order for a field, append a `desc` suffix; for example:
265
279
  # `name desc, trigger_id`.
266
280
  #
267
281
  # @yield [response, operation] Access the result along with the RPC operation
@@ -272,6 +286,27 @@ module Google
272
286
  #
273
287
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
274
288
  #
289
+ # @example Basic example
290
+ # require "google/cloud/eventarc/v1"
291
+ #
292
+ # # Create a client object. The client can be reused for multiple calls.
293
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
294
+ #
295
+ # # Create a request. To set request fields, pass in keyword arguments.
296
+ # request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new
297
+ #
298
+ # # Call the list_triggers method.
299
+ # result = client.list_triggers request
300
+ #
301
+ # # The returned object is of type Gapic::PagedEnumerable. You can
302
+ # # iterate over all elements by calling #each, and the enumerable
303
+ # # will lazily make API calls to fetch subsequent pages. Other
304
+ # # methods are also available for managing paging directly.
305
+ # result.each do |response|
306
+ # # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger.
307
+ # p response
308
+ # end
309
+ #
275
310
  def list_triggers request, options = nil
276
311
  raise ::ArgumentError, "request must be provided" if request.nil?
277
312
 
@@ -289,16 +324,20 @@ module Google
289
324
  gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
290
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
291
326
 
292
- header_params = {
293
- "parent" => request.parent
294
- }
327
+ header_params = {}
328
+ if request.parent
329
+ header_params["parent"] = request.parent
330
+ end
331
+
295
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
296
333
  metadata[:"x-goog-request-params"] ||= request_params_header
297
334
 
298
335
  options.apply_defaults timeout: @config.rpcs.list_triggers.timeout,
299
336
  metadata: metadata,
300
337
  retry_policy: @config.rpcs.list_triggers.retry_policy
301
- options.apply_defaults metadata: @config.metadata,
338
+
339
+ options.apply_defaults timeout: @config.timeout,
340
+ metadata: @config.metadata,
302
341
  retry_policy: @config.retry_policy
303
342
 
304
343
  @eventarc_stub.call_rpc :list_triggers, request, options: options do |response, operation|
@@ -335,7 +374,7 @@ module Google
335
374
  # @param trigger_id [::String]
336
375
  # Required. The user-provided ID to be assigned to the trigger.
337
376
  # @param validate_only [::Boolean]
338
- # Required. If set, validate the request and preview the review, but do not actually
377
+ # Required. If set, validate the request and preview the review, but do not
339
378
  # post it.
340
379
  #
341
380
  # @yield [response, operation] Access the result along with the RPC operation
@@ -346,6 +385,28 @@ module Google
346
385
  #
347
386
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
348
387
  #
388
+ # @example Basic example
389
+ # require "google/cloud/eventarc/v1"
390
+ #
391
+ # # Create a client object. The client can be reused for multiple calls.
392
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
393
+ #
394
+ # # Create a request. To set request fields, pass in keyword arguments.
395
+ # request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new
396
+ #
397
+ # # Call the create_trigger method.
398
+ # result = client.create_trigger request
399
+ #
400
+ # # The returned object is of type Gapic::Operation. You can use this
401
+ # # object to check the status of an operation, cancel it, or wait
402
+ # # for results. Here is how to block until completion:
403
+ # result.wait_until_done! timeout: 60
404
+ # if result.response?
405
+ # p result.response
406
+ # else
407
+ # puts "Error!"
408
+ # end
409
+ #
349
410
  def create_trigger request, options = nil
350
411
  raise ::ArgumentError, "request must be provided" if request.nil?
351
412
 
@@ -363,16 +424,20 @@ module Google
363
424
  gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
364
425
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
365
426
 
366
- header_params = {
367
- "parent" => request.parent
368
- }
427
+ header_params = {}
428
+ if request.parent
429
+ header_params["parent"] = request.parent
430
+ end
431
+
369
432
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
370
433
  metadata[:"x-goog-request-params"] ||= request_params_header
371
434
 
372
435
  options.apply_defaults timeout: @config.rpcs.create_trigger.timeout,
373
436
  metadata: metadata,
374
437
  retry_policy: @config.rpcs.create_trigger.retry_policy
375
- options.apply_defaults metadata: @config.metadata,
438
+
439
+ options.apply_defaults timeout: @config.timeout,
440
+ metadata: @config.metadata,
376
441
  retry_policy: @config.retry_policy
377
442
 
378
443
  @eventarc_stub.call_rpc :create_trigger, request, options: options do |response, operation|
@@ -405,14 +470,14 @@ module Google
405
470
  # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash]
406
471
  # The trigger to be updated.
407
472
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
408
- # The fields to be updated; only fields explicitly provided will be updated.
409
- # If no field mask is provided, all provided fields in the request will be
473
+ # The fields to be updated; only fields explicitly provided are updated.
474
+ # If no field mask is provided, all provided fields in the request are
410
475
  # updated. To update all fields, provide a field mask of "*".
411
476
  # @param allow_missing [::Boolean]
412
477
  # If set to true, and the trigger is not found, a new trigger will be
413
478
  # created. In this situation, `update_mask` is ignored.
414
479
  # @param validate_only [::Boolean]
415
- # Required. If set, validate the request and preview the review, but do not actually
480
+ # Required. If set, validate the request and preview the review, but do not
416
481
  # post it.
417
482
  #
418
483
  # @yield [response, operation] Access the result along with the RPC operation
@@ -423,6 +488,28 @@ module Google
423
488
  #
424
489
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
425
490
  #
491
+ # @example Basic example
492
+ # require "google/cloud/eventarc/v1"
493
+ #
494
+ # # Create a client object. The client can be reused for multiple calls.
495
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
496
+ #
497
+ # # Create a request. To set request fields, pass in keyword arguments.
498
+ # request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new
499
+ #
500
+ # # Call the update_trigger method.
501
+ # result = client.update_trigger request
502
+ #
503
+ # # The returned object is of type Gapic::Operation. You can use this
504
+ # # object to check the status of an operation, cancel it, or wait
505
+ # # for results. Here is how to block until completion:
506
+ # result.wait_until_done! timeout: 60
507
+ # if result.response?
508
+ # p result.response
509
+ # else
510
+ # puts "Error!"
511
+ # end
512
+ #
426
513
  def update_trigger request, options = nil
427
514
  raise ::ArgumentError, "request must be provided" if request.nil?
428
515
 
@@ -440,16 +527,20 @@ module Google
440
527
  gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
441
528
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
442
529
 
443
- header_params = {
444
- "trigger.name" => request.trigger.name
445
- }
530
+ header_params = {}
531
+ if request.trigger&.name
532
+ header_params["trigger.name"] = request.trigger.name
533
+ end
534
+
446
535
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
447
536
  metadata[:"x-goog-request-params"] ||= request_params_header
448
537
 
449
538
  options.apply_defaults timeout: @config.rpcs.update_trigger.timeout,
450
539
  metadata: metadata,
451
540
  retry_policy: @config.rpcs.update_trigger.retry_policy
452
- options.apply_defaults metadata: @config.metadata,
541
+
542
+ options.apply_defaults timeout: @config.timeout,
543
+ metadata: @config.metadata,
453
544
  retry_policy: @config.retry_policy
454
545
 
455
546
  @eventarc_stub.call_rpc :update_trigger, request, options: options do |response, operation|
@@ -488,7 +579,7 @@ module Google
488
579
  # If set to true, and the trigger is not found, the request will succeed
489
580
  # but no action will be taken on the server.
490
581
  # @param validate_only [::Boolean]
491
- # Required. If set, validate the request and preview the review, but do not actually
582
+ # Required. If set, validate the request and preview the review, but do not
492
583
  # post it.
493
584
  #
494
585
  # @yield [response, operation] Access the result along with the RPC operation
@@ -499,6 +590,28 @@ module Google
499
590
  #
500
591
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
501
592
  #
593
+ # @example Basic example
594
+ # require "google/cloud/eventarc/v1"
595
+ #
596
+ # # Create a client object. The client can be reused for multiple calls.
597
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
598
+ #
599
+ # # Create a request. To set request fields, pass in keyword arguments.
600
+ # request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new
601
+ #
602
+ # # Call the delete_trigger method.
603
+ # result = client.delete_trigger request
604
+ #
605
+ # # The returned object is of type Gapic::Operation. You can use this
606
+ # # object to check the status of an operation, cancel it, or wait
607
+ # # for results. Here is how to block until completion:
608
+ # result.wait_until_done! timeout: 60
609
+ # if result.response?
610
+ # p result.response
611
+ # else
612
+ # puts "Error!"
613
+ # end
614
+ #
502
615
  def delete_trigger request, options = nil
503
616
  raise ::ArgumentError, "request must be provided" if request.nil?
504
617
 
@@ -516,16 +629,20 @@ module Google
516
629
  gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
517
630
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
518
631
 
519
- header_params = {
520
- "name" => request.name
521
- }
632
+ header_params = {}
633
+ if request.name
634
+ header_params["name"] = request.name
635
+ end
636
+
522
637
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
523
638
  metadata[:"x-goog-request-params"] ||= request_params_header
524
639
 
525
640
  options.apply_defaults timeout: @config.rpcs.delete_trigger.timeout,
526
641
  metadata: metadata,
527
642
  retry_policy: @config.rpcs.delete_trigger.retry_policy
528
- options.apply_defaults metadata: @config.metadata,
643
+
644
+ options.apply_defaults timeout: @config.timeout,
645
+ metadata: @config.metadata,
529
646
  retry_policy: @config.retry_policy
530
647
 
531
648
  @eventarc_stub.call_rpc :delete_trigger, request, options: options do |response, operation|
@@ -538,166 +655,1073 @@ module Google
538
655
  end
539
656
 
540
657
  ##
541
- # Configuration class for the Eventarc API.
658
+ # Get a single Channel.
542
659
  #
543
- # This class represents the configuration for Eventarc,
544
- # providing control over timeouts, retry behavior, logging, transport
545
- # parameters, and other low-level controls. Certain parameters can also be
546
- # applied individually to specific RPCs. See
547
- # {::Google::Cloud::Eventarc::V1::Eventarc::Client::Configuration::Rpcs}
548
- # for a list of RPCs that can be configured independently.
660
+ # @overload get_channel(request, options = nil)
661
+ # Pass arguments to `get_channel` via a request object, either of type
662
+ # {::Google::Cloud::Eventarc::V1::GetChannelRequest} or an equivalent Hash.
549
663
  #
550
- # Configuration can be applied globally to all clients, or to a single client
551
- # on construction.
664
+ # @param request [::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Hash]
665
+ # A request object representing the call parameters. Required. To specify no
666
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
667
+ # @param options [::Gapic::CallOptions, ::Hash]
668
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
552
669
  #
553
- # # Examples
670
+ # @overload get_channel(name: nil)
671
+ # Pass arguments to `get_channel` via keyword arguments. Note that at
672
+ # least one keyword argument is required. To specify no parameters, or to keep all
673
+ # the default parameter values, pass an empty Hash as a request object (see above).
554
674
  #
555
- # To modify the global config, setting the timeout for get_trigger
556
- # to 20 seconds, and all remaining timeouts to 10 seconds:
675
+ # @param name [::String]
676
+ # Required. The name of the channel to get.
557
677
  #
558
- # ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config|
559
- # config.timeout = 10.0
560
- # config.rpcs.get_trigger.timeout = 20.0
561
- # end
678
+ # @yield [response, operation] Access the result along with the RPC operation
679
+ # @yieldparam response [::Google::Cloud::Eventarc::V1::Channel]
680
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
562
681
  #
563
- # To apply the above configuration only to a new client:
682
+ # @return [::Google::Cloud::Eventarc::V1::Channel]
564
683
  #
565
- # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config|
566
- # config.timeout = 10.0
567
- # config.rpcs.get_trigger.timeout = 20.0
568
- # end
684
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
569
685
  #
570
- # @!attribute [rw] endpoint
571
- # The hostname or hostname:port of the service endpoint.
572
- # Defaults to `"eventarc.googleapis.com"`.
573
- # @return [::String]
574
- # @!attribute [rw] credentials
575
- # Credentials to send with calls. You may provide any of the following types:
576
- # * (`String`) The path to a service account key file in JSON format
577
- # * (`Hash`) A service account key as a Hash
578
- # * (`Google::Auth::Credentials`) A googleauth credentials object
579
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
580
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
581
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
582
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
583
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
584
- # * (`nil`) indicating no credentials
585
- # @return [::Object]
586
- # @!attribute [rw] scope
587
- # The OAuth scopes
588
- # @return [::Array<::String>]
589
- # @!attribute [rw] lib_name
590
- # The library name as recorded in instrumentation and logging
591
- # @return [::String]
592
- # @!attribute [rw] lib_version
593
- # The library version as recorded in instrumentation and logging
594
- # @return [::String]
595
- # @!attribute [rw] channel_args
596
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
597
- # `GRPC::Core::Channel` object is provided as the credential.
598
- # @return [::Hash]
599
- # @!attribute [rw] interceptors
600
- # An array of interceptors that are run before calls are executed.
601
- # @return [::Array<::GRPC::ClientInterceptor>]
602
- # @!attribute [rw] timeout
603
- # The call timeout in seconds.
604
- # @return [::Numeric]
605
- # @!attribute [rw] metadata
606
- # Additional gRPC headers to be sent with the call.
607
- # @return [::Hash{::Symbol=>::String}]
608
- # @!attribute [rw] retry_policy
609
- # The retry policy. The value is a hash with the following keys:
610
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
611
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
612
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
613
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
614
- # trigger a retry.
615
- # @return [::Hash]
616
- # @!attribute [rw] quota_project
617
- # A separate project against which to charge quota.
618
- # @return [::String]
686
+ # @example Basic example
687
+ # require "google/cloud/eventarc/v1"
619
688
  #
620
- class Configuration
621
- extend ::Gapic::Config
689
+ # # Create a client object. The client can be reused for multiple calls.
690
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
691
+ #
692
+ # # Create a request. To set request fields, pass in keyword arguments.
693
+ # request = Google::Cloud::Eventarc::V1::GetChannelRequest.new
694
+ #
695
+ # # Call the get_channel method.
696
+ # result = client.get_channel request
697
+ #
698
+ # # The returned object is of type Google::Cloud::Eventarc::V1::Channel.
699
+ # p result
700
+ #
701
+ def get_channel request, options = nil
702
+ raise ::ArgumentError, "request must be provided" if request.nil?
622
703
 
623
- config_attr :endpoint, "eventarc.googleapis.com", ::String
624
- config_attr :credentials, nil do |value|
625
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
626
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
627
- allowed.any? { |klass| klass === value }
704
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelRequest
705
+
706
+ # Converts hash and nil to an options object
707
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
708
+
709
+ # Customize the options with defaults
710
+ metadata = @config.rpcs.get_channel.metadata.to_h
711
+
712
+ # Set x-goog-api-client and x-goog-user-project headers
713
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
714
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
715
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
716
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
717
+
718
+ header_params = {}
719
+ if request.name
720
+ header_params["name"] = request.name
628
721
  end
629
- config_attr :scope, nil, ::String, ::Array, nil
630
- config_attr :lib_name, nil, ::String, nil
631
- config_attr :lib_version, nil, ::String, nil
632
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
633
- config_attr :interceptors, nil, ::Array, nil
634
- config_attr :timeout, nil, ::Numeric, nil
635
- config_attr :metadata, nil, ::Hash, nil
636
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
637
- config_attr :quota_project, nil, ::String, nil
638
722
 
639
- # @private
640
- def initialize parent_config = nil
641
- @parent_config = parent_config unless parent_config.nil?
723
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
724
+ metadata[:"x-goog-request-params"] ||= request_params_header
642
725
 
643
- yield self if block_given?
726
+ options.apply_defaults timeout: @config.rpcs.get_channel.timeout,
727
+ metadata: metadata,
728
+ retry_policy: @config.rpcs.get_channel.retry_policy
729
+
730
+ options.apply_defaults timeout: @config.timeout,
731
+ metadata: @config.metadata,
732
+ retry_policy: @config.retry_policy
733
+
734
+ @eventarc_stub.call_rpc :get_channel, request, options: options do |response, operation|
735
+ yield response, operation if block_given?
736
+ return response
644
737
  end
738
+ rescue ::GRPC::BadStatus => e
739
+ raise ::Google::Cloud::Error.from_error(e)
740
+ end
645
741
 
646
- ##
647
- # Configurations for individual RPCs
648
- # @return [Rpcs]
649
- #
650
- def rpcs
651
- @rpcs ||= begin
652
- parent_rpcs = nil
653
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
654
- Rpcs.new parent_rpcs
655
- end
742
+ ##
743
+ # List channels.
744
+ #
745
+ # @overload list_channels(request, options = nil)
746
+ # Pass arguments to `list_channels` via a request object, either of type
747
+ # {::Google::Cloud::Eventarc::V1::ListChannelsRequest} or an equivalent Hash.
748
+ #
749
+ # @param request [::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Hash]
750
+ # A request object representing the call parameters. Required. To specify no
751
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
752
+ # @param options [::Gapic::CallOptions, ::Hash]
753
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
754
+ #
755
+ # @overload list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil)
756
+ # Pass arguments to `list_channels` via keyword arguments. Note that at
757
+ # least one keyword argument is required. To specify no parameters, or to keep all
758
+ # the default parameter values, pass an empty Hash as a request object (see above).
759
+ #
760
+ # @param parent [::String]
761
+ # Required. The parent collection to list channels on.
762
+ # @param page_size [::Integer]
763
+ # The maximum number of channels to return on each page.
764
+ # Note: The service may send fewer.
765
+ # @param page_token [::String]
766
+ # The page token; provide the value from the `next_page_token` field in a
767
+ # previous `ListChannels` call to retrieve the subsequent page.
768
+ #
769
+ # When paginating, all other parameters provided to `ListChannels` must
770
+ # match the call that provided the page token.
771
+ # @param order_by [::String]
772
+ # The sorting order of the resources returned. Value should be a
773
+ # comma-separated list of fields. The default sorting order is ascending. To
774
+ # specify descending order for a field, append a `desc` suffix; for example:
775
+ # `name desc, channel_id`.
776
+ #
777
+ # @yield [response, operation] Access the result along with the RPC operation
778
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>]
779
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
780
+ #
781
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>]
782
+ #
783
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
784
+ #
785
+ # @example Basic example
786
+ # require "google/cloud/eventarc/v1"
787
+ #
788
+ # # Create a client object. The client can be reused for multiple calls.
789
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
790
+ #
791
+ # # Create a request. To set request fields, pass in keyword arguments.
792
+ # request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new
793
+ #
794
+ # # Call the list_channels method.
795
+ # result = client.list_channels request
796
+ #
797
+ # # The returned object is of type Gapic::PagedEnumerable. You can
798
+ # # iterate over all elements by calling #each, and the enumerable
799
+ # # will lazily make API calls to fetch subsequent pages. Other
800
+ # # methods are also available for managing paging directly.
801
+ # result.each do |response|
802
+ # # Each element is of type ::Google::Cloud::Eventarc::V1::Channel.
803
+ # p response
804
+ # end
805
+ #
806
+ def list_channels request, options = nil
807
+ raise ::ArgumentError, "request must be provided" if request.nil?
808
+
809
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelsRequest
810
+
811
+ # Converts hash and nil to an options object
812
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
813
+
814
+ # Customize the options with defaults
815
+ metadata = @config.rpcs.list_channels.metadata.to_h
816
+
817
+ # Set x-goog-api-client and x-goog-user-project headers
818
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
819
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
820
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
821
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
822
+
823
+ header_params = {}
824
+ if request.parent
825
+ header_params["parent"] = request.parent
656
826
  end
657
827
 
658
- ##
659
- # Configuration RPC class for the Eventarc API.
660
- #
661
- # Includes fields providing the configuration for each RPC in this service.
662
- # Each configuration object is of type `Gapic::Config::Method` and includes
663
- # the following configuration fields:
664
- #
665
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
666
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
667
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
668
- # include the following keys:
669
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
670
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
671
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
672
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
673
- # trigger a retry.
674
- #
675
- class Rpcs
676
- ##
677
- # RPC-specific configuration for `get_trigger`
678
- # @return [::Gapic::Config::Method]
679
- #
680
- attr_reader :get_trigger
681
- ##
682
- # RPC-specific configuration for `list_triggers`
683
- # @return [::Gapic::Config::Method]
684
- #
685
- attr_reader :list_triggers
686
- ##
687
- # RPC-specific configuration for `create_trigger`
688
- # @return [::Gapic::Config::Method]
689
- #
690
- attr_reader :create_trigger
691
- ##
692
- # RPC-specific configuration for `update_trigger`
693
- # @return [::Gapic::Config::Method]
694
- #
695
- attr_reader :update_trigger
696
- ##
697
- # RPC-specific configuration for `delete_trigger`
698
- # @return [::Gapic::Config::Method]
699
- #
700
- attr_reader :delete_trigger
828
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
829
+ metadata[:"x-goog-request-params"] ||= request_params_header
830
+
831
+ options.apply_defaults timeout: @config.rpcs.list_channels.timeout,
832
+ metadata: metadata,
833
+ retry_policy: @config.rpcs.list_channels.retry_policy
834
+
835
+ options.apply_defaults timeout: @config.timeout,
836
+ metadata: @config.metadata,
837
+ retry_policy: @config.retry_policy
838
+
839
+ @eventarc_stub.call_rpc :list_channels, request, options: options do |response, operation|
840
+ response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channels, request, response, operation, options
841
+ yield response, operation if block_given?
842
+ return response
843
+ end
844
+ rescue ::GRPC::BadStatus => e
845
+ raise ::Google::Cloud::Error.from_error(e)
846
+ end
847
+
848
+ ##
849
+ # Create a new channel in a particular project and location.
850
+ #
851
+ # @overload create_channel(request, options = nil)
852
+ # Pass arguments to `create_channel` via a request object, either of type
853
+ # {::Google::Cloud::Eventarc::V1::CreateChannelRequest} or an equivalent Hash.
854
+ #
855
+ # @param request [::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Hash]
856
+ # A request object representing the call parameters. Required. To specify no
857
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
858
+ # @param options [::Gapic::CallOptions, ::Hash]
859
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
860
+ #
861
+ # @overload create_channel(parent: nil, channel: nil, channel_id: nil, validate_only: nil)
862
+ # Pass arguments to `create_channel` via keyword arguments. Note that at
863
+ # least one keyword argument is required. To specify no parameters, or to keep all
864
+ # the default parameter values, pass an empty Hash as a request object (see above).
865
+ #
866
+ # @param parent [::String]
867
+ # Required. The parent collection in which to add this channel.
868
+ # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash]
869
+ # Required. The channel to create.
870
+ # @param channel_id [::String]
871
+ # Required. The user-provided ID to be assigned to the channel.
872
+ # @param validate_only [::Boolean]
873
+ # Required. If set, validate the request and preview the review, but do not
874
+ # post it.
875
+ #
876
+ # @yield [response, operation] Access the result along with the RPC operation
877
+ # @yieldparam response [::Gapic::Operation]
878
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
879
+ #
880
+ # @return [::Gapic::Operation]
881
+ #
882
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
883
+ #
884
+ # @example Basic example
885
+ # require "google/cloud/eventarc/v1"
886
+ #
887
+ # # Create a client object. The client can be reused for multiple calls.
888
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
889
+ #
890
+ # # Create a request. To set request fields, pass in keyword arguments.
891
+ # request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new
892
+ #
893
+ # # Call the create_channel method.
894
+ # result = client.create_channel request
895
+ #
896
+ # # The returned object is of type Gapic::Operation. You can use this
897
+ # # object to check the status of an operation, cancel it, or wait
898
+ # # for results. Here is how to block until completion:
899
+ # result.wait_until_done! timeout: 60
900
+ # if result.response?
901
+ # p result.response
902
+ # else
903
+ # puts "Error!"
904
+ # end
905
+ #
906
+ def create_channel request, options = nil
907
+ raise ::ArgumentError, "request must be provided" if request.nil?
908
+
909
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelRequest
910
+
911
+ # Converts hash and nil to an options object
912
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
913
+
914
+ # Customize the options with defaults
915
+ metadata = @config.rpcs.create_channel.metadata.to_h
916
+
917
+ # Set x-goog-api-client and x-goog-user-project headers
918
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
919
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
920
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
921
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
922
+
923
+ header_params = {}
924
+ if request.parent
925
+ header_params["parent"] = request.parent
926
+ end
927
+
928
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
929
+ metadata[:"x-goog-request-params"] ||= request_params_header
930
+
931
+ options.apply_defaults timeout: @config.rpcs.create_channel.timeout,
932
+ metadata: metadata,
933
+ retry_policy: @config.rpcs.create_channel.retry_policy
934
+
935
+ options.apply_defaults timeout: @config.timeout,
936
+ metadata: @config.metadata,
937
+ retry_policy: @config.retry_policy
938
+
939
+ @eventarc_stub.call_rpc :create_channel, request, options: options do |response, operation|
940
+ response = ::Gapic::Operation.new response, @operations_client, options: options
941
+ yield response, operation if block_given?
942
+ return response
943
+ end
944
+ rescue ::GRPC::BadStatus => e
945
+ raise ::Google::Cloud::Error.from_error(e)
946
+ end
947
+
948
+ ##
949
+ # Update a single channel.
950
+ #
951
+ # @overload update_channel(request, options = nil)
952
+ # Pass arguments to `update_channel` via a request object, either of type
953
+ # {::Google::Cloud::Eventarc::V1::UpdateChannelRequest} or an equivalent Hash.
954
+ #
955
+ # @param request [::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Hash]
956
+ # A request object representing the call parameters. Required. To specify no
957
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
958
+ # @param options [::Gapic::CallOptions, ::Hash]
959
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
960
+ #
961
+ # @overload update_channel(channel: nil, update_mask: nil, validate_only: nil)
962
+ # Pass arguments to `update_channel` via keyword arguments. Note that at
963
+ # least one keyword argument is required. To specify no parameters, or to keep all
964
+ # the default parameter values, pass an empty Hash as a request object (see above).
965
+ #
966
+ # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash]
967
+ # The channel to be updated.
968
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
969
+ # The fields to be updated; only fields explicitly provided are updated.
970
+ # If no field mask is provided, all provided fields in the request are
971
+ # updated. To update all fields, provide a field mask of "*".
972
+ # @param validate_only [::Boolean]
973
+ # Required. If set, validate the request and preview the review, but do not
974
+ # post it.
975
+ #
976
+ # @yield [response, operation] Access the result along with the RPC operation
977
+ # @yieldparam response [::Gapic::Operation]
978
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
979
+ #
980
+ # @return [::Gapic::Operation]
981
+ #
982
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
983
+ #
984
+ # @example Basic example
985
+ # require "google/cloud/eventarc/v1"
986
+ #
987
+ # # Create a client object. The client can be reused for multiple calls.
988
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
989
+ #
990
+ # # Create a request. To set request fields, pass in keyword arguments.
991
+ # request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new
992
+ #
993
+ # # Call the update_channel method.
994
+ # result = client.update_channel request
995
+ #
996
+ # # The returned object is of type Gapic::Operation. You can use this
997
+ # # object to check the status of an operation, cancel it, or wait
998
+ # # for results. Here is how to block until completion:
999
+ # result.wait_until_done! timeout: 60
1000
+ # if result.response?
1001
+ # p result.response
1002
+ # else
1003
+ # puts "Error!"
1004
+ # end
1005
+ #
1006
+ def update_channel request, options = nil
1007
+ raise ::ArgumentError, "request must be provided" if request.nil?
1008
+
1009
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateChannelRequest
1010
+
1011
+ # Converts hash and nil to an options object
1012
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1013
+
1014
+ # Customize the options with defaults
1015
+ metadata = @config.rpcs.update_channel.metadata.to_h
1016
+
1017
+ # Set x-goog-api-client and x-goog-user-project headers
1018
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1019
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1020
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1021
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1022
+
1023
+ header_params = {}
1024
+ if request.channel&.name
1025
+ header_params["channel.name"] = request.channel.name
1026
+ end
1027
+
1028
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1029
+ metadata[:"x-goog-request-params"] ||= request_params_header
1030
+
1031
+ options.apply_defaults timeout: @config.rpcs.update_channel.timeout,
1032
+ metadata: metadata,
1033
+ retry_policy: @config.rpcs.update_channel.retry_policy
1034
+
1035
+ options.apply_defaults timeout: @config.timeout,
1036
+ metadata: @config.metadata,
1037
+ retry_policy: @config.retry_policy
1038
+
1039
+ @eventarc_stub.call_rpc :update_channel, request, options: options do |response, operation|
1040
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1041
+ yield response, operation if block_given?
1042
+ return response
1043
+ end
1044
+ rescue ::GRPC::BadStatus => e
1045
+ raise ::Google::Cloud::Error.from_error(e)
1046
+ end
1047
+
1048
+ ##
1049
+ # Delete a single channel.
1050
+ #
1051
+ # @overload delete_channel(request, options = nil)
1052
+ # Pass arguments to `delete_channel` via a request object, either of type
1053
+ # {::Google::Cloud::Eventarc::V1::DeleteChannelRequest} or an equivalent Hash.
1054
+ #
1055
+ # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Hash]
1056
+ # A request object representing the call parameters. Required. To specify no
1057
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1058
+ # @param options [::Gapic::CallOptions, ::Hash]
1059
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1060
+ #
1061
+ # @overload delete_channel(name: nil, validate_only: nil)
1062
+ # Pass arguments to `delete_channel` via keyword arguments. Note that at
1063
+ # least one keyword argument is required. To specify no parameters, or to keep all
1064
+ # the default parameter values, pass an empty Hash as a request object (see above).
1065
+ #
1066
+ # @param name [::String]
1067
+ # Required. The name of the channel to be deleted.
1068
+ # @param validate_only [::Boolean]
1069
+ # Required. If set, validate the request and preview the review, but do not
1070
+ # post it.
1071
+ #
1072
+ # @yield [response, operation] Access the result along with the RPC operation
1073
+ # @yieldparam response [::Gapic::Operation]
1074
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1075
+ #
1076
+ # @return [::Gapic::Operation]
1077
+ #
1078
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1079
+ #
1080
+ # @example Basic example
1081
+ # require "google/cloud/eventarc/v1"
1082
+ #
1083
+ # # Create a client object. The client can be reused for multiple calls.
1084
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
1085
+ #
1086
+ # # Create a request. To set request fields, pass in keyword arguments.
1087
+ # request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new
1088
+ #
1089
+ # # Call the delete_channel method.
1090
+ # result = client.delete_channel request
1091
+ #
1092
+ # # The returned object is of type Gapic::Operation. You can use this
1093
+ # # object to check the status of an operation, cancel it, or wait
1094
+ # # for results. Here is how to block until completion:
1095
+ # result.wait_until_done! timeout: 60
1096
+ # if result.response?
1097
+ # p result.response
1098
+ # else
1099
+ # puts "Error!"
1100
+ # end
1101
+ #
1102
+ def delete_channel request, options = nil
1103
+ raise ::ArgumentError, "request must be provided" if request.nil?
1104
+
1105
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelRequest
1106
+
1107
+ # Converts hash and nil to an options object
1108
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1109
+
1110
+ # Customize the options with defaults
1111
+ metadata = @config.rpcs.delete_channel.metadata.to_h
1112
+
1113
+ # Set x-goog-api-client and x-goog-user-project headers
1114
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1115
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1116
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1117
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1118
+
1119
+ header_params = {}
1120
+ if request.name
1121
+ header_params["name"] = request.name
1122
+ end
1123
+
1124
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1125
+ metadata[:"x-goog-request-params"] ||= request_params_header
1126
+
1127
+ options.apply_defaults timeout: @config.rpcs.delete_channel.timeout,
1128
+ metadata: metadata,
1129
+ retry_policy: @config.rpcs.delete_channel.retry_policy
1130
+
1131
+ options.apply_defaults timeout: @config.timeout,
1132
+ metadata: @config.metadata,
1133
+ retry_policy: @config.retry_policy
1134
+
1135
+ @eventarc_stub.call_rpc :delete_channel, request, options: options do |response, operation|
1136
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1137
+ yield response, operation if block_given?
1138
+ return response
1139
+ end
1140
+ rescue ::GRPC::BadStatus => e
1141
+ raise ::Google::Cloud::Error.from_error(e)
1142
+ end
1143
+
1144
+ ##
1145
+ # Get a single ChannelConnection.
1146
+ #
1147
+ # @overload get_channel_connection(request, options = nil)
1148
+ # Pass arguments to `get_channel_connection` via a request object, either of type
1149
+ # {::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest} or an equivalent Hash.
1150
+ #
1151
+ # @param request [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Hash]
1152
+ # A request object representing the call parameters. Required. To specify no
1153
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1154
+ # @param options [::Gapic::CallOptions, ::Hash]
1155
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1156
+ #
1157
+ # @overload get_channel_connection(name: nil)
1158
+ # Pass arguments to `get_channel_connection` via keyword arguments. Note that at
1159
+ # least one keyword argument is required. To specify no parameters, or to keep all
1160
+ # the default parameter values, pass an empty Hash as a request object (see above).
1161
+ #
1162
+ # @param name [::String]
1163
+ # Required. The name of the channel connection to get.
1164
+ #
1165
+ # @yield [response, operation] Access the result along with the RPC operation
1166
+ # @yieldparam response [::Google::Cloud::Eventarc::V1::ChannelConnection]
1167
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1168
+ #
1169
+ # @return [::Google::Cloud::Eventarc::V1::ChannelConnection]
1170
+ #
1171
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1172
+ #
1173
+ # @example Basic example
1174
+ # require "google/cloud/eventarc/v1"
1175
+ #
1176
+ # # Create a client object. The client can be reused for multiple calls.
1177
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
1178
+ #
1179
+ # # Create a request. To set request fields, pass in keyword arguments.
1180
+ # request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new
1181
+ #
1182
+ # # Call the get_channel_connection method.
1183
+ # result = client.get_channel_connection request
1184
+ #
1185
+ # # The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection.
1186
+ # p result
1187
+ #
1188
+ def get_channel_connection request, options = nil
1189
+ raise ::ArgumentError, "request must be provided" if request.nil?
1190
+
1191
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest
1192
+
1193
+ # Converts hash and nil to an options object
1194
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1195
+
1196
+ # Customize the options with defaults
1197
+ metadata = @config.rpcs.get_channel_connection.metadata.to_h
1198
+
1199
+ # Set x-goog-api-client and x-goog-user-project headers
1200
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1201
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1202
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1203
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1204
+
1205
+ header_params = {}
1206
+ if request.name
1207
+ header_params["name"] = request.name
1208
+ end
1209
+
1210
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1211
+ metadata[:"x-goog-request-params"] ||= request_params_header
1212
+
1213
+ options.apply_defaults timeout: @config.rpcs.get_channel_connection.timeout,
1214
+ metadata: metadata,
1215
+ retry_policy: @config.rpcs.get_channel_connection.retry_policy
1216
+
1217
+ options.apply_defaults timeout: @config.timeout,
1218
+ metadata: @config.metadata,
1219
+ retry_policy: @config.retry_policy
1220
+
1221
+ @eventarc_stub.call_rpc :get_channel_connection, request, options: options do |response, operation|
1222
+ yield response, operation if block_given?
1223
+ return response
1224
+ end
1225
+ rescue ::GRPC::BadStatus => e
1226
+ raise ::Google::Cloud::Error.from_error(e)
1227
+ end
1228
+
1229
+ ##
1230
+ # List channel connections.
1231
+ #
1232
+ # @overload list_channel_connections(request, options = nil)
1233
+ # Pass arguments to `list_channel_connections` via a request object, either of type
1234
+ # {::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest} or an equivalent Hash.
1235
+ #
1236
+ # @param request [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Hash]
1237
+ # A request object representing the call parameters. Required. To specify no
1238
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1239
+ # @param options [::Gapic::CallOptions, ::Hash]
1240
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1241
+ #
1242
+ # @overload list_channel_connections(parent: nil, page_size: nil, page_token: nil)
1243
+ # Pass arguments to `list_channel_connections` via keyword arguments. Note that at
1244
+ # least one keyword argument is required. To specify no parameters, or to keep all
1245
+ # the default parameter values, pass an empty Hash as a request object (see above).
1246
+ #
1247
+ # @param parent [::String]
1248
+ # Required. The parent collection from which to list channel connections.
1249
+ # @param page_size [::Integer]
1250
+ # The maximum number of channel connections to return on each page.
1251
+ # Note: The service may send fewer responses.
1252
+ # @param page_token [::String]
1253
+ # The page token; provide the value from the `next_page_token` field in a
1254
+ # previous `ListChannelConnections` call to retrieve the subsequent page.
1255
+ #
1256
+ # When paginating, all other parameters provided to `ListChannelConnetions`
1257
+ # match the call that provided the page token.
1258
+ #
1259
+ # @yield [response, operation] Access the result along with the RPC operation
1260
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>]
1261
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1262
+ #
1263
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>]
1264
+ #
1265
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1266
+ #
1267
+ # @example Basic example
1268
+ # require "google/cloud/eventarc/v1"
1269
+ #
1270
+ # # Create a client object. The client can be reused for multiple calls.
1271
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
1272
+ #
1273
+ # # Create a request. To set request fields, pass in keyword arguments.
1274
+ # request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new
1275
+ #
1276
+ # # Call the list_channel_connections method.
1277
+ # result = client.list_channel_connections request
1278
+ #
1279
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1280
+ # # iterate over all elements by calling #each, and the enumerable
1281
+ # # will lazily make API calls to fetch subsequent pages. Other
1282
+ # # methods are also available for managing paging directly.
1283
+ # result.each do |response|
1284
+ # # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection.
1285
+ # p response
1286
+ # end
1287
+ #
1288
+ def list_channel_connections request, options = nil
1289
+ raise ::ArgumentError, "request must be provided" if request.nil?
1290
+
1291
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest
1292
+
1293
+ # Converts hash and nil to an options object
1294
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1295
+
1296
+ # Customize the options with defaults
1297
+ metadata = @config.rpcs.list_channel_connections.metadata.to_h
1298
+
1299
+ # Set x-goog-api-client and x-goog-user-project headers
1300
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1301
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1302
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1303
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1304
+
1305
+ header_params = {}
1306
+ if request.parent
1307
+ header_params["parent"] = request.parent
1308
+ end
1309
+
1310
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1311
+ metadata[:"x-goog-request-params"] ||= request_params_header
1312
+
1313
+ options.apply_defaults timeout: @config.rpcs.list_channel_connections.timeout,
1314
+ metadata: metadata,
1315
+ retry_policy: @config.rpcs.list_channel_connections.retry_policy
1316
+
1317
+ options.apply_defaults timeout: @config.timeout,
1318
+ metadata: @config.metadata,
1319
+ retry_policy: @config.retry_policy
1320
+
1321
+ @eventarc_stub.call_rpc :list_channel_connections, request, options: options do |response, operation|
1322
+ response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channel_connections, request, response, operation, options
1323
+ yield response, operation if block_given?
1324
+ return response
1325
+ end
1326
+ rescue ::GRPC::BadStatus => e
1327
+ raise ::Google::Cloud::Error.from_error(e)
1328
+ end
1329
+
1330
+ ##
1331
+ # Create a new ChannelConnection in a particular project and location.
1332
+ #
1333
+ # @overload create_channel_connection(request, options = nil)
1334
+ # Pass arguments to `create_channel_connection` via a request object, either of type
1335
+ # {::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest} or an equivalent Hash.
1336
+ #
1337
+ # @param request [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Hash]
1338
+ # A request object representing the call parameters. Required. To specify no
1339
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1340
+ # @param options [::Gapic::CallOptions, ::Hash]
1341
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1342
+ #
1343
+ # @overload create_channel_connection(parent: nil, channel_connection: nil, channel_connection_id: nil)
1344
+ # Pass arguments to `create_channel_connection` via keyword arguments. Note that at
1345
+ # least one keyword argument is required. To specify no parameters, or to keep all
1346
+ # the default parameter values, pass an empty Hash as a request object (see above).
1347
+ #
1348
+ # @param parent [::String]
1349
+ # Required. The parent collection in which to add this channel connection.
1350
+ # @param channel_connection [::Google::Cloud::Eventarc::V1::ChannelConnection, ::Hash]
1351
+ # Required. Channel connection to create.
1352
+ # @param channel_connection_id [::String]
1353
+ # Required. The user-provided ID to be assigned to the channel connection.
1354
+ #
1355
+ # @yield [response, operation] Access the result along with the RPC operation
1356
+ # @yieldparam response [::Gapic::Operation]
1357
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1358
+ #
1359
+ # @return [::Gapic::Operation]
1360
+ #
1361
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1362
+ #
1363
+ # @example Basic example
1364
+ # require "google/cloud/eventarc/v1"
1365
+ #
1366
+ # # Create a client object. The client can be reused for multiple calls.
1367
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
1368
+ #
1369
+ # # Create a request. To set request fields, pass in keyword arguments.
1370
+ # request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new
1371
+ #
1372
+ # # Call the create_channel_connection method.
1373
+ # result = client.create_channel_connection request
1374
+ #
1375
+ # # The returned object is of type Gapic::Operation. You can use this
1376
+ # # object to check the status of an operation, cancel it, or wait
1377
+ # # for results. Here is how to block until completion:
1378
+ # result.wait_until_done! timeout: 60
1379
+ # if result.response?
1380
+ # p result.response
1381
+ # else
1382
+ # puts "Error!"
1383
+ # end
1384
+ #
1385
+ def create_channel_connection request, options = nil
1386
+ raise ::ArgumentError, "request must be provided" if request.nil?
1387
+
1388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest
1389
+
1390
+ # Converts hash and nil to an options object
1391
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1392
+
1393
+ # Customize the options with defaults
1394
+ metadata = @config.rpcs.create_channel_connection.metadata.to_h
1395
+
1396
+ # Set x-goog-api-client and x-goog-user-project headers
1397
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1398
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1399
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1400
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1401
+
1402
+ header_params = {}
1403
+ if request.parent
1404
+ header_params["parent"] = request.parent
1405
+ end
1406
+
1407
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1408
+ metadata[:"x-goog-request-params"] ||= request_params_header
1409
+
1410
+ options.apply_defaults timeout: @config.rpcs.create_channel_connection.timeout,
1411
+ metadata: metadata,
1412
+ retry_policy: @config.rpcs.create_channel_connection.retry_policy
1413
+
1414
+ options.apply_defaults timeout: @config.timeout,
1415
+ metadata: @config.metadata,
1416
+ retry_policy: @config.retry_policy
1417
+
1418
+ @eventarc_stub.call_rpc :create_channel_connection, request, options: options do |response, operation|
1419
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1420
+ yield response, operation if block_given?
1421
+ return response
1422
+ end
1423
+ rescue ::GRPC::BadStatus => e
1424
+ raise ::Google::Cloud::Error.from_error(e)
1425
+ end
1426
+
1427
+ ##
1428
+ # Delete a single ChannelConnection.
1429
+ #
1430
+ # @overload delete_channel_connection(request, options = nil)
1431
+ # Pass arguments to `delete_channel_connection` via a request object, either of type
1432
+ # {::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest} or an equivalent Hash.
1433
+ #
1434
+ # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Hash]
1435
+ # A request object representing the call parameters. Required. To specify no
1436
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1437
+ # @param options [::Gapic::CallOptions, ::Hash]
1438
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1439
+ #
1440
+ # @overload delete_channel_connection(name: nil)
1441
+ # Pass arguments to `delete_channel_connection` via keyword arguments. Note that at
1442
+ # least one keyword argument is required. To specify no parameters, or to keep all
1443
+ # the default parameter values, pass an empty Hash as a request object (see above).
1444
+ #
1445
+ # @param name [::String]
1446
+ # Required. The name of the channel connection to delete.
1447
+ #
1448
+ # @yield [response, operation] Access the result along with the RPC operation
1449
+ # @yieldparam response [::Gapic::Operation]
1450
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1451
+ #
1452
+ # @return [::Gapic::Operation]
1453
+ #
1454
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1455
+ #
1456
+ # @example Basic example
1457
+ # require "google/cloud/eventarc/v1"
1458
+ #
1459
+ # # Create a client object. The client can be reused for multiple calls.
1460
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
1461
+ #
1462
+ # # Create a request. To set request fields, pass in keyword arguments.
1463
+ # request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new
1464
+ #
1465
+ # # Call the delete_channel_connection method.
1466
+ # result = client.delete_channel_connection request
1467
+ #
1468
+ # # The returned object is of type Gapic::Operation. You can use this
1469
+ # # object to check the status of an operation, cancel it, or wait
1470
+ # # for results. Here is how to block until completion:
1471
+ # result.wait_until_done! timeout: 60
1472
+ # if result.response?
1473
+ # p result.response
1474
+ # else
1475
+ # puts "Error!"
1476
+ # end
1477
+ #
1478
+ def delete_channel_connection request, options = nil
1479
+ raise ::ArgumentError, "request must be provided" if request.nil?
1480
+
1481
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest
1482
+
1483
+ # Converts hash and nil to an options object
1484
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1485
+
1486
+ # Customize the options with defaults
1487
+ metadata = @config.rpcs.delete_channel_connection.metadata.to_h
1488
+
1489
+ # Set x-goog-api-client and x-goog-user-project headers
1490
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1491
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1492
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1493
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1494
+
1495
+ header_params = {}
1496
+ if request.name
1497
+ header_params["name"] = request.name
1498
+ end
1499
+
1500
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1501
+ metadata[:"x-goog-request-params"] ||= request_params_header
1502
+
1503
+ options.apply_defaults timeout: @config.rpcs.delete_channel_connection.timeout,
1504
+ metadata: metadata,
1505
+ retry_policy: @config.rpcs.delete_channel_connection.retry_policy
1506
+
1507
+ options.apply_defaults timeout: @config.timeout,
1508
+ metadata: @config.metadata,
1509
+ retry_policy: @config.retry_policy
1510
+
1511
+ @eventarc_stub.call_rpc :delete_channel_connection, request, options: options do |response, operation|
1512
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1513
+ yield response, operation if block_given?
1514
+ return response
1515
+ end
1516
+ rescue ::GRPC::BadStatus => e
1517
+ raise ::Google::Cloud::Error.from_error(e)
1518
+ end
1519
+
1520
+ ##
1521
+ # Configuration class for the Eventarc API.
1522
+ #
1523
+ # This class represents the configuration for Eventarc,
1524
+ # providing control over timeouts, retry behavior, logging, transport
1525
+ # parameters, and other low-level controls. Certain parameters can also be
1526
+ # applied individually to specific RPCs. See
1527
+ # {::Google::Cloud::Eventarc::V1::Eventarc::Client::Configuration::Rpcs}
1528
+ # for a list of RPCs that can be configured independently.
1529
+ #
1530
+ # Configuration can be applied globally to all clients, or to a single client
1531
+ # on construction.
1532
+ #
1533
+ # @example
1534
+ #
1535
+ # # Modify the global config, setting the timeout for
1536
+ # # get_trigger to 20 seconds,
1537
+ # # and all remaining timeouts to 10 seconds.
1538
+ # ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config|
1539
+ # config.timeout = 10.0
1540
+ # config.rpcs.get_trigger.timeout = 20.0
1541
+ # end
1542
+ #
1543
+ # # Apply the above configuration only to a new client.
1544
+ # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config|
1545
+ # config.timeout = 10.0
1546
+ # config.rpcs.get_trigger.timeout = 20.0
1547
+ # end
1548
+ #
1549
+ # @!attribute [rw] endpoint
1550
+ # The hostname or hostname:port of the service endpoint.
1551
+ # Defaults to `"eventarc.googleapis.com"`.
1552
+ # @return [::String]
1553
+ # @!attribute [rw] credentials
1554
+ # Credentials to send with calls. You may provide any of the following types:
1555
+ # * (`String`) The path to a service account key file in JSON format
1556
+ # * (`Hash`) A service account key as a Hash
1557
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1558
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1559
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1560
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1561
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1562
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1563
+ # * (`nil`) indicating no credentials
1564
+ # @return [::Object]
1565
+ # @!attribute [rw] scope
1566
+ # The OAuth scopes
1567
+ # @return [::Array<::String>]
1568
+ # @!attribute [rw] lib_name
1569
+ # The library name as recorded in instrumentation and logging
1570
+ # @return [::String]
1571
+ # @!attribute [rw] lib_version
1572
+ # The library version as recorded in instrumentation and logging
1573
+ # @return [::String]
1574
+ # @!attribute [rw] channel_args
1575
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1576
+ # `GRPC::Core::Channel` object is provided as the credential.
1577
+ # @return [::Hash]
1578
+ # @!attribute [rw] interceptors
1579
+ # An array of interceptors that are run before calls are executed.
1580
+ # @return [::Array<::GRPC::ClientInterceptor>]
1581
+ # @!attribute [rw] timeout
1582
+ # The call timeout in seconds.
1583
+ # @return [::Numeric]
1584
+ # @!attribute [rw] metadata
1585
+ # Additional gRPC headers to be sent with the call.
1586
+ # @return [::Hash{::Symbol=>::String}]
1587
+ # @!attribute [rw] retry_policy
1588
+ # The retry policy. The value is a hash with the following keys:
1589
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1590
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1591
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1592
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1593
+ # trigger a retry.
1594
+ # @return [::Hash]
1595
+ # @!attribute [rw] quota_project
1596
+ # A separate project against which to charge quota.
1597
+ # @return [::String]
1598
+ #
1599
+ class Configuration
1600
+ extend ::Gapic::Config
1601
+
1602
+ config_attr :endpoint, "eventarc.googleapis.com", ::String
1603
+ config_attr :credentials, nil do |value|
1604
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1605
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1606
+ allowed.any? { |klass| klass === value }
1607
+ end
1608
+ config_attr :scope, nil, ::String, ::Array, nil
1609
+ config_attr :lib_name, nil, ::String, nil
1610
+ config_attr :lib_version, nil, ::String, nil
1611
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1612
+ config_attr :interceptors, nil, ::Array, nil
1613
+ config_attr :timeout, nil, ::Numeric, nil
1614
+ config_attr :metadata, nil, ::Hash, nil
1615
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1616
+ config_attr :quota_project, nil, ::String, nil
1617
+
1618
+ # @private
1619
+ def initialize parent_config = nil
1620
+ @parent_config = parent_config unless parent_config.nil?
1621
+
1622
+ yield self if block_given?
1623
+ end
1624
+
1625
+ ##
1626
+ # Configurations for individual RPCs
1627
+ # @return [Rpcs]
1628
+ #
1629
+ def rpcs
1630
+ @rpcs ||= begin
1631
+ parent_rpcs = nil
1632
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1633
+ Rpcs.new parent_rpcs
1634
+ end
1635
+ end
1636
+
1637
+ ##
1638
+ # Configuration RPC class for the Eventarc API.
1639
+ #
1640
+ # Includes fields providing the configuration for each RPC in this service.
1641
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1642
+ # the following configuration fields:
1643
+ #
1644
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1645
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1646
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1647
+ # include the following keys:
1648
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1649
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1650
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1651
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1652
+ # trigger a retry.
1653
+ #
1654
+ class Rpcs
1655
+ ##
1656
+ # RPC-specific configuration for `get_trigger`
1657
+ # @return [::Gapic::Config::Method]
1658
+ #
1659
+ attr_reader :get_trigger
1660
+ ##
1661
+ # RPC-specific configuration for `list_triggers`
1662
+ # @return [::Gapic::Config::Method]
1663
+ #
1664
+ attr_reader :list_triggers
1665
+ ##
1666
+ # RPC-specific configuration for `create_trigger`
1667
+ # @return [::Gapic::Config::Method]
1668
+ #
1669
+ attr_reader :create_trigger
1670
+ ##
1671
+ # RPC-specific configuration for `update_trigger`
1672
+ # @return [::Gapic::Config::Method]
1673
+ #
1674
+ attr_reader :update_trigger
1675
+ ##
1676
+ # RPC-specific configuration for `delete_trigger`
1677
+ # @return [::Gapic::Config::Method]
1678
+ #
1679
+ attr_reader :delete_trigger
1680
+ ##
1681
+ # RPC-specific configuration for `get_channel`
1682
+ # @return [::Gapic::Config::Method]
1683
+ #
1684
+ attr_reader :get_channel
1685
+ ##
1686
+ # RPC-specific configuration for `list_channels`
1687
+ # @return [::Gapic::Config::Method]
1688
+ #
1689
+ attr_reader :list_channels
1690
+ ##
1691
+ # RPC-specific configuration for `create_channel`
1692
+ # @return [::Gapic::Config::Method]
1693
+ #
1694
+ attr_reader :create_channel
1695
+ ##
1696
+ # RPC-specific configuration for `update_channel`
1697
+ # @return [::Gapic::Config::Method]
1698
+ #
1699
+ attr_reader :update_channel
1700
+ ##
1701
+ # RPC-specific configuration for `delete_channel`
1702
+ # @return [::Gapic::Config::Method]
1703
+ #
1704
+ attr_reader :delete_channel
1705
+ ##
1706
+ # RPC-specific configuration for `get_channel_connection`
1707
+ # @return [::Gapic::Config::Method]
1708
+ #
1709
+ attr_reader :get_channel_connection
1710
+ ##
1711
+ # RPC-specific configuration for `list_channel_connections`
1712
+ # @return [::Gapic::Config::Method]
1713
+ #
1714
+ attr_reader :list_channel_connections
1715
+ ##
1716
+ # RPC-specific configuration for `create_channel_connection`
1717
+ # @return [::Gapic::Config::Method]
1718
+ #
1719
+ attr_reader :create_channel_connection
1720
+ ##
1721
+ # RPC-specific configuration for `delete_channel_connection`
1722
+ # @return [::Gapic::Config::Method]
1723
+ #
1724
+ attr_reader :delete_channel_connection
701
1725
 
702
1726
  # @private
703
1727
  def initialize parent_rpcs = nil
@@ -711,6 +1735,24 @@ module Google
711
1735
  @update_trigger = ::Gapic::Config::Method.new update_trigger_config
712
1736
  delete_trigger_config = parent_rpcs.delete_trigger if parent_rpcs.respond_to? :delete_trigger
713
1737
  @delete_trigger = ::Gapic::Config::Method.new delete_trigger_config
1738
+ get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel
1739
+ @get_channel = ::Gapic::Config::Method.new get_channel_config
1740
+ list_channels_config = parent_rpcs.list_channels if parent_rpcs.respond_to? :list_channels
1741
+ @list_channels = ::Gapic::Config::Method.new list_channels_config
1742
+ create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel
1743
+ @create_channel = ::Gapic::Config::Method.new create_channel_config
1744
+ update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel
1745
+ @update_channel = ::Gapic::Config::Method.new update_channel_config
1746
+ delete_channel_config = parent_rpcs.delete_channel if parent_rpcs.respond_to? :delete_channel
1747
+ @delete_channel = ::Gapic::Config::Method.new delete_channel_config
1748
+ get_channel_connection_config = parent_rpcs.get_channel_connection if parent_rpcs.respond_to? :get_channel_connection
1749
+ @get_channel_connection = ::Gapic::Config::Method.new get_channel_connection_config
1750
+ list_channel_connections_config = parent_rpcs.list_channel_connections if parent_rpcs.respond_to? :list_channel_connections
1751
+ @list_channel_connections = ::Gapic::Config::Method.new list_channel_connections_config
1752
+ create_channel_connection_config = parent_rpcs.create_channel_connection if parent_rpcs.respond_to? :create_channel_connection
1753
+ @create_channel_connection = ::Gapic::Config::Method.new create_channel_connection_config
1754
+ delete_channel_connection_config = parent_rpcs.delete_channel_connection if parent_rpcs.respond_to? :delete_channel_connection
1755
+ @delete_channel_connection = ::Gapic::Config::Method.new delete_channel_connection_config
714
1756
 
715
1757
  yield self if block_given?
716
1758
  end