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
@@ -18,6 +18,8 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/eventarc/v1/eventarc_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
21
23
 
22
24
  module Google
23
25
  module Cloud
@@ -140,6 +142,18 @@ module Google
140
142
  config.endpoint = @config.endpoint
141
143
  end
142
144
 
145
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
146
+ config.credentials = credentials
147
+ config.quota_project = @quota_project_id
148
+ config.endpoint = @config.endpoint
149
+ end
150
+
151
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ end
156
+
143
157
  @eventarc_stub = ::Gapic::ServiceStub.new(
144
158
  ::Google::Cloud::Eventarc::V1::Eventarc::Stub,
145
159
  credentials: credentials,
@@ -156,6 +170,20 @@ module Google
156
170
  #
157
171
  attr_reader :operations_client
158
172
 
173
+ ##
174
+ # Get the associated client for mix-in of the Locations.
175
+ #
176
+ # @return [Google::Cloud::Location::Locations::Client]
177
+ #
178
+ attr_reader :location_client
179
+
180
+ ##
181
+ # Get the associated client for mix-in of the IAMPolicy.
182
+ #
183
+ # @return [Google::Iam::V1::IAMPolicy::Client]
184
+ #
185
+ attr_reader :iam_policy_client
186
+
159
187
  # Service calls
160
188
 
161
189
  ##
@@ -256,7 +284,7 @@ module Google
256
284
  # @param options [::Gapic::CallOptions, ::Hash]
257
285
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
258
286
  #
259
- # @overload list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil)
287
+ # @overload list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
260
288
  # Pass arguments to `list_triggers` via keyword arguments. Note that at
261
289
  # least one keyword argument is required. To specify no parameters, or to keep all
262
290
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -265,6 +293,7 @@ module Google
265
293
  # Required. The parent collection to list triggers on.
266
294
  # @param page_size [::Integer]
267
295
  # The maximum number of triggers to return on each page.
296
+ #
268
297
  # Note: The service may send fewer.
269
298
  # @param page_token [::String]
270
299
  # The page token; provide the value from the `next_page_token` field in a
@@ -277,6 +306,10 @@ module Google
277
306
  # comma-separated list of fields. The default sorting order is ascending. To
278
307
  # specify descending order for a field, append a `desc` suffix; for example:
279
308
  # `name desc, trigger_id`.
309
+ # @param filter [::String]
310
+ # Filter field. Used to filter the Triggers to be listed. Possible filters
311
+ # are described in https://google.aip.dev/160. For example, using
312
+ # "?filter=destination:gke" would list only Triggers with a gke destination.
280
313
  #
281
314
  # @yield [response, operation] Access the result along with the RPC operation
282
315
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>]
@@ -298,13 +331,11 @@ module Google
298
331
  # # Call the list_triggers method.
299
332
  # result = client.list_triggers request
300
333
  #
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|
334
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
335
+ # # over elements, and API calls will be issued to fetch pages as needed.
336
+ # result.each do |item|
306
337
  # # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger.
307
- # p response
338
+ # p item
308
339
  # end
309
340
  #
310
341
  def list_triggers request, options = nil
@@ -397,14 +428,14 @@ module Google
397
428
  # # Call the create_trigger method.
398
429
  # result = client.create_trigger request
399
430
  #
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:
431
+ # # The returned object is of type Gapic::Operation. You can use it to
432
+ # # check the status of an operation, cancel it, or wait for results.
433
+ # # Here is how to wait for a response.
403
434
  # result.wait_until_done! timeout: 60
404
435
  # if result.response?
405
436
  # p result.response
406
437
  # else
407
- # puts "Error!"
438
+ # puts "No response received."
408
439
  # end
409
440
  #
410
441
  def create_trigger request, options = nil
@@ -500,14 +531,14 @@ module Google
500
531
  # # Call the update_trigger method.
501
532
  # result = client.update_trigger request
502
533
  #
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:
534
+ # # The returned object is of type Gapic::Operation. You can use it to
535
+ # # check the status of an operation, cancel it, or wait for results.
536
+ # # Here is how to wait for a response.
506
537
  # result.wait_until_done! timeout: 60
507
538
  # if result.response?
508
539
  # p result.response
509
540
  # else
510
- # puts "Error!"
541
+ # puts "No response received."
511
542
  # end
512
543
  #
513
544
  def update_trigger request, options = nil
@@ -602,14 +633,14 @@ module Google
602
633
  # # Call the delete_trigger method.
603
634
  # result = client.delete_trigger request
604
635
  #
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:
636
+ # # The returned object is of type Gapic::Operation. You can use it to
637
+ # # check the status of an operation, cancel it, or wait for results.
638
+ # # Here is how to wait for a response.
608
639
  # result.wait_until_done! timeout: 60
609
640
  # if result.response?
610
641
  # p result.response
611
642
  # else
612
- # puts "Error!"
643
+ # puts "No response received."
613
644
  # end
614
645
  #
615
646
  def delete_trigger request, options = nil
@@ -761,6 +792,7 @@ module Google
761
792
  # Required. The parent collection to list channels on.
762
793
  # @param page_size [::Integer]
763
794
  # The maximum number of channels to return on each page.
795
+ #
764
796
  # Note: The service may send fewer.
765
797
  # @param page_token [::String]
766
798
  # The page token; provide the value from the `next_page_token` field in a
@@ -794,13 +826,11 @@ module Google
794
826
  # # Call the list_channels method.
795
827
  # result = client.list_channels request
796
828
  #
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|
829
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
830
+ # # over elements, and API calls will be issued to fetch pages as needed.
831
+ # result.each do |item|
802
832
  # # Each element is of type ::Google::Cloud::Eventarc::V1::Channel.
803
- # p response
833
+ # p item
804
834
  # end
805
835
  #
806
836
  def list_channels request, options = nil
@@ -893,14 +923,14 @@ module Google
893
923
  # # Call the create_channel method.
894
924
  # result = client.create_channel request
895
925
  #
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:
926
+ # # The returned object is of type Gapic::Operation. You can use it to
927
+ # # check the status of an operation, cancel it, or wait for results.
928
+ # # Here is how to wait for a response.
899
929
  # result.wait_until_done! timeout: 60
900
930
  # if result.response?
901
931
  # p result.response
902
932
  # else
903
- # puts "Error!"
933
+ # puts "No response received."
904
934
  # end
905
935
  #
906
936
  def create_channel request, options = nil
@@ -993,14 +1023,14 @@ module Google
993
1023
  # # Call the update_channel method.
994
1024
  # result = client.update_channel request
995
1025
  #
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:
1026
+ # # The returned object is of type Gapic::Operation. You can use it to
1027
+ # # check the status of an operation, cancel it, or wait for results.
1028
+ # # Here is how to wait for a response.
999
1029
  # result.wait_until_done! timeout: 60
1000
1030
  # if result.response?
1001
1031
  # p result.response
1002
1032
  # else
1003
- # puts "Error!"
1033
+ # puts "No response received."
1004
1034
  # end
1005
1035
  #
1006
1036
  def update_channel request, options = nil
@@ -1089,14 +1119,14 @@ module Google
1089
1119
  # # Call the delete_channel method.
1090
1120
  # result = client.delete_channel request
1091
1121
  #
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:
1122
+ # # The returned object is of type Gapic::Operation. You can use it to
1123
+ # # check the status of an operation, cancel it, or wait for results.
1124
+ # # Here is how to wait for a response.
1095
1125
  # result.wait_until_done! timeout: 60
1096
1126
  # if result.response?
1097
1127
  # p result.response
1098
1128
  # else
1099
- # puts "Error!"
1129
+ # puts "No response received."
1100
1130
  # end
1101
1131
  #
1102
1132
  def delete_channel request, options = nil
@@ -1282,13 +1312,11 @@ module Google
1282
1312
  # # Call the list_providers method.
1283
1313
  # result = client.list_providers request
1284
1314
  #
1285
- # # The returned object is of type Gapic::PagedEnumerable. You can
1286
- # # iterate over all elements by calling #each, and the enumerable
1287
- # # will lazily make API calls to fetch subsequent pages. Other
1288
- # # methods are also available for managing paging directly.
1289
- # result.each do |response|
1315
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1316
+ # # over elements, and API calls will be issued to fetch pages as needed.
1317
+ # result.each do |item|
1290
1318
  # # Each element is of type ::Google::Cloud::Eventarc::V1::Provider.
1291
- # p response
1319
+ # p item
1292
1320
  # end
1293
1321
  #
1294
1322
  def list_providers request, options = nil
@@ -1440,6 +1468,7 @@ module Google
1440
1468
  # Required. The parent collection from which to list channel connections.
1441
1469
  # @param page_size [::Integer]
1442
1470
  # The maximum number of channel connections to return on each page.
1471
+ #
1443
1472
  # Note: The service may send fewer responses.
1444
1473
  # @param page_token [::String]
1445
1474
  # The page token; provide the value from the `next_page_token` field in a
@@ -1468,13 +1497,11 @@ module Google
1468
1497
  # # Call the list_channel_connections method.
1469
1498
  # result = client.list_channel_connections request
1470
1499
  #
1471
- # # The returned object is of type Gapic::PagedEnumerable. You can
1472
- # # iterate over all elements by calling #each, and the enumerable
1473
- # # will lazily make API calls to fetch subsequent pages. Other
1474
- # # methods are also available for managing paging directly.
1475
- # result.each do |response|
1500
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1501
+ # # over elements, and API calls will be issued to fetch pages as needed.
1502
+ # result.each do |item|
1476
1503
  # # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection.
1477
- # p response
1504
+ # p item
1478
1505
  # end
1479
1506
  #
1480
1507
  def list_channel_connections request, options = nil
@@ -1564,14 +1591,14 @@ module Google
1564
1591
  # # Call the create_channel_connection method.
1565
1592
  # result = client.create_channel_connection request
1566
1593
  #
1567
- # # The returned object is of type Gapic::Operation. You can use this
1568
- # # object to check the status of an operation, cancel it, or wait
1569
- # # for results. Here is how to block until completion:
1594
+ # # The returned object is of type Gapic::Operation. You can use it to
1595
+ # # check the status of an operation, cancel it, or wait for results.
1596
+ # # Here is how to wait for a response.
1570
1597
  # result.wait_until_done! timeout: 60
1571
1598
  # if result.response?
1572
1599
  # p result.response
1573
1600
  # else
1574
- # puts "Error!"
1601
+ # puts "No response received."
1575
1602
  # end
1576
1603
  #
1577
1604
  def create_channel_connection request, options = nil
@@ -1657,14 +1684,14 @@ module Google
1657
1684
  # # Call the delete_channel_connection method.
1658
1685
  # result = client.delete_channel_connection request
1659
1686
  #
1660
- # # The returned object is of type Gapic::Operation. You can use this
1661
- # # object to check the status of an operation, cancel it, or wait
1662
- # # for results. Here is how to block until completion:
1687
+ # # The returned object is of type Gapic::Operation. You can use it to
1688
+ # # check the status of an operation, cancel it, or wait for results.
1689
+ # # Here is how to wait for a response.
1663
1690
  # result.wait_until_done! timeout: 60
1664
1691
  # if result.response?
1665
1692
  # p result.response
1666
1693
  # else
1667
- # puts "Error!"
1694
+ # puts "No response received."
1668
1695
  # end
1669
1696
  #
1670
1697
  def delete_channel_connection request, options = nil
@@ -1709,6 +1736,180 @@ module Google
1709
1736
  raise ::Google::Cloud::Error.from_error(e)
1710
1737
  end
1711
1738
 
1739
+ ##
1740
+ # Get a GoogleChannelConfig
1741
+ #
1742
+ # @overload get_google_channel_config(request, options = nil)
1743
+ # Pass arguments to `get_google_channel_config` via a request object, either of type
1744
+ # {::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest} or an equivalent Hash.
1745
+ #
1746
+ # @param request [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Hash]
1747
+ # A request object representing the call parameters. Required. To specify no
1748
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1749
+ # @param options [::Gapic::CallOptions, ::Hash]
1750
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1751
+ #
1752
+ # @overload get_google_channel_config(name: nil)
1753
+ # Pass arguments to `get_google_channel_config` via keyword arguments. Note that at
1754
+ # least one keyword argument is required. To specify no parameters, or to keep all
1755
+ # the default parameter values, pass an empty Hash as a request object (see above).
1756
+ #
1757
+ # @param name [::String]
1758
+ # Required. The name of the config to get.
1759
+ #
1760
+ # @yield [response, operation] Access the result along with the RPC operation
1761
+ # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleChannelConfig]
1762
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1763
+ #
1764
+ # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig]
1765
+ #
1766
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1767
+ #
1768
+ # @example Basic example
1769
+ # require "google/cloud/eventarc/v1"
1770
+ #
1771
+ # # Create a client object. The client can be reused for multiple calls.
1772
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
1773
+ #
1774
+ # # Create a request. To set request fields, pass in keyword arguments.
1775
+ # request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new
1776
+ #
1777
+ # # Call the get_google_channel_config method.
1778
+ # result = client.get_google_channel_config request
1779
+ #
1780
+ # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig.
1781
+ # p result
1782
+ #
1783
+ def get_google_channel_config request, options = nil
1784
+ raise ::ArgumentError, "request must be provided" if request.nil?
1785
+
1786
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest
1787
+
1788
+ # Converts hash and nil to an options object
1789
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1790
+
1791
+ # Customize the options with defaults
1792
+ metadata = @config.rpcs.get_google_channel_config.metadata.to_h
1793
+
1794
+ # Set x-goog-api-client and x-goog-user-project headers
1795
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1796
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1797
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1798
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1799
+
1800
+ header_params = {}
1801
+ if request.name
1802
+ header_params["name"] = request.name
1803
+ end
1804
+
1805
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1806
+ metadata[:"x-goog-request-params"] ||= request_params_header
1807
+
1808
+ options.apply_defaults timeout: @config.rpcs.get_google_channel_config.timeout,
1809
+ metadata: metadata,
1810
+ retry_policy: @config.rpcs.get_google_channel_config.retry_policy
1811
+
1812
+ options.apply_defaults timeout: @config.timeout,
1813
+ metadata: @config.metadata,
1814
+ retry_policy: @config.retry_policy
1815
+
1816
+ @eventarc_stub.call_rpc :get_google_channel_config, request, options: options do |response, operation|
1817
+ yield response, operation if block_given?
1818
+ return response
1819
+ end
1820
+ rescue ::GRPC::BadStatus => e
1821
+ raise ::Google::Cloud::Error.from_error(e)
1822
+ end
1823
+
1824
+ ##
1825
+ # Update a single GoogleChannelConfig
1826
+ #
1827
+ # @overload update_google_channel_config(request, options = nil)
1828
+ # Pass arguments to `update_google_channel_config` via a request object, either of type
1829
+ # {::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest} or an equivalent Hash.
1830
+ #
1831
+ # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Hash]
1832
+ # A request object representing the call parameters. Required. To specify no
1833
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1834
+ # @param options [::Gapic::CallOptions, ::Hash]
1835
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1836
+ #
1837
+ # @overload update_google_channel_config(google_channel_config: nil, update_mask: nil)
1838
+ # Pass arguments to `update_google_channel_config` via keyword arguments. Note that at
1839
+ # least one keyword argument is required. To specify no parameters, or to keep all
1840
+ # the default parameter values, pass an empty Hash as a request object (see above).
1841
+ #
1842
+ # @param google_channel_config [::Google::Cloud::Eventarc::V1::GoogleChannelConfig, ::Hash]
1843
+ # Required. The config to be updated.
1844
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1845
+ # The fields to be updated; only fields explicitly provided are updated.
1846
+ # If no field mask is provided, all provided fields in the request are
1847
+ # updated. To update all fields, provide a field mask of "*".
1848
+ #
1849
+ # @yield [response, operation] Access the result along with the RPC operation
1850
+ # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleChannelConfig]
1851
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1852
+ #
1853
+ # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig]
1854
+ #
1855
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1856
+ #
1857
+ # @example Basic example
1858
+ # require "google/cloud/eventarc/v1"
1859
+ #
1860
+ # # Create a client object. The client can be reused for multiple calls.
1861
+ # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new
1862
+ #
1863
+ # # Create a request. To set request fields, pass in keyword arguments.
1864
+ # request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new
1865
+ #
1866
+ # # Call the update_google_channel_config method.
1867
+ # result = client.update_google_channel_config request
1868
+ #
1869
+ # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig.
1870
+ # p result
1871
+ #
1872
+ def update_google_channel_config request, options = nil
1873
+ raise ::ArgumentError, "request must be provided" if request.nil?
1874
+
1875
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest
1876
+
1877
+ # Converts hash and nil to an options object
1878
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1879
+
1880
+ # Customize the options with defaults
1881
+ metadata = @config.rpcs.update_google_channel_config.metadata.to_h
1882
+
1883
+ # Set x-goog-api-client and x-goog-user-project headers
1884
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1885
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1886
+ gapic_version: ::Google::Cloud::Eventarc::V1::VERSION
1887
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1888
+
1889
+ header_params = {}
1890
+ if request.google_channel_config&.name
1891
+ header_params["google_channel_config.name"] = request.google_channel_config.name
1892
+ end
1893
+
1894
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1895
+ metadata[:"x-goog-request-params"] ||= request_params_header
1896
+
1897
+ options.apply_defaults timeout: @config.rpcs.update_google_channel_config.timeout,
1898
+ metadata: metadata,
1899
+ retry_policy: @config.rpcs.update_google_channel_config.retry_policy
1900
+
1901
+ options.apply_defaults timeout: @config.timeout,
1902
+ metadata: @config.metadata,
1903
+ retry_policy: @config.retry_policy
1904
+
1905
+ @eventarc_stub.call_rpc :update_google_channel_config, request, options: options do |response, operation|
1906
+ yield response, operation if block_given?
1907
+ return response
1908
+ end
1909
+ rescue ::GRPC::BadStatus => e
1910
+ raise ::Google::Cloud::Error.from_error(e)
1911
+ end
1912
+
1712
1913
  ##
1713
1914
  # Configuration class for the Eventarc API.
1714
1915
  #
@@ -1924,6 +2125,16 @@ module Google
1924
2125
  # @return [::Gapic::Config::Method]
1925
2126
  #
1926
2127
  attr_reader :delete_channel_connection
2128
+ ##
2129
+ # RPC-specific configuration for `get_google_channel_config`
2130
+ # @return [::Gapic::Config::Method]
2131
+ #
2132
+ attr_reader :get_google_channel_config
2133
+ ##
2134
+ # RPC-specific configuration for `update_google_channel_config`
2135
+ # @return [::Gapic::Config::Method]
2136
+ #
2137
+ attr_reader :update_google_channel_config
1927
2138
 
1928
2139
  # @private
1929
2140
  def initialize parent_rpcs = nil
@@ -1959,6 +2170,10 @@ module Google
1959
2170
  @create_channel_connection = ::Gapic::Config::Method.new create_channel_connection_config
1960
2171
  delete_channel_connection_config = parent_rpcs.delete_channel_connection if parent_rpcs.respond_to? :delete_channel_connection
1961
2172
  @delete_channel_connection = ::Gapic::Config::Method.new delete_channel_connection_config
2173
+ get_google_channel_config_config = parent_rpcs.get_google_channel_config if parent_rpcs.respond_to? :get_google_channel_config
2174
+ @get_google_channel_config = ::Gapic::Config::Method.new get_google_channel_config_config
2175
+ update_google_channel_config_config = parent_rpcs.update_google_channel_config if parent_rpcs.respond_to? :update_google_channel_config
2176
+ @update_google_channel_config = ::Gapic::Config::Method.new update_google_channel_config_config
1962
2177
 
1963
2178
  yield self if block_given?
1964
2179
  end
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -81,6 +81,44 @@ module Google
81
81
  "projects/#{project}/locations/#{location}/functions/#{function}"
82
82
  end
83
83
 
84
+ ##
85
+ # Create a fully-qualified CryptoKey resource string.
86
+ #
87
+ # The resource will be in the following format:
88
+ #
89
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
90
+ #
91
+ # @param project [String]
92
+ # @param location [String]
93
+ # @param key_ring [String]
94
+ # @param crypto_key [String]
95
+ #
96
+ # @return [::String]
97
+ def crypto_key_path project:, location:, key_ring:, crypto_key:
98
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
99
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
100
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
101
+
102
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
103
+ end
104
+
105
+ ##
106
+ # Create a fully-qualified GoogleChannelConfig resource string.
107
+ #
108
+ # The resource will be in the following format:
109
+ #
110
+ # `projects/{project}/locations/{location}/googleChannelConfig`
111
+ #
112
+ # @param project [String]
113
+ # @param location [String]
114
+ #
115
+ # @return [::String]
116
+ def google_channel_config_path project:, location:
117
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
118
+
119
+ "projects/#{project}/locations/#{location}/googleChannelConfig"
120
+ end
121
+
84
122
  ##
85
123
  # Create a fully-qualified Location resource string.
86
124
  #
@@ -153,6 +191,25 @@ module Google
153
191
  "projects/#{project}/locations/#{location}/triggers/#{trigger}"
154
192
  end
155
193
 
194
+ ##
195
+ # Create a fully-qualified Workflow resource string.
196
+ #
197
+ # The resource will be in the following format:
198
+ #
199
+ # `projects/{project}/locations/{location}/workflows/{workflow}`
200
+ #
201
+ # @param project [String]
202
+ # @param location [String]
203
+ # @param workflow [String]
204
+ #
205
+ # @return [::String]
206
+ def workflow_path project:, location:, workflow:
207
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
208
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
209
+
210
+ "projects/#{project}/locations/#{location}/workflows/#{workflow}"
211
+ end
212
+
156
213
  extend self
157
214
  end
158
215
  end