google-cloud-eventarc-v1 0.4.0 → 0.6.0

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